e2e translations and about form
This commit is contained in:
99
ayanova/tests/e2e/specs/translation-about.js
Normal file
99
ayanova/tests/e2e/specs/translation-about.js
Normal file
@@ -0,0 +1,99 @@
|
||||
// https://docs.cypress.io/api/introduction/api.html
|
||||
|
||||
describe("Login", () => {
|
||||
it("Successfully logs in as french user about form works", () => {
|
||||
cy.visit("/login");
|
||||
|
||||
//FRENCH
|
||||
cy.get("input[name=username]")
|
||||
.clear()
|
||||
.type("fr");
|
||||
|
||||
// {enter} causes the form to submit
|
||||
cy.get("input[name=password]")
|
||||
.clear()
|
||||
.type("fr{enter}");
|
||||
|
||||
// we should be redirected to /dashboard
|
||||
cy.url().should("include", "/home-dashboard");
|
||||
|
||||
//nav to about form
|
||||
cy.get("[data-cy=contextmenu]").click();
|
||||
cy.get('[data-cy="app:nav:abt"]').click();
|
||||
cy.url().should("include", "/about");
|
||||
|
||||
//ensure there is french on the form
|
||||
//title
|
||||
cy.contains("À propos d'AyaNova");
|
||||
//server section
|
||||
cy.contains("Navigateur");
|
||||
//open log
|
||||
cy.get('[data-cy="app:nav:log"] > .v-btn__content').click();
|
||||
cy.url().should("include", "/applog");
|
||||
|
||||
//LOGOUT
|
||||
cy.get("[data-cy=contextmenu]").click();
|
||||
cy.get("[data-cy='app:logout']").click();
|
||||
cy.url().should("include", "/login");
|
||||
//-----------------------------------------------------
|
||||
//SPANISH
|
||||
cy.get("input[name=username]")
|
||||
.clear()
|
||||
.type("es");
|
||||
|
||||
// {enter} causes the form to submit
|
||||
cy.get("input[name=password]")
|
||||
.clear()
|
||||
.type("es{enter}");
|
||||
|
||||
// we should be redirected to /dashboard
|
||||
cy.url().should("include", "/home-dashboard");
|
||||
|
||||
//nav to about form
|
||||
cy.get("[data-cy=contextmenu]").click();
|
||||
cy.get('[data-cy="app:nav:abt"]').click();
|
||||
|
||||
//ensure there is translated text on the form
|
||||
//title
|
||||
cy.contains("Acerca de AyaNova");
|
||||
//server section
|
||||
cy.contains("Navegador");
|
||||
|
||||
//LOGOUT
|
||||
cy.get("[data-cy=contextmenu]").click();
|
||||
cy.get("[data-cy='app:logout']").click();
|
||||
cy.url().should("include", "/login");
|
||||
|
||||
//-------------------------
|
||||
//-----------------------------------------------------
|
||||
//GERMAN
|
||||
cy.get("input[name=username]")
|
||||
.clear()
|
||||
.type("de");
|
||||
|
||||
// {enter} causes the form to submit
|
||||
cy.get("input[name=password]")
|
||||
.clear()
|
||||
.type("de{enter}");
|
||||
|
||||
// we should be redirected to /dashboard
|
||||
cy.url().should("include", "/home-dashboard");
|
||||
|
||||
//nav to about form
|
||||
cy.get("[data-cy=contextmenu]").click();
|
||||
cy.get('[data-cy="app:nav:abt"]').click();
|
||||
|
||||
//ensure there is translated text on the form
|
||||
//title
|
||||
cy.contains("Über AyaNova");
|
||||
//license to (uniquely german)
|
||||
cy.contains("Registrierter Benutzer");
|
||||
|
||||
//LOGOUT
|
||||
cy.get("[data-cy=contextmenu]").click();
|
||||
cy.get("[data-cy='app:logout']").click();
|
||||
cy.url().should("include", "/login");
|
||||
|
||||
//-------------------------
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user