1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

add e2e test for default icons (#13869)

This commit is contained in:
mirjanaKukic 2022-08-25 16:48:13 +02:00 committed by GitHub
parent ee06fe495c
commit eabbe9f037
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,58 @@
const { strict: assert } = require('assert');
const { convertToHexValue, withFixtures } = require('../helpers');
describe('Settings', function () {
const ganacheOptions = {
accounts: [
{
secretKey:
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC',
balance: convertToHexValue(25000000000000000000),
},
],
};
it('checks jazzicon and blockies icons', async function () {
await withFixtures(
{
fixtures: 'imported-account',
ganacheOptions,
title: this.test.title,
},
async ({ driver }) => {
await driver.navigate();
await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER);
// goes to the settings screen
await driver.clickElement('.account-menu__icon');
await driver.clickElement({ text: 'Settings', tag: 'div' });
// finds the jazzicon toggle turned on
await driver.findElement(
'[data-test-id="jazz_icon"] .settings-page__content-item__identicon__item__icon--active',
);
const jazziconText = await driver.findElement({
tag: 'h6',
text: 'Jazzicons',
});
assert.equal(
await jazziconText.getText(),
'Jazzicons',
'Text for icon should be Jazzicons',
);
const blockiesText = await driver.findElement({
tag: 'h6',
text: 'Blockies',
});
assert.equal(
await blockiesText.getText(),
'Blockies',
'Text for icon should be Blockies',
);
},
);
});
});

View File

@ -19,6 +19,7 @@ describe('Threebox', function () {
after(async function () {
await threeboxServer.stop();
});
it('Set up data to be restored by 3box', async function () {
await withFixtures(
{