Current behavior:
I am getting the above error in my code, visiting a webpage and checking it contains the correct URL.
This logic works on other links within the webpage.
describe('Sectors Tab', function () {
it('finds Software Development', function () {
cy.visit('http://www.afd.co.uk/')
cy.contains('Sectors')
.click({force: true})
cy.contains('Software Development')
.click({force: true})
cy.url()
.should('include', '/sectors/software-development/')
})
Desired behavior:
It should return a valid response back saying it has passed the test.
Just like it has done for my other tests:
it('finds Banking and Finance', function () {
cy.visit('http://www.afd.co.uk/')
cy.contains('Sectors')
.click({force: true})
cy.contains('Banking and Finance')
.click({force: true})
cy.url()
.should('include', '/sectors/banks-and-finance/')
})
Image for Above Tests
Steps to reproduce: (app code and test code)
See above for information about test code.
Versions
Chrome: 76
Cypress: 3.4.1
I reported this question in GitHub already, and they closed the issue as it is not an issue with Cypress itself.
The member replied back with the following:
As the error shows, the url does not contain the
/sectors/banks-and-finance/portion.You can see in the passing test that the page navigated to the
/sectors/banks-and-finance/url with the (NEW URL) being logged - in the failing test case this is not logged - the URL is never changing.Cypress is displaying the correct error in this case. Why is your website not navigating? Is it not navigating because of a bug in Cypress? I would have no idea of knowing without a fully reproducible example to run.
Reference: https://github.com/cypress-io/cypress/issues/5069
So on that note, I have no idea what else to try. There are no examples I can give either, as this is an easy accessible webpage and have provided the code.
