Skip to content

Commit

Permalink
merge similar tests into one following pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
asnaith committed Oct 11, 2023
1 parent 0a9fd97 commit fa06d73
Showing 1 changed file with 13 additions and 43 deletions.
56 changes: 13 additions & 43 deletions packages/ui/cypress/tests/watched-accounts.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ describe('Watched Accounts', () => {
settingsPage.addButton().should('be.disabled')
})

it('can see the provided name displayed for a watched multisig', () => {
it('can see the expected account details displayed for a watched multisig', () => {
cy.visit(settingsPageWatchAccountUrl)
addWatchAccount(
watchMultisigs['multisig-without-pure'].address,
watchMultisigs['multisig-without-pure'].name
)
// ensure the multisig name is displayed in the settings account container
settingsPage.accountContainer().within(() => {
accountDisplay.identicon().should('be.visible')
accountDisplay
.nameLabel()
.should('be.visible')
Expand All @@ -80,81 +81,50 @@ describe('Watched Accounts', () => {
// ensure the name is included in the selectable drop-down option
topMenuItems.multiproxySelector().should('be.visible').first().click()
topMenuItems.multiproxySelectorOption().within(() => {
accountDisplay.identicon().should('be.visible')
accountDisplay.multisigBadge().should('be.visible')
accountDisplay.pureBadge().should('not.exist')
accountDisplay.nameLabel().should('have.text', watchMultisigs['multisig-without-pure'].name)
})
// ensure the name is displayed in the home page header
topMenuItems.homeButton().click()
multisigPage.accountHeader().within(() => {
accountDisplay.identicon().should('be.visible')
accountDisplay.multisigBadge().should('be.visible')
accountDisplay.pureBadge().should('not.exist')
accountDisplay.nameLabel().should('have.text', watchMultisigs['multisig-without-pure'].name)
})
})

it('can see the provided name displayed for a watched pure', () => {
it('can see the expected account details displayed for a watched pure', () => {
cy.visit(settingsPageWatchAccountUrl)
addWatchAccount(
watchMultisigs['multisig-with-pure'].pureAddress,
watchMultisigs['multisig-with-pure'].name
)
// ensure the multisig name is displayed in the settings account container
settingsPage.accountContainer().within(() => {
accountDisplay.identicon().should('be.visible')
accountDisplay
.nameLabel()
.should('be.visible')
.should('have.text', watchMultisigs['multisig-with-pure'].name)
})
// ensure the name is included in the selectable drop-down option
topMenuItems.multiproxySelector().should('be.visible').first().click()
topMenuItems.multiproxySelectorOption().within(() => {
accountDisplay.nameLabel().should('have.text', watchMultisigs['multisig-with-pure'].name)
})
// navigate to the multisig page and ensure the name is included in the home page header
topMenuItems.homeButton().click()
multisigPage.accountHeader().within(() => {
accountDisplay.nameLabel().should('have.text', watchMultisigs['multisig-with-pure'].name)
})
})

it('can see the identicon and badge displayed for a watched multisig', () => {
cy.visit(settingsPageWatchAccountUrl)
addWatchAccount(
watchMultisigs['multisig-without-pure'].address,
watchMultisigs['multisig-without-pure'].name
)
// ensure the multisig badge is displayed in the selectable drop-down option
topMenuItems.multiproxySelector().should('be.visible').first().click()
topMenuItems.multiproxySelectorOption().within(() => {
accountDisplay.identicon().should('be.visible')
accountDisplay.multisigBadge().should('be.visible')
accountDisplay.pureBadge().should('not.exist')
})
// navigate to the home page and ensure the multisig badge is included in the header
topMenuItems.homeButton().click()
multisigPage.accountHeader().within(() => {
accountDisplay.identicon().should('be.visible')
accountDisplay.multisigBadge().should('be.visible')
accountDisplay.pureBadge().should('not.exist')
})
})

it('can see the identicon and badge displayed for a watched pure proxy', () => {
cy.visit(settingsPageWatchAccountUrl)
addWatchAccount(
watchMultisigs['multisig-with-pure'].pureAddress,
watchMultisigs['multisig-with-pure'].name
)
// ensure the pure badge is displayed in the selectable drop-down option
topMenuItems.multiproxySelector().should('be.visible').first().click()
topMenuItems.multiproxySelectorOption().within(() => {
accountDisplay.identicon().should('be.visible')
accountDisplay.pureBadge().should('be.visible')
accountDisplay.multisigBadge().should('not.exist')
accountDisplay.nameLabel().should('have.text', watchMultisigs['multisig-with-pure'].name)
})
// navigate to the home page and ensure the pure badge is included in the header
// navigate to the multisig page and ensure the name is included in the home page header
topMenuItems.homeButton().click()
multisigPage.accountHeader().within(() => {
accountDisplay.identicon().should('be.visible')
accountDisplay.pureBadge().should('be.visible')
accountDisplay.multisigBadge().should('not.exist')
accountDisplay.nameLabel().should('have.text', watchMultisigs['multisig-with-pure'].name)
})
})

Expand Down

0 comments on commit fa06d73

Please sign in to comment.