mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Added very simple locale switch test
This commit is contained in:
parent
8599612499
commit
5d8cd73e30
16
cypress/integration/Internationalization.feature
Normal file
16
cypress/integration/Internationalization.feature
Normal file
@ -0,0 +1,16 @@
|
||||
Feature: Internationalization
|
||||
As a user
|
||||
I want users to get the site in my native language
|
||||
In order to be able to understand the interface
|
||||
|
||||
Scenario: See english loginpage
|
||||
When I visit the "/login" page
|
||||
Then I can see the english language flag
|
||||
|
||||
Scenario: See german loginpage
|
||||
When I visit the "/login" page
|
||||
And I click on the locale switch
|
||||
Then I can see the german language flag
|
||||
Then There should be a locale cooke set to de
|
||||
When I refresh the page
|
||||
Then I can see the german language flag
|
||||
@ -80,6 +80,19 @@ Then('I am still logged in', () => {
|
||||
cy.get('.avatar-menu-popover').contains(username)
|
||||
})
|
||||
|
||||
When('I can see the english language flag', () => {
|
||||
cy.get('.login-locale-switch img[src$="en.svg"]')
|
||||
})
|
||||
When('I can see the german language flag', () => {
|
||||
cy.get('.login-locale-switch img[src$="de.svg"]')
|
||||
})
|
||||
When('I click on the locale switch', () => {
|
||||
cy.get('.login-locale-switch a').click().wait(500)
|
||||
})
|
||||
Then(`There should be a locale cooke set to de`, () => {
|
||||
cy.getCookie('locale').should('have.property', 'value', 'de')
|
||||
})
|
||||
|
||||
When('I navigate to the administration dashboard', () => {
|
||||
cy.get('.avatar-menu').click()
|
||||
cy.get('a').contains('Systemverwaltung').click()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user