diff --git a/cypress/integration/list_zap_all_spec.js b/cypress/integration/list_zap_all_spec.js
index 4a50552..243ff45 100644
--- a/cypress/integration/list_zap_all_spec.js
+++ b/cypress/integration/list_zap_all_spec.js
@@ -15,21 +15,21 @@ describe("test list all products", function() {
it("contains list first page", function() {
cy.wait(1000);
cy.get("[data-cy=list-container]")
- .find("a")
+ .find("> div")
.should("have.length", 20);
cy.get("[data-cy=7baf2775d4a2]").should("not.be.visible");
cy.get("[data-cy=a0f9d9647551]").should("not.be.visible");
- cy.contains("fed26dbe5881");
- cy.contains("3e1b5315da17");
+ cy.contains("Apartamento para Locação, 77m²");
+ cy.contains("Apartamento para Locação, 656m²");
});
it("click next page", function() {
cy.get("[data-cy=next]").click();
});
it("contains page 2", function() {
cy.get("[data-cy=b154e19dcf71]").should("not.be.visible");
- cy.contains("45e188400618");
+ cy.contains("Apartamento à Venda, 150m²");
cy.get("[data-cy=list-container]")
- .find("a")
+ .find("> div")
.should("have.length", 20);
});
it("click last page", function() {
@@ -37,9 +37,9 @@ describe("test list all products", function() {
});
it("contains last page", function() {
cy.get("[data-cy=c8bcd9880342]").should("be.visible");
- cy.contains("3a1de7365c7b");
+ cy.contains("Apartamento à Venda, 360m²");
cy.get("[data-cy=list-container]")
- .find("a")
+ .find("> div")
.should("have.length", 20);
});
it("click previous page", function() {
@@ -47,9 +47,9 @@ describe("test list all products", function() {
});
it("contains page 19", function() {
cy.get("[data-cy=5d63d877585f]").should("be.visible");
- cy.contains("ff064a715bad");
+ cy.contains("Apartamento para Locação, 140m²");
cy.get("[data-cy=list-container]")
- .find("a")
+ .find("> div")
.should("have.length", 20);
});
it("click first page", function() {
@@ -57,9 +57,9 @@ describe("test list all products", function() {
});
it("contains first page", function() {
cy.get("[data-cy=7baf2775d4a2]").should("not.be.visible");
- cy.contains("3e1b5315da17");
+ cy.contains("Apartamento para Locação, 656m²");
cy.get("[data-cy=list-container]")
- .find("a")
+ .find("> div")
.should("have.length", 20);
});
it("click next page", function() {
@@ -67,13 +67,15 @@ describe("test list all products", function() {
});
it("contains page 2", function() {
cy.get("[data-cy=b154e19dcf71]").should("not.be.visible");
- cy.contains("45e188400618");
+ cy.contains("Apartamento à Venda, 150m²");
cy.get("[data-cy=list-container]")
- .find("a")
+ .find("> div")
.should("have.length", 20);
});
it("click one item", function() {
- cy.get("[data-cy=168c4f8d0a2e]").click();
+ cy.get("[data-cy=168c4f8d0a2e]")
+ .find("[data-cy=link-detail]")
+ .click();
cy.url().should("include", "zap/168c4f8d0a2e");
});
it("contains text", function() {
@@ -82,25 +84,25 @@ describe("test list all products", function() {
cy.contains("900000");
});
it("contains slider", function() {
- cy.get("#slider-slides")
+ cy.get(".slider-slides")
.should("be.visible")
.find("img")
.should("have.length", 5);
});
it("navigate slider", function() {
- cy.get("#next").click();
+ cy.get(".next").click();
cy.wait(300);
- cy.get("#next").click();
+ cy.get(".next").click();
cy.wait(300);
- cy.get("#next").click();
+ cy.get(".next").click();
cy.wait(300);
- cy.get("#previous").click();
+ cy.get(".previous").click();
cy.wait(300);
- cy.get("#previous").click();
+ cy.get(".previous").click();
cy.wait(300);
- cy.get("#previous").click();
+ cy.get(".previous").click();
cy.wait(300);
- cy.get("#previous").click();
+ cy.get(".previous").click();
});
});
});
diff --git a/src/App.js b/src/App.js
index 42f8195..8813298 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,7 +1,7 @@
import React from "react";
import { Switch, Route } from "react-router-dom";
import Home from "./components/Home";
-import ZapList from "./components/ZapList";
+import List from "./components/List";
import ZapItemDetail from "./components/ZapItemDetail";
import { css } from "glamor";
@@ -19,7 +19,7 @@ const App = () => (