mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
fixed internationalization tests for new dropdown
This commit is contained in:
parent
0efe972b4e
commit
c0a4dae3e5
@ -28,7 +28,10 @@
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
:class="[ current.code === locale.code && 'active' ]"
|
||||
:class="[
|
||||
locale.code,
|
||||
current.code === locale.code && 'active'
|
||||
]"
|
||||
@click.prevent="changeLanguage(locale.code)"
|
||||
>
|
||||
<img
|
||||
|
||||
@ -5,12 +5,12 @@ Feature: Internationalization
|
||||
|
||||
Scenario: See english loginpage
|
||||
When I visit the "/login" page
|
||||
Then I can see the english language flag
|
||||
Then I can see the english is selected
|
||||
|
||||
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
|
||||
And I select german
|
||||
Then I can see the german is selected
|
||||
Then There should be a locale cooke set to de
|
||||
When I refresh the page
|
||||
Then I can see the german language flag
|
||||
Then I can see the german is selected
|
||||
|
||||
@ -54,7 +54,7 @@ When('I refresh the page', () => {
|
||||
|
||||
When('I log out through the menu in the top right corner', () => {
|
||||
cy.get('.avatar-menu').click()
|
||||
cy.get('.avatar-menu-popover')
|
||||
cy.get('.locale-menu-popover')
|
||||
.find('a')
|
||||
.contains('Logout')
|
||||
.click()
|
||||
@ -78,14 +78,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 english is selected', () => {
|
||||
cy.get('.login-locale-switch img[alt="English"]')
|
||||
})
|
||||
When('I can see the german language flag', () => {
|
||||
cy.get('.login-locale-switch img[src$="de.svg"]')
|
||||
When('I can see the german is selected', () => {
|
||||
cy.get('.login-locale-switch img[alt="Deutsch"]')
|
||||
})
|
||||
When('I click on the locale switch', () => {
|
||||
cy.get('.login-locale-switch a').click().wait(500)
|
||||
When('I select german', () => {
|
||||
cy.get('.login-locale-switch a')
|
||||
.click()
|
||||
.wait(50)
|
||||
cy.get('.locale-menu-popover a.de')
|
||||
.click()
|
||||
.wait(500)
|
||||
})
|
||||
Then(`There should be a locale cooke set to de`, () => {
|
||||
cy.getCookie('locale').should('have.property', 'value', 'de')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user