-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eebc8b6
commit 4258fd0
Showing
28 changed files
with
391 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
describe("Internationalization", function () { | ||
it("should login with finnish translation when finnish locale is chosen", () => { | ||
const baseUrl = "http://localhost:" + Cypress.env("port") + "/" | ||
|
||
cy.visit(baseUrl) | ||
|
||
cy.get("#lang-selector").click() | ||
cy.get("li[role=menuitem]").contains("Fi").click() | ||
|
||
cy.get('[alt="CSC Login"]').click() | ||
cy.wait(1000) | ||
|
||
cy.get("[data-testid='logged-in-as'").contains("Kirjautuneena") | ||
}) | ||
|
||
it("should change translation seamlessly", () => { | ||
cy.login() | ||
|
||
cy.get("[data-testid='logged-in-as'").contains("Logged in as") | ||
|
||
cy.get("#lang-selector").click() | ||
cy.get("li[role=menuitem]").contains("Fi").click() | ||
cy.url().should("include", "/fi/") | ||
|
||
cy.get("[data-testid='logged-in-as'").contains("Kirjautuneena") | ||
}) | ||
|
||
it("should navigate with selected locale", () => { | ||
cy.login() | ||
|
||
cy.get("#lang-selector").click() | ||
cy.get("li[role=menuitem]").contains("Fi").click() | ||
|
||
cy.get("button", { timeout: 10000 }).contains("Create Submission").click() | ||
|
||
cy.url().should("include", "/fi/newdraft") | ||
}) | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.