Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

e2e - Add search token by name and select input #1918

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions cypress-custom/integration/swap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ describe('Swap (custom)', () => {

// cy.get('.token-item-0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735').should('be.visible')
// cy.get('.token-item-0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735').click({ force: true })

cy.visit(
'/swap?inputCurrency=0xc778417E063141139Fce010982780140Aa0cD5Ab&outputCurrency=0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa'
)
cy.visit('/swap')
// search by name and select input
cy.get('#swap-currency-output .open-currency-select-button').click()
cy.get('#token-search-input').click().type('DAI')
cy.get('.sc-pg5r79-2.cUmBvs > div > div').contains('DAI').click({ force: true })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it'll work because the class name you are depending on will probably change at every build

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One Ideas was to add an ID to the currency list as done in #1922. This way it should not change. Would this solve your concerns or are there additional things?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! That was made exactly for this, I believe :)


// input amounts
cy.get('#swap-currency-input .token-amount-input').should('be.visible')
Expand Down