Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about Cypress timeout #9

Open
systemctls opened this issue May 23, 2021 · 0 comments
Open

about Cypress timeout #9

systemctls opened this issue May 23, 2021 · 0 comments

Comments

@systemctls
Copy link

// test.spec.js

describe('basic test', () => {
it('should hit the API', () => {
const url = 'https://openlibrary.org/works/OL45883W.json';

cy.intercept({
  method: 'GET',
  url,
}).as('getBook');

cy.request({
  method: 'GET',
  url,
});

cy.wait('@getBook').then((interception) => {
  console.log(interception);
});

});
});

hi,Is there a solution to this problem ?

I see this in the document:cy.intercept() cannot be debugged using cy.request()! Cypress only intercepts requests made by your front-end application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant