Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ltthienn committed Oct 17, 2023
1 parent 6e6a2f7 commit db4d5fe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/pages/limit-order.po.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export const LimitOder = {
cy.getContent(LimitOrderLocators.dropdownTokenBuy, text)
},

setSellRate(text: string) {
cy.get(LimitOrderLocators.txtSellRate).click().type(text)
setSellingRate(text: string) {
cy.get(LimitOrderLocators.txtSellingRate).click().type(text)
},

getSellRate() {
return cy.get(LimitOrderLocators.txtSellRate).invoke('val').then(value => {
getSellingRate() {
return cy.get(LimitOrderLocators.txtSellingRate).invoke('val').then(value => {
return value
})
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/selectors/selectors.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const LimitOrderLocators = {
dropdownTokenSell: '[data-testid=limit-order-input-tokena] [data-testid=token-symbol-container]',
dropdownTokenBuy: '[data-testid=limit-order-input-tokenb] [data-testid=token-symbol-container]',
btnLimit: '[data-testid=limit-button]',
txtSellRate: '[data-testid=input-sell-rate]'
txtSellingRate: '[data-testid=input-selling-rate]'
}

export const WalletLocators = {
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/specs/limit-order.e2e.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ describe(`Token Catalog on ${NETWORK}`, { tags: TAG.regression }, () => {
})

describe('Sell rate', () => {
it('Able to set sell rate by number', () => {
LimitOder.setSellRate('1.2345..67')
LimitOder.getSellRate().then((value) => {
it('Able to set selling rate by number', () => {
LimitOder.setSellingRate('1.2345..67')
LimitOder.getSellingRate().then((value) => {
cy.wrap(value).should('eq', '1.234567')
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/components/swapv2/LimitOrder/LimitOrderForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ const LimitOrderForm = forwardRef<LimitOrderFormHandle, Props>(function LimitOrd
<NumericalInput
maxLength={50}
style={{ fontSize: 14, height: INPUT_HEIGHT }}
data-testid="input-sell-rate"
data-testid="input-selling-rate"
value={displayRate}
onUserInput={onChangeRate}
onFocus={trackingTouchInput}
Expand Down

0 comments on commit db4d5fe

Please sign in to comment.