mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Turn off all old notifications (#12500)
* Turn off all old notifications * Remove unnecessary attempt to close whats new popup in e2e test * Remove unneeded whats new popup closes in e2e tests * Lint fix
This commit is contained in:
parent
b824054557
commit
b8443aa388
@ -176,24 +176,6 @@ describe('MetaMask', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Close the what's new popup", function () {
|
|
||||||
it("should show the what's new popover", async function () {
|
|
||||||
const popoverTitle = await driver.findElement(
|
|
||||||
'.popover-header__title h2',
|
|
||||||
);
|
|
||||||
|
|
||||||
assert.equal(await popoverTitle.getText(), "What's new");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should close the what's new popup", async function () {
|
|
||||||
const popover = await driver.findElement('.popover-container');
|
|
||||||
|
|
||||||
await driver.clickElement('[data-testid="popover-close"]');
|
|
||||||
|
|
||||||
await popover.waitForElementState('hidden');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Import Secret Recovery Phrase', function () {
|
describe('Import Secret Recovery Phrase', function () {
|
||||||
it('logs out of the vault', async function () {
|
it('logs out of the vault', async function () {
|
||||||
await driver.clickElement('.account-menu__icon');
|
await driver.clickElement('.account-menu__icon');
|
||||||
|
@ -27,7 +27,6 @@ describe('Hide token', function () {
|
|||||||
css: '.asset-list-item__token-button',
|
css: '.asset-list-item__token-button',
|
||||||
text: '0 TST',
|
text: '0 TST',
|
||||||
});
|
});
|
||||||
await driver.clickElement('.popover-header__button');
|
|
||||||
|
|
||||||
let assets = await driver.findElements('.asset-list-item');
|
let assets = await driver.findElements('.asset-list-item');
|
||||||
assert.equal(assets.length, 2);
|
assert.equal(assets.length, 2);
|
||||||
@ -39,7 +38,6 @@ describe('Hide token', function () {
|
|||||||
await driver.clickElement('[data-testid="asset-options__button"]');
|
await driver.clickElement('[data-testid="asset-options__button"]');
|
||||||
|
|
||||||
await driver.clickElement('[data-testid="asset-options__hide"]');
|
await driver.clickElement('[data-testid="asset-options__hide"]');
|
||||||
|
|
||||||
// wait for confirm hide modal to be visible
|
// wait for confirm hide modal to be visible
|
||||||
const confirmHideModal = await driver.findVisibleElement('span .modal');
|
const confirmHideModal = await driver.findVisibleElement('span .modal');
|
||||||
|
|
||||||
|
@ -60,11 +60,6 @@ describe('Metamask Import UI', function () {
|
|||||||
tag: 'button',
|
tag: 'button',
|
||||||
});
|
});
|
||||||
|
|
||||||
// close the what's new popup
|
|
||||||
const popover = await driver.findElement('.popover-container');
|
|
||||||
await driver.clickElement('[data-testid="popover-close"]');
|
|
||||||
await popover.waitForElementState('hidden');
|
|
||||||
|
|
||||||
// Show account information
|
// Show account information
|
||||||
await driver.clickElement(
|
await driver.clickElement(
|
||||||
'[data-testid="account-options-menu-button"]',
|
'[data-testid="account-options-menu-button"]',
|
||||||
|
@ -65,13 +65,6 @@ describe('Incremental Security', function () {
|
|||||||
tag: 'button',
|
tag: 'button',
|
||||||
});
|
});
|
||||||
|
|
||||||
// closes the what's new popup
|
|
||||||
const popover = await driver.findElement('.popover-container');
|
|
||||||
|
|
||||||
await driver.clickElement('[data-testid="popover-close"]');
|
|
||||||
|
|
||||||
await popover.waitForElementState('hidden');
|
|
||||||
|
|
||||||
await driver.clickElement(
|
await driver.clickElement(
|
||||||
'[data-testid="account-options-menu-button"]',
|
'[data-testid="account-options-menu-button"]',
|
||||||
);
|
);
|
||||||
|
@ -2,7 +2,6 @@ import { createSelector } from 'reselect';
|
|||||||
import { addHexPrefix } from '../../app/scripts/lib/util';
|
import { addHexPrefix } from '../../app/scripts/lib/util';
|
||||||
import {
|
import {
|
||||||
MAINNET_CHAIN_ID,
|
MAINNET_CHAIN_ID,
|
||||||
BSC_CHAIN_ID,
|
|
||||||
TEST_CHAINS,
|
TEST_CHAINS,
|
||||||
NETWORK_TYPE_RPC,
|
NETWORK_TYPE_RPC,
|
||||||
NATIVE_CURRENCY_TOKEN_IMAGE_MAP,
|
NATIVE_CURRENCY_TOKEN_IMAGE_MAP,
|
||||||
@ -571,18 +570,15 @@ export function getShowWhatsNewPopup(state) {
|
|||||||
* @param {Object} state
|
* @param {Object} state
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
*/
|
*/
|
||||||
function getAllowedNotificationIds(state) {
|
function getAllowedNotificationIds() {
|
||||||
const currentKeyring = getCurrentKeyring(state);
|
|
||||||
const currentKeyringIsLedger = currentKeyring?.type === KEYRING_TYPES.LEDGER;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
1: true,
|
1: false,
|
||||||
2: true,
|
2: false,
|
||||||
3: true,
|
3: false,
|
||||||
4: getCurrentChainId(state) === BSC_CHAIN_ID,
|
4: false,
|
||||||
5: true,
|
5: false,
|
||||||
6: currentKeyringIsLedger,
|
6: false,
|
||||||
7: currentKeyringIsLedger,
|
7: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user