mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
await all clicks in e2e beta tests.
This commit is contained in:
parent
12266b064e
commit
9cc358a429
@ -726,6 +726,10 @@ describe('MetaMask', function () {
|
|||||||
await driver.switchTo().window(extension)
|
await driver.switchTo().window(extension)
|
||||||
await delay(regularDelayMs)
|
await delay(regularDelayMs)
|
||||||
|
|
||||||
|
const [txListItem] = await findElements(driver, By.css('.tx-list-item'))
|
||||||
|
await txListItem.click()
|
||||||
|
await delay(regularDelayMs)
|
||||||
|
|
||||||
// Set the gas limit
|
// Set the gas limit
|
||||||
const configureGas = await driver.wait(until.elementLocated(By.css('.send-v2__gas-fee-display button')))
|
const configureGas = await driver.wait(until.elementLocated(By.css('.send-v2__gas-fee-display button')))
|
||||||
await configureGas.click()
|
await configureGas.click()
|
||||||
@ -767,19 +771,17 @@ describe('MetaMask', function () {
|
|||||||
|
|
||||||
it('finds the transaction in the transactions list', async function () {
|
it('finds the transaction in the transactions list', async function () {
|
||||||
const transactions = await findElements(driver, By.css('.tx-list-item'))
|
const transactions = await findElements(driver, By.css('.tx-list-item'))
|
||||||
|
assert.equal(transactions.length, 2)
|
||||||
it('finds the transaction in the transactions list', async function () {
|
|
||||||
const transactions = await findElements(driver, By.css('.tx-list-item'))
|
|
||||||
assert.equal(transactions.length, 8)
|
|
||||||
|
|
||||||
const txValues = await findElements(driver, By.css('.tx-list-value'))
|
const txValues = await findElements(driver, By.css('.tx-list-value'))
|
||||||
await driver.wait(until.elementTextMatches(txValues[0], /26\sTST/))
|
await driver.wait(until.elementTextMatches(txValues[0], /26\sTST/))
|
||||||
const txStatuses = await findElements(driver, By.css('.tx-list-status'))
|
const txStatuses = await findElements(driver, By.css('.tx-list-status'))
|
||||||
await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed/))
|
await driver.wait(until.elementTextMatches(txStatuses[0], /Confirmed/))
|
||||||
|
|
||||||
|
// const walletBalance = await findElement(driver, By.css('.wallet-balance'))
|
||||||
|
|
||||||
const tokenListItems = await findElements(driver, By.css('.token-list-item'))
|
const tokenListItems = await findElements(driver, By.css('.token-list-item'))
|
||||||
tokenListItems[0].click()
|
await tokenListItems[0].click()
|
||||||
await delay(regularDelayMs)
|
|
||||||
|
|
||||||
const tokenBalanceAmount = await findElement(driver, By.css('.token-balance__amount'))
|
const tokenBalanceAmount = await findElement(driver, By.css('.token-balance__amount'))
|
||||||
assert.equal(await tokenBalanceAmount.getText(), '24')
|
assert.equal(await tokenBalanceAmount.getText(), '24')
|
||||||
@ -789,18 +791,18 @@ describe('MetaMask', function () {
|
|||||||
describe('Hide token', () => {
|
describe('Hide token', () => {
|
||||||
it('hides the token when clicked', async () => {
|
it('hides the token when clicked', async () => {
|
||||||
const [hideTokenEllipsis] = await findElements(driver, By.css('.token-list-item__ellipsis'))
|
const [hideTokenEllipsis] = await findElements(driver, By.css('.token-list-item__ellipsis'))
|
||||||
hideTokenEllipsis.click()
|
await hideTokenEllipsis.click()
|
||||||
|
|
||||||
const byTokenMenuDropdownOption = By.css('.menu__item--clickable')
|
const byTokenMenuDropdownOption = By.css('.menu__item--clickable')
|
||||||
const tokenMenuDropdownOption = await driver.wait(until.elementLocated(byTokenMenuDropdownOption))
|
const tokenMenuDropdownOption = await driver.wait(until.elementLocated(byTokenMenuDropdownOption))
|
||||||
|
|
||||||
tokenMenuDropdownOption.click()
|
await tokenMenuDropdownOption.click()
|
||||||
|
|
||||||
const confirmHideModal = await findElement(driver, By.css('span .modal'))
|
const confirmHideModal = await findElement(driver, By.css('span .modal'))
|
||||||
|
|
||||||
const byHideTokenConfirmationButton = By.css('.hide-token-confirmation__button')
|
const byHideTokenConfirmationButton = By.css('.hide-token-confirmation__button')
|
||||||
const hideTokenConfirmationButton = await driver.wait(until.elementLocated(byHideTokenConfirmationButton))
|
const hideTokenConfirmationButton = await driver.wait(until.elementLocated(byHideTokenConfirmationButton))
|
||||||
hideTokenConfirmationButton.click()
|
await hideTokenConfirmationButton.click()
|
||||||
|
|
||||||
await driver.wait(until.stalenessOf(confirmHideModal))
|
await driver.wait(until.stalenessOf(confirmHideModal))
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user