Skip to content

Commit

Permalink
tests: cypress tests for the page title
Browse files Browse the repository at this point in the history
  • Loading branch information
cramakri committed Jun 20, 2022
1 parent 3f73ec4 commit 5bcd599
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions e2e/cypress/integration/local/datasets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ describe("display a dataset", () => {
cy.get_cy("list-card-title").contains(datasetName).click();
cy.wait("@getDatasetById")
.its("response.body").then( dataset => {
// Check that the title is correct
cy.get("title").first().should("contain.text", "abcd • Dataset • Dataset for testing purposes");
// the dataset title is displayed
cy.get_cy("dataset-title").should("contain.text", dataset?.title);
// files are displayed
Expand Down
4 changes: 4 additions & 0 deletions e2e/cypress/integration/local/project.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe("display a project", () => {
});

it("displays the project overview page", () => {
cy.wait("@getProject");
cy.wait("@getReadme");
// Check that the project header is shown
cy.get("[data-cy='project-header']").should(
Expand All @@ -37,6 +38,9 @@ describe("display a project", () => {
);
// Check that the readme is shown
cy.get("h1").first().should("contain.text", "local test project");

// Check that the title is correct
cy.get("title").first().should("contain.text", "local-test-project • Project • e2e/local-test-project");
});

it("displays project settings", () => {
Expand Down

0 comments on commit 5bcd599

Please sign in to comment.