Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix old signature e2e by mocking launch darkly api #13002

Merged
merged 17 commits into from
Jan 15, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const useConfirmationRedesignEnabled = () => {
const isRedesignedEnabled = useMemo(
() =>
(confirmation_redesign as Record<string, string>)?.signatures &&
process.env.REDESIGNED_SIGNATURE_REQUEST === 'true' &&
jpuri marked this conversation as resolved.
Show resolved Hide resolved
approvalRequestType &&
[ApprovalTypes.PERSONAL_SIGN, ApprovalTypes.ETH_SIGN_TYPED_DATA].includes(
approvalRequestType as ApprovalTypes,
Expand Down
11 changes: 11 additions & 0 deletions e2e/specs/confirmations/signatures/personal-sign.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ import TestHelpers from '../../../helpers';
import Assertions from '../../../utils/Assertions';

describe(SmokeConfirmations('Personal Sign'), () => {
const mockRemoteFeatureApi = {
GET: [
{
urlEndpoint:
'https://client-config.api.cx.metamask.io/v1/flags?client=mobile&distribution=main&environment=dev',
response: [{ confirmation_redesign: { signatures: false } }],
responseCode: 200,
},
],
};
beforeAll(async () => {
jest.setTimeout(2500000);
await TestHelpers.reverseServerPort();
Expand All @@ -29,6 +39,7 @@ describe(SmokeConfirmations('Personal Sign'), () => {
.build(),
restartDevice: true,
ganacheOptions: defaultGanacheOptions,
mockRemoteFeatureApi,
jpuri marked this conversation as resolved.
Show resolved Hide resolved
},
async () => {
await loginToApp();
Expand Down
Loading