Skip to content

Commit

Permalink
test: remove duplicate signature tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pnarayanaswamy committed Dec 20, 2024
1 parent b030ba9 commit 8f59d24
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 95 deletions.
37 changes: 0 additions & 37 deletions test/e2e/tests/signature/personal-sign.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,43 +116,6 @@ describe('Personal sign', function () {
});

describe('Redesigned confirmation screens', function () {
it('can initiate and confirm a personal sign', async function () {
await withFixtures(
{
dapp: true,
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions: defaultGanacheOptions,
title: this.test.fullTitle(),
},
async ({ driver, ganacheServer }) => {
const addresses = await ganacheServer.getAccounts();
const publicAddress = addresses[0];
await unlockWallet(driver);

await openDapp(driver);
await driver.clickElement('#personalSign');

await driver.waitUntilXWindowHandles(3);
const windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
WINDOW_TITLES.Dialog,
windowHandles,
);

await driver.findElement({
css: 'p',
text: 'Example `personal_sign` message',
});

await driver.clickElement('[data-testid="confirm-footer-button"]');

await verifyAndAssertPersonalMessage(driver, publicAddress);
},
);
});

it('can queue multiple personal signs and confirm', async function () {
await withFixtures(
{
Expand Down
58 changes: 0 additions & 58 deletions test/e2e/tests/signature/signature-request.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,64 +337,6 @@ describe('Sign Typed Data Signature Request', function () {
});

describe('Redesigned confirmation screens', function () {
testData.forEach((data) => {
it(`can initiate and confirm a Signature Request of ${data.type}`, async function () {
await withFixtures(
{
dapp: true,
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions: defaultGanacheOptions,
title: this.test.fullTitle(),
},
async ({ driver, ganacheServer }) => {
const addresses = await ganacheServer.getAccounts();
const publicAddress = addresses[0];
await unlockWallet(driver);

await openDapp(driver);

// creates a sign typed data signature request
await driver.clickElement(data.buttonId);

await driver.waitUntilXWindowHandles(3);
let windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
WINDOW_TITLES.Dialog,
windowHandles,
);

await verifyAndAssertRedesignedSignTypedData(
driver,
data.expectedMessage,
);

// Approve signing typed data
await finalizeSignatureRequest(
driver,
'.confirm-scroll-to-bottom__button',
'Confirm',
);
await driver.waitUntilXWindowHandles(2);
windowHandles = await driver.getAllWindowHandles();

// switch to the Dapp and verify the signed address
await driver.switchToWindowWithTitle(
'E2E Test Dapp',
windowHandles,
);
await driver.clickElement(data.verifyId);
const recoveredAddress = await driver.findElement(
data.verifyResultId,
);

assert.equal(await recoveredAddress.getText(), publicAddress);
},
);
});
});

testData.forEach((data) => {
it(`can queue multiple Signature Requests of ${data.type} and confirm`, async function () {
await withFixtures(
Expand Down

0 comments on commit 8f59d24

Please sign in to comment.