Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Wait for route interception in home.spec.ts
Sebastian Martinez committed 3 years ago
commit 8e9822d495935d0f385d143b755a5614417b2d3d
parent 4cd702e412c295a7a2d65e26403f05cdc32d72d0
1 file changed +2 -22
modified cypress/e2e/home.spec.ts
@@ -3,31 +3,10 @@ import { MockProvider } from "@rsksmart/mock-web3-provider";

describe("Landing page", () => {
  it("Loads projects", () => {
-
    cy.intercept("https://willow.radicle.garden:8777/", {
-
      fixture: "projectHome.json",
-
    });
-
    cy.intercept("https://willow.radicle.garden:8777/v1/peer", {
-
      fixture: "projectPeer.json",
-
    });
-
    cy.intercept("https://pine.radicle.garden:8777/", {
-
      fixture: "projectHome.json",
-
    });
-
    cy.intercept("https://pine.radicle.garden:8777/v1/peer", {
-
      fixture: "projectPeer.json",
-
    });
-
    cy.intercept("https://maple.radicle.garden:8777/", {
-
      fixture: "projectHome.json",
-
    });
-
    cy.intercept("https://maple.radicle.garden:8777/v1/peer", {
-
      fixture: "projectPeer.json",
-
    });
-
    cy.intercept("https://maple.radicle.garden:8777/v1/projects/*", {
-
      fixture: "projectInfo.json",
-
    });
    cy.intercept(
      { pathname: "/v1/projects/*" },
      { fixture: "projectInfo.json" },
-
    );
+
    ).as("projectInfo");
    cy.visit("/", {
      onBeforeLoad(win) {
        const address = "0xB98bD7C7f656290071E52D1aA617D9cB4467Fd6D";
@@ -40,6 +19,7 @@ describe("Landing page", () => {
        });
      },
    });
+
    cy.wait("@projectInfo");
    cy.get(".project .name")
      .first()
      .should("have.text", "bright-forest-protocol");