Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

Add Cache-control no store on dev #92

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@
// Check if auth is disabled (for a local development environment).

cy.visit(''); // visits baseUrl which is set in plugins.js
cy.window().then((win: any) => {

Check warning on line 48 in cypress/support/commands.ts

View workflow job for this annotation

GitHub Actions / Run linter and tests

Unexpected any. Specify a different type
if (win.SERVER_FLAGS?.authDisabled) {
cy.log('skipping login, console is running with auth disabled');

cy.contains('.pf-c-nav__link', 'Networking').click();
cy.contains('.pf-c-nav__link', 'NodeNetworkConfigurationPolicy').should('be.visible');
cy.contains('li[data-test="nav"]', 'Networking').click();
cy.contains('*[data-test-id="policy-nav-list"]', 'NodeNetworkConfigurationPolicy').should(
'be.visible',
);
return;
}

Expand All @@ -71,14 +73,16 @@
cy.get(submitButton).click();
// wait for virtualization page

cy.contains('.pf-c-nav__link', 'Networking').click();
cy.contains('.pf-c-nav__link', 'NodeNetworkConfigurationPolicy').should('be.visible');
cy.contains('li[data-test="nav"]', 'Networking').click();
cy.contains('*[data-test-id="policy-nav-list"]', 'NodeNetworkConfigurationPolicy').should(
'be.visible',
);
});
});

Cypress.Commands.add('logout', () => {
// Check if auth is disabled (for a local development environment).
cy.window().then((win: any) => {

Check warning on line 85 in cypress/support/commands.ts

View workflow job for this annotation

GitHub Actions / Run linter and tests

Unexpected any. Specify a different type
if (win.SERVER_FLAGS?.authDisabled) {
cy.log('skipping logout, console is running with auth disabled');
return;
Expand Down
1 change: 1 addition & 0 deletions webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const config: WebpackConfiguration & {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
'Access-Control-Allow-Headers': 'X-Requested-With, Content-Type, Authorization',
'Cache-Control': 'no-store',
},
devMiddleware: {
writeToDisk: true,
Expand Down