Cypress - New test file not showing in cypress UI

Viewed 1556

Creating a new test file in Cypress folder integration is not showing in the Cypress UI. In this print-screen I have created a new file called: NewTest.spec.js (in green). It is not showing in Cypress. enter image description here It used to work

2 Answers

In case you have a testFiles list defined inside the cypress.json file, Cypress will not include all of spec files found within the integration folder and will instead use that list to populate the suite.

So, check cypress.json and add the new spec file to the appropriate place in the order.

"testFiles": [
     "FirstTest.spec.js",
     "NewTest.spec.js",
     "ThirdTest.spec.js"
]

In the latest version of Cypress, make sure your file is named [filename].cy.js

Related