Skip to content

Commit 0627a86

Browse files
committed
Add interceptor
1 parent 750b5cb commit 0627a86

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/fyllut/cypress/e2e/components/general.cy.ts

+2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ describe('React components', () => {
1515
describe('General', () => {
1616
describe('Fill in form and view summary, paper', () => {
1717
beforeEach(() => {
18+
cy.intercept('GET', 'https://www.nav.no/fyllut/countries*').as('getCountrySelect');
1819
cy.visit('/fyllut/customcomps/dineopplysninger?sub=paper');
1920
cy.wait('@getConfig');
2021
cy.wait('@getForm');
2122
cy.wait('@getGlobalTranslations');
2223
cy.wait('@getTranslations');
2324
cy.wait('@getCountries');
2425
cy.wait('@getCurrencies');
26+
cy.wait('@getCountrySelect');
2527
});
2628

2729
it('reflects changes on summary page when editing data', () => {

packages/fyllut/cypress/support/commands.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ Cypress.Commands.add('defaultIntercepts', () => {
8383
cy.intercept('POST', '/amplitude/collect-auto').as('amplitudeLogging');
8484
cy.intercept('POST', '/fyllut/api/log*', { body: 'ok' }).as('logger');
8585
cy.intercept('GET', '/fyllut/api/config*').as('getConfig');
86-
cy.intercept('GET', /fyllut\/api\/countries.*/).as('getCountries');
86+
cy.intercept('GET', '/fyllut/api/countries*').as('getCountries');
8787
cy.intercept('GET', '/fyllut/api/global-translations/*').as('getGlobalTranslations');
88-
cy.intercept('GET', /fyllut\/api\/common-codes\/currencies.*/).as('getCurrencies');
88+
cy.intercept('GET', '/fyllut/api/common-codes/currencies*').as('getCurrencies');
8989
cy.intercept('GET', '/fyllut/api/translations/*').as('getTranslations');
9090
cy.intercept('GET', '/fyllut/api/forms/*').as('getForm');
9191
return cy;

0 commit comments

Comments
 (0)