131 lines
3.6 KiB
JavaScript
131 lines
3.6 KiB
JavaScript
// https://docs.cypress.io/api/introduction/api.html
|
|
|
|
describe("TRANSLATION", () => {
|
|
it("About form works for all default languages", () => {
|
|
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=contextmenu]").click();
|
|
cy.get('[data-cy="app:nav:log"]').click();
|
|
//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");
|
|
|
|
//-----------------------------------------------------
|
|
//ENGLISH - CustomerLimited
|
|
cy.get("input[name=username]")
|
|
.clear()
|
|
.type("CustomerLimited");
|
|
|
|
// {enter} causes the form to submit
|
|
cy.get("input[name=password]")
|
|
.clear()
|
|
.type("CustomerLimited{enter}");
|
|
|
|
// we should be redirected to /customer-csr-list
|
|
cy.url().should("include", "/customer-csr-list");
|
|
|
|
//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("About AyaNova");
|
|
//client user should *NOT* see the licensed to bit or licensed options
|
|
cy.get("[data-cy='aboutlicensedoptions]").should("not.exist");
|
|
|
|
//LOGOUT
|
|
cy.get("[data-cy=contextmenu]").click();
|
|
cy.get("[data-cy='app:logout']").click();
|
|
cy.url().should("include", "/login");
|
|
|
|
//-----------------------------------------------------
|
|
});
|
|
});
|