Added very simple locale switch test

This commit is contained in:
Grzegorz Leoniec 2018-12-18 16:07:41 +01:00
parent 8599612499
commit 5d8cd73e30
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377
2 changed files with 29 additions and 0 deletions

View 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

View File

@ -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()