diff --git a/cypress.json b/cypress.json index c610e9f5..e943d43c 100644 --- a/cypress.json +++ b/cypress.json @@ -1,6 +1,7 @@ { "baseUrl": "http://localhost:5004", "video": false, "viewportWidth": 1920, - "viewportHeight": 1080 + "viewportHeight": 1080, + "defaultCommandTimeout": 10000 } diff --git a/cypress/integration/home.spec.js b/cypress/integration/home.spec.js index de07ecc7..f71183a2 100644 --- a/cypress/integration/home.spec.js +++ b/cypress/integration/home.spec.js @@ -1,24 +1,25 @@ /** * Copyright (C) 2019 The Software Heritage developers * See the AUTHORS file at the top-level directory of this distribution * License: GNU Affero General Public License version 3, or any later version * See top-level LICENSE file for more information */ const url = '/'; const $ = Cypress.$; describe('Home Page Tests', function() { it('should display positive stats for each category', function() { cy.visit(url) + .wait(3000) // wait counters request result .get('.swh-counter') .then((counters) => { for (let counter of counters) { let innerText = $(counter).text(); const value = parseInt(innerText.replace(/,/g, '')); assert.isAbove(value, 0); } }); }); });