Skip to content

Commit bd56dad

Browse files
committed
test(cypress): make smoke workspace assertions CI-stable
1 parent 912cf6b commit bd56dad

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

cypress/e2e/smoke/smoke.core.cy.js

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,26 @@ describe("Smoke: Core Application", () => {
4444
cy.visit("/app");
4545

4646
cy.get('[data-id="Time Tracking"] > .icon-caption > .icon-title').click();
47-
cy.get(".h1", { timeout: 15000 })
48-
.contains("Time Tracking")
49-
.should("be.visible")
50-
.and("contain.text", "Time Tracking");
51-
cy.get(".ce-header > .text-muted").should(
52-
"contain.text",
53-
"Log hours, plan weeks, and track targets"
54-
);
47+
cy.location("pathname", { timeout: 15000 }).should((pathname) => {
48+
expect(pathname).to.match(
49+
/^\/(desk\/time-tracking|app\/time-tracking|app\/workspace\/time-tracking)(\/.*)?$/
50+
);
51+
});
52+
cy.contains("body", "Time Tracking", { timeout: 15000 });
5553

56-
cy.get('div[item-name="Weekly Booking"] span.sidebar-item-label').should("be.visible");
54+
cy.contains('div[item-name="Weekly Booking"] span.sidebar-item-label', "Weekly Booking", {
55+
timeout: 15000,
56+
}).should("be.visible");
5757

58-
cy.get('div[item-name="Time Booking"] span.sidebar-item-label').should("be.visible");
58+
cy.contains('div[item-name="Time Booking"] span.sidebar-item-label', "Time Booking", {
59+
timeout: 15000,
60+
}).should("be.visible");
5961

60-
cy.get('div[item-name="My Project Access"] span.sidebar-item-label').should("be.visible");
62+
cy.contains(
63+
'div[item-name="My Project Access"] span.sidebar-item-label',
64+
"My Project Access",
65+
{ timeout: 15000 }
66+
).should("be.visible");
6167

6268
cy.get('[item-name="Time Tracking Settings"] > .standard-sidebar-item').should(
6369
"be.visible"

0 commit comments

Comments
 (0)