Commit 86677ed1 authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

test(staging): add staging-only t9n test (#6899)

* test(staging): add staging-only test

* test(staging): translations mount

* ci(t9n): download translations from crowdin

* test: proving that it works

* Revert "ci(t9n): download translations from crowdin"

This reverts commit b6e0f0c5c296c3ad4166419d72e9b2ebd053be87.

* Revert "test: proving that it works"

This reverts commit 1d3a1c2a2377e1a3b790f706c42b7169a47e59fd.

* fix: spec->test

---------
Co-authored-by: default avatarUL Service Account <hello-happy-puppy@users.noreply.github.com>
parent accf0905
...@@ -144,6 +144,7 @@ jobs: ...@@ -144,6 +144,7 @@ jobs:
wait-on: 'http://localhost:3000' wait-on: 'http://localhost:3000'
browser: electron browser: electron
group: e2e group: e2e
spec: ${{ github.ref_name == 'releases/staging' && 'cypress/{e2e,staging}/**/*.test.ts' || 'cypress/e2e/**/*.test.ts' }}
env: env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
......
...@@ -28,6 +28,6 @@ export default defineConfig({ ...@@ -28,6 +28,6 @@ export default defineConfig({
return config return config
}, },
baseUrl: 'http://localhost:3000', baseUrl: 'http://localhost:3000',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', specPattern: 'cypress/{e2e,staging}/**/*.test.ts',
}, },
}) })
import { getTestSelector } from '../utils'
describe('translations', () => {
it('loads locale from the query param', () => {
cy.visit('/?lng=fr-FR')
cy.contains('Échanger')
cy.contains('Uniswap disponible en : English')
})
it('loads locale from menu', () => {
cy.visit('/')
cy.get(getTestSelector('web3-status-connected')).click()
cy.get(getTestSelector('wallet-settings')).click()
cy.get(getTestSelector('wallet-language-item')).contains('français').click({ force: true })
cy.location('hash').should('match', /\?lng=fr-FR$/)
cy.contains('Échanger')
cy.contains('Uniswap disponible en : English')
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment