2

I have updated my cypress version to new version V 10.0.3 and it is running commented code lines in the test case.

below is the test case I have written and the commented lines are also included.

 it.only('Check the item upload file validations', () => {
    //cy.get('[icon="fa fa-cloud-upload"]').click();
    // cy.get('#itemListController')
    //     .attachFile('itemfile.xlsx');
    //     cy.get('.p-float-label > [type="submit"]').click()
})

This is cypress excuting it in the browser

Cypress executing commented code

Avishka Perera
  • 416
  • 1
  • 5
  • 15

2 Answers2

0

First exit from the tests, close the test runner. Make changes and save it. The again start executing the tests from scratch. If you want your changes to be visible on the go, add this to your cypress config file -

watchForFileChanges: true
Alapan Das
  • 17,144
  • 3
  • 29
  • 52
0

your answer worked @Alapan Das , I noticed that cypress have left Integration folder of previous cypress version and created e2e folder with same changes of previous integration folder.

I was working with integration folder which they mentioned they are migrating in the new version installation, but it was left behind by them for one test .js file it seems for the file i was working on.

test runner was running the e2e folder test.js file even if i was making changes for the integration folder test.js file through the test runner.

Avishka Perera
  • 416
  • 1
  • 5
  • 15