Skip to content

Commit

Permalink
update selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
ltthienn committed Oct 4, 2023
1 parent cd5bbc1 commit 4f92edc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/selectors/selectors.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const TokenCatalogLocators = {
dropdownTokenIn: '[data-testid=swap-currency-input] [data-testid=token-symbol-container]',
dropdownTokenOut: '[data-testid=swap-currency-output] [data-testid=token-symbol-container]',
txtToken: '[data-testid=token-search-input]',
txtSearch: '[data-testid=search-input]',
lblFavoriteToken: '[data-testid=favorite-token]',
lblRowInWhiteList: '[data-testid=token-item]',
lblNotFound: '[data-testid=no-token-result]',
Expand Down Expand Up @@ -47,13 +47,13 @@ export const FarmLocators = {
}

export const PoolLocators = {
txtSearch: '[data-testid=input-search]'
txtSearch: '[data-testid=search-input]'
}

export const MyPoolLocators = {
txtSearch: '[data-testid=input-search]'
txtSearch: '[data-testid=search-input]'
}

export const MyEarningLocators = {
txtSearch: '[data-testid=input-search]'
txtSearch: '[data-testid=search-input]'
}
4 changes: 2 additions & 2 deletions cypress/support/selectTokenCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Cypress.Commands.add('selectTokenOut', () => {
})

Cypress.Commands.add('searchToken', (value) => {
cy.get(TokenCatalogLocators.txtToken).should('be.visible').type(value)
cy.get(TokenCatalogLocators.txtSearch).should('be.visible').type(value)
})

Cypress.Commands.add('selectTokenBySymbol', (value) => {
Expand Down Expand Up @@ -74,7 +74,7 @@ Cypress.Commands.add('deleteImportedToken', (value: string) => {
cy.searchToken(value)
cy.wait(1000)
cy.get(TokenCatalogLocators.lblRowInWhiteList).children().find(TokenCatalogLocators.iconRemoveImportedToken).click()
cy.get(TokenCatalogLocators.txtToken).clear()
cy.get(TokenCatalogLocators.txtSearch).clear()

})

Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchModal/CurrencySearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export function CurrencySearch({
<SearchInput
type="text"
id="token-search-input"
data-testid="token-search-input"
data-testid="search-input"
placeholder={t`Search by token name, token symbol or address`}
value={searchQuery}
ref={inputRef}
Expand Down

0 comments on commit 4f92edc

Please sign in to comment.