Tried to fix stability
Signed-off-by: Nikolaj Geisle <niko737@edu.ucl.dk>
This commit is contained in:
@@ -18,30 +18,36 @@ context('System Information', () => {
|
||||
cy.get('.table').find('tr').should('have.length', 10);
|
||||
|
||||
});
|
||||
|
||||
it('Checks language displays correctly after switching', () => {
|
||||
//Navigate to edit user and change language
|
||||
openSystemInformation();
|
||||
cy.contains('Current Culture').parent().should('contain', 'en-US');
|
||||
cy.contains('Current UI Culture').parent().should('contain', 'en-US');
|
||||
cy.get('.umb-button__content').click();
|
||||
cy.get('[data-element="global-user"]').click();
|
||||
cy.get('[alias="editUser"]').click();
|
||||
cy.get('[name="culture"]').select('string:da-DK', {timeout: 10000, force: true});
|
||||
cy.umbracoButtonByLabelKey('buttons_save').click({force: true});
|
||||
//Refresh site to display new language
|
||||
cy.reload();
|
||||
openSystemInformation();
|
||||
//Assert
|
||||
cy.contains('Current Culture').parent().should('contain', 'da-DK');
|
||||
cy.contains('Current UI Culture').parent().should('contain', 'da-DK');
|
||||
cy.get('.umb-button__content').last().click();
|
||||
cy.reload();
|
||||
//Clean
|
||||
cy.get('[data-element="global-user"]').click();
|
||||
cy.get('[alias="editUser"]').click();
|
||||
cy.get('.input-block-level', {timeout: 10000}).last().select('string:en-US', {timeout: 10000, force: true});
|
||||
cy.umbracoButtonByLabelKey('buttons_save').click({force: true});
|
||||
cy.reload();
|
||||
|
||||
context('Language switching', () => {
|
||||
|
||||
afterEach(() => {
|
||||
cy.get('[data-element="global-user"]').click();
|
||||
cy.get('[alias="editUser"]').click({timeout: 10000});
|
||||
cy.get('.input-block-level', {timeout: 10000}).last().select('string:en-US', {timeout: 10000, force: true});
|
||||
cy.umbracoButtonByLabelKey('buttons_save').click({force: true});
|
||||
cy.reload();
|
||||
});
|
||||
|
||||
it('Checks language displays correctly after switching', () => {
|
||||
|
||||
//Navigate to edit user and change language
|
||||
openSystemInformation();
|
||||
cy.contains('Current Culture').parent().should('contain', 'en-US');
|
||||
cy.contains('Current UI Culture').parent().should('contain', 'en-US');
|
||||
cy.get('.umb-button__content').click();
|
||||
cy.get('[data-element="global-user"]').click();
|
||||
cy.get('[alias="editUser"]').click();
|
||||
cy.get('[name="culture"]').select('string:da-DK', {timeout: 10000, force: true});
|
||||
cy.umbracoButtonByLabelKey('buttons_save').click({force: true});
|
||||
//Refresh site to display new language
|
||||
cy.reload();
|
||||
openSystemInformation();
|
||||
//Assert
|
||||
cy.contains('Current Culture').parent().should('contain', 'da-DK');
|
||||
cy.contains('Current UI Culture').parent().should('contain', 'da-DK');
|
||||
cy.get('.umb-button__content').last().click();
|
||||
cy.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user