From 4f92edc1768663a3ea8d854b23d458ceff868af5 Mon Sep 17 00:00:00 2001 From: ltthienn Date: Wed, 4 Oct 2023 12:03:58 +0700 Subject: [PATCH] update selectors --- cypress/e2e/selectors/selectors.cy.ts | 8 ++++---- cypress/support/selectTokenCommands.ts | 4 ++-- src/components/SearchModal/CurrencySearch.tsx | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cypress/e2e/selectors/selectors.cy.ts b/cypress/e2e/selectors/selectors.cy.ts index 3e88fea966..ea4ee1d6a5 100644 --- a/cypress/e2e/selectors/selectors.cy.ts +++ b/cypress/e2e/selectors/selectors.cy.ts @@ -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]', @@ -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]' } \ No newline at end of file diff --git a/cypress/support/selectTokenCommands.ts b/cypress/support/selectTokenCommands.ts index 098d334d3e..efa0530ff6 100644 --- a/cypress/support/selectTokenCommands.ts +++ b/cypress/support/selectTokenCommands.ts @@ -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) => { @@ -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() }) diff --git a/src/components/SearchModal/CurrencySearch.tsx b/src/components/SearchModal/CurrencySearch.tsx index c25bf3038e..e42d3b5a7d 100644 --- a/src/components/SearchModal/CurrencySearch.tsx +++ b/src/components/SearchModal/CurrencySearch.tsx @@ -438,7 +438,7 @@ export function CurrencySearch({