Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Add Cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
sophstad committed Feb 13, 2024
1 parent e399f93 commit 2d3f9d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cypress/integration/version/task_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,22 @@ describe("Task table", () => {
});
});
});

describe("blocked tasks", () => {
beforeEach(() => {
cy.visit(pathTasks);
waitForTaskTable();
});

it("shows the blocking tasks when hovering over status badge", () => {
cy.dataCy("depends-on-tooltip").should("not.exist");
cy.dataCy("task-status-badge").contains("Blocked").trigger("mouseover");
cy.dataCy("depends-on-tooltip").should("be.visible");
cy.dataCy("depends-on-tooltip").contains(
"Depends on tasks: “test-migrations”, “test-graphql”",
);
});
});
});

const dataCyTableDataRows = ".ant-table-cell > .cy-task-table-col-NAME";
Expand Down
1 change: 1 addition & 0 deletions src/components/TasksTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ const getColumnDefs = ({
render: (status: string, { dependsOn, execution, id }) =>
dependsOn?.length && status === TaskStatus.Blocked ? (
<Tooltip
data-cy="depends-on-tooltip"
justify="middle"
trigger={
<span>
Expand Down

0 comments on commit 2d3f9d0

Please sign in to comment.