diff --git a/cypress/integration/home.spec.js b/cypress/integration/home.spec.js new file mode 100644 --- /dev/null +++ b/cypress/integration/home.spec.js @@ -0,0 +1,24 @@ +/** + * 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 positive stats for each category', function() { + cy.visit(url); + cy.get('.swh-counter') + .then((els) => { + for(let el of els) { + let innerText = $(el).text(); + const value = parseInt(innerText.replace(/,/g, '')); + assert.isAbove(value, 0); + } + }); + }) +}) \ No newline at end of file