https://cypress.io logo
And I don't believe your intercept URL syntax is c...
# e2e-testing
s
And I don't believe your intercept URL syntax is correct. But the solution depends on your full request URL. You are obviously chopping off the URL origion, so let's add
**
at the beginning, try this:
cy.intercept('GET', '**/api/v1/oktaConfig').as('exp')
and I don't know if you are chopping off the end URL path, if yes then try this:
cy.intercept('GET', '**/api/v1/oktaConfig/*').as('exp')
And as mentioned above this should be moved before the first
cy.visit()
Copy code
Cypress.Commands.add('login', (username, password) => {
  cy.session([username, password], () => {
    cy.intercept('GET', '**/api/v1/oktaConfig/*').as('exp')
      cy.visit('/');
      ...