mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
Job Screens with Shadow Dom Css selector
This commit is contained in:
parent
68bbe18e32
commit
60933f1090
@ -102,7 +102,8 @@ describe('Metamask popup page', function () {
|
||||
|
||||
it('shows value was created and seed phrase', async () => {
|
||||
await delay(300)
|
||||
await driver.findElement(By.css('.twelve-word-phrase')).getText()
|
||||
const seedPhrase = await driver.findElement(By.css('.twelve-word-phrase')).getText()
|
||||
assert.equal(seedPhrase.split(' ').length, 12)
|
||||
const continueAfterSeedPhrase = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > button:nth-child(4)'))
|
||||
assert.equal(await continueAfterSeedPhrase.getText(), `I'VE COPIED IT SOMEWHERE SAFE`)
|
||||
await continueAfterSeedPhrase.click()
|
||||
|
@ -9,7 +9,7 @@ const By = webdriver.By
|
||||
const { delay, buildFirefoxWebdriver } = require('../func')
|
||||
|
||||
describe('', function () {
|
||||
let driver, seedPhase, accountAddress, tokenAddress, extensionId
|
||||
let driver, accountAddress, tokenAddress, extensionId
|
||||
|
||||
this.timeout(0)
|
||||
|
||||
@ -34,7 +34,7 @@ describe('', function () {
|
||||
|
||||
it('switches to Firefox addon list', async function () {
|
||||
await driver.get('about:debugging#addons')
|
||||
await delay(10000)
|
||||
await delay(700)
|
||||
})
|
||||
|
||||
it(`selects MetaMask's extension id and opens it in the current tab`, async function () {
|
||||
@ -102,7 +102,8 @@ describe('', function () {
|
||||
|
||||
it('shows value was created and seed phrase', async () => {
|
||||
await delay(300)
|
||||
seedPhase = await driver.findElement(By.css('.twelve-word-phrase')).getText()
|
||||
cosnt seedPhase = await driver.findElement(By.css('.twelve-word-phrase')).getText()
|
||||
assert.equal(seedPhrase.split(' ').length, 12)
|
||||
const continueAfterSeedPhrase = await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > button:nth-child(4)'))
|
||||
assert.equal(await continueAfterSeedPhrase.getText(), `I'VE COPIED IT SOMEWHERE SAFE`)
|
||||
await continueAfterSeedPhrase.click()
|
||||
|
@ -39,8 +39,7 @@ async function captureAllScreens() {
|
||||
const extPath = path.resolve('dist/chrome')
|
||||
driver = buildWebDriver(extPath)
|
||||
await driver.get('chrome://extensions-frame')
|
||||
const elems = await driver.findElements(By.css('* /deep/ extensions-item'))
|
||||
const extensionId = await elems[1].getAttribute('id')
|
||||
const extensionId = await driver.executeScript('return document.querySelector("extensions-manager").shadowRoot.querySelector("extensions-view-manager extensions-item-list").shadowRoot.querySelector("#container > div.items-container > extensions-item:nth-child(2)").getAttribute("id")')
|
||||
await driver.get(`chrome-extension://${extensionId}/home.html`)
|
||||
await delay(500)
|
||||
tabs = await driver.getAllWindowHandles()
|
||||
|
Loading…
Reference in New Issue
Block a user