table hover fix

This commit is contained in:
Owen Rees
2023-06-19 23:17:21 +02:00
parent a4a0e0a669
commit ffbc8db21d
9 changed files with 98 additions and 34 deletions
+27
View File
@@ -0,0 +1,27 @@
let tableRows: number;
describe("Data fetching for map", () => {
it("map markers is equal to table rows", () => {
cy.visit("/tournois");
cy.get('[data-cy="tournament-table"]')
.find("tr")
.then((rows) => {
tableRows = rows.length - 1;
});
cy.get(".leaflet-marker-icon").then((markers) => {
expect(markers.length).to.eq(tableRows);
});
});
});
describe("Data fetching from API endpoints", () => {
it("api call should equal website data count", () => {
cy.request("GET", "http://localhost:3000/api/v1/tournaments/france").then(
(response) => {
expect(response.status).to.eq(200);
const responseData = response.body;
const itemCount = responseData.length;
expect(itemCount).to.eq(tableRows);
}
);
});
});
Binary file not shown.
Binary file not shown.
Binary file not shown.