feat: implement global loading indicators and refactor activity feed tests
This commit is contained in:
@@ -31,7 +31,8 @@ describe("/activity feed", () => {
|
||||
}
|
||||
|
||||
function assertSignedInAndLanded() {
|
||||
cy.contains(/live feed/i, { timeout: 30_000 }).should("be.visible");
|
||||
cy.waitForAppLoaded();
|
||||
cy.contains(/live feed/i).should("be.visible");
|
||||
}
|
||||
|
||||
it("auth negative: signed-out user cannot access /activity", () => {
|
||||
@@ -70,7 +71,6 @@ describe("/activity feed", () => {
|
||||
cy.visit("/activity");
|
||||
assertSignedInAndLanded();
|
||||
|
||||
cy.wait("@activityList");
|
||||
cy.contains("CI hardening").should("be.visible");
|
||||
cy.contains("Hello world").should("be.visible");
|
||||
});
|
||||
@@ -91,7 +91,6 @@ describe("/activity feed", () => {
|
||||
cy.visit("/activity");
|
||||
assertSignedInAndLanded();
|
||||
|
||||
cy.wait("@activityList");
|
||||
cy.contains(/waiting for new comments/i).should("be.visible");
|
||||
});
|
||||
|
||||
@@ -111,7 +110,6 @@ describe("/activity feed", () => {
|
||||
cy.visit("/activity");
|
||||
assertSignedInAndLanded();
|
||||
|
||||
cy.wait("@activityList");
|
||||
cy.contains(/unable to load feed|boom/i).should("be.visible");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -10,6 +10,7 @@ describe("Clerk login", () => {
|
||||
|
||||
// After login, user should be able to access protected route.
|
||||
cy.visit("/activity");
|
||||
cy.contains(/live feed/i, { timeout: 30_000 }).should("be.visible");
|
||||
cy.waitForAppLoaded();
|
||||
cy.contains(/live feed/i).should("be.visible");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -14,7 +14,8 @@ describe("Organizations (PR #61)", () => {
|
||||
cy.clerkSignIn({ strategy: "email_code", identifier: email });
|
||||
|
||||
cy.visit("/organization");
|
||||
cy.contains(/members\s*&\s*invites/i, { timeout: 30_000 }).should("be.visible");
|
||||
cy.waitForAppLoaded();
|
||||
cy.contains(/members\s*&\s*invites/i).should("be.visible");
|
||||
|
||||
// Deterministic assertion across roles:
|
||||
// - if user is admin: invite button enabled
|
||||
|
||||
Reference in New Issue
Block a user