Skip to content

Instantly share code, notes, and snippets.

@reboottime
Last active June 14, 2024 02:46
Show Gist options
  • Save reboottime/3b5bed01cf866664b597c0177c02b2ae to your computer and use it in GitHub Desktop.
Save reboottime/3b5bed01cf866664b597c0177c02b2ae to your computer and use it in GitHub Desktop.
API Interception error
// mock GET /organizations, to get the current company metadata
await page.route('**/dashboard/v1/company', (route) => {
apis.getCurrentCompany(route);
});
// mock PUT /organizations, to update the company metadata
await page.route('**/dashboard/v1/company', (route) => {
apis.getCurrentCompany(route);
});
// So this results in the API interception fails as the second one resets the first one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment