eduardo.figueroa7 2 gadus atpakaļ
vecāks
revīzija
253bc0a6ed
1 mainītis faili ar 30 papildinājumiem un 2 dzēšanām
  1. 30
    2
      cypress/e2e/eduardo.cy.ts

+ 30
- 2
cypress/e2e/eduardo.cy.ts Parādīt failu

@@ -1,2 +1,30 @@
1
-// I will E2E test the article page.
2
-// User visits home -> User clicks on "laws or advice" -> List renders with 200
1
+describe("Our app", () => {
2
+  beforeEach(() => {
3
+    cy.intercept(
4
+      { pathname: "/api/getTopicList" },
5
+      {
6
+        fixture: "topics",
7
+      }
8
+    ).as("getTopicList");
9
+
10
+    cy.intercept(
11
+      { pathname: "/api/getTopic" },
12
+      {
13
+        fixture: "article",
14
+      }
15
+    ).as("getTopic");
16
+
17
+    cy.viewport("iphone-x");
18
+    cy.visit("/");
19
+  });
20
+
21
+  it("shows the home page", () => {
22
+    cy.visit("/");
23
+    cy.contains("Bienvenidos");
24
+  });
25
+
26
+  it("shows a video in the home page", () => {
27
+    cy.visit("/");
28
+    cy.get("iframe").should("be.visible");
29
+  });
30
+});