2023-05-22 19:02:54 +03:00
|
|
|
import { getTestSelector } from '../../utils'
|
|
|
|
|
|
|
|
describe('Swap settings', () => {
|
|
|
|
it('Opens and closes the settings menu', () => {
|
2023-08-30 23:08:18 +03:00
|
|
|
cy.visit('/swap')
|
2023-05-22 19:02:54 +03:00
|
|
|
cy.contains('Settings').should('not.exist')
|
|
|
|
cy.get(getTestSelector('open-settings-dialog-button')).click()
|
2023-08-10 19:20:31 +03:00
|
|
|
cy.get(getTestSelector('mobile-settings-menu')).should('not.exist')
|
2023-05-22 19:02:54 +03:00
|
|
|
cy.contains('Max slippage').should('exist')
|
|
|
|
cy.contains('Transaction deadline').should('exist')
|
2023-07-15 00:46:59 +03:00
|
|
|
cy.contains('UniswapX').should('exist')
|
|
|
|
cy.contains('Local routing').should('exist')
|
2023-05-22 19:02:54 +03:00
|
|
|
cy.get(getTestSelector('open-settings-dialog-button')).click()
|
|
|
|
cy.contains('Settings').should('not.exist')
|
|
|
|
})
|
2023-08-10 19:20:31 +03:00
|
|
|
|
|
|
|
it('should open the mobile settings menu', () => {
|
|
|
|
cy.viewport('iphone-6')
|
2023-08-30 23:08:18 +03:00
|
|
|
cy.visit('/swap')
|
2023-08-10 19:20:31 +03:00
|
|
|
cy.get(getTestSelector('open-settings-dialog-button')).click()
|
|
|
|
cy.get(getTestSelector('mobile-settings-menu')).should('exist')
|
|
|
|
cy.contains('Max slippage').should('exist')
|
|
|
|
cy.contains('Transaction deadline').should('exist')
|
|
|
|
cy.contains('UniswapX').should('exist')
|
|
|
|
cy.contains('Local routing').should('exist')
|
2023-08-30 22:37:50 +03:00
|
|
|
cy.get(getTestSelector('mobile-settings-scrim')).click({ force: true })
|
2023-08-10 19:20:31 +03:00
|
|
|
})
|
2023-05-22 19:02:54 +03:00
|
|
|
})
|