From 2d3f9d0d64ad3fb166d2fb72d9632c42dfb926d7 Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Tue, 13 Feb 2024 10:26:05 -0500 Subject: [PATCH] Add Cypress test --- cypress/integration/version/task_table.ts | 16 ++++++++++++++++ src/components/TasksTable/index.tsx | 1 + 2 files changed, 17 insertions(+) diff --git a/cypress/integration/version/task_table.ts b/cypress/integration/version/task_table.ts index c119afc102..4af9e0589f 100644 --- a/cypress/integration/version/task_table.ts +++ b/cypress/integration/version/task_table.ts @@ -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"; diff --git a/src/components/TasksTable/index.tsx b/src/components/TasksTable/index.tsx index 1abdd6f79f..4889cc52a5 100644 --- a/src/components/TasksTable/index.tsx +++ b/src/components/TasksTable/index.tsx @@ -178,6 +178,7 @@ const getColumnDefs = ({ render: (status: string, { dependsOn, execution, id }) => dependsOn?.length && status === TaskStatus.Blocked ? (