-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into jl/mmp-1033/preferences-controller-networ…
…k-meta
- Loading branch information
Showing
14 changed files
with
379 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const { strict: assert } = require('assert'); | ||
const { withFixtures } = require('../helpers'); | ||
const FixtureBuilder = require('../fixture-builder'); | ||
|
||
describe('Add snap account experimental settings', function () { | ||
it('switch "Enable Add snap account" to on', async function () { | ||
await withFixtures( | ||
{ | ||
fixtures: new FixtureBuilder().build(), | ||
title: this.test.title, | ||
failOnConsoleError: false, | ||
}, | ||
async ({ driver }) => { | ||
await driver.navigate(); | ||
await driver.fill('#password', 'correct horse battery staple'); | ||
await driver.press('#password', driver.Key.ENTER); | ||
|
||
// Make sure the "Add snap account" button is not visible. | ||
await driver.clickElement('[data-testid="account-menu-icon"]'); | ||
await driver.assertElementNotPresent({ | ||
text: 'Add snap account', | ||
tag: 'button', | ||
}); | ||
await driver.clickElement('.mm-box button[aria-label="Close"]'); | ||
|
||
// Navigate to experimental settings. | ||
await driver.clickElement( | ||
'[data-testid="account-options-menu-button"]', | ||
); | ||
await driver.clickElement({ text: 'Settings', tag: 'div' }); | ||
await driver.clickElement({ text: 'Experimental', tag: 'div' }); | ||
|
||
// Switch "Enable Add snap account" to on. | ||
const toggle = await driver.findElement( | ||
'[data-testid="add-snap-account-toggle"]', | ||
); | ||
await driver.scrollToElement(toggle); | ||
await driver.clickElement('[data-testid="add-snap-account-toggle"]'); | ||
|
||
// Make sure the "Add snap account" button is visible. | ||
await driver.clickElement('[data-testid="account-menu-icon"]'); | ||
assert.equal( | ||
await driver.isElementPresentAndVisible({ | ||
text: 'Add snap account', | ||
tag: 'button', | ||
}), | ||
true, | ||
); | ||
}, | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.