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

test: Complete missing step for add a contact to the address book in existing E2E test #27959

Merged
38 changes: 38 additions & 0 deletions test/e2e/tests/settings/address-book.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,44 @@ describe('Address Book', function () {
},
);
});

it('Adds a new contact to the address book', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder().build(),
ganacheOptions: defaultGanacheOptions,
title: this.test.fullTitle(),
},
async ({ driver }) => {
await unlockWallet(driver);
await openMenuSafe(driver);

await driver.clickElement({ text: 'Settings', tag: 'div' });
await driver.clickElement({ text: 'Contacts', tag: 'div' });

await driver.clickElement('.address-book__link');

await driver.fill('#nickname', 'Test User');

await driver.fill(
'[data-testid="ens-input"]',
'0x56A355d3427bC2B1E22c78197AF091230919Cc2A',
);

await driver.clickElement('[data-testid="page-container-footer-next"]');

await driver.waitForSelector({
text: 'Test User',
css: '.address-list-item__label',
});
await driver.waitForSelector({
css: '[data-testid="address-list-item-address"]',
text: '0x56A35...9Cc2A',
});
},
);
});

it('Edit entry in address book', async function () {
await withFixtures(
{
Expand Down