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

[DT-1056] Replace local config interception with initApplicationConfig #2736

Merged
merged 1 commit into from
Nov 22, 2024
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
6 changes: 1 addition & 5 deletions cypress/component/Auth/auth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ describe('Auth Failure', function () {
describe('Auth Success', function () {
// Intercept configuration calls
beforeEach(() => {
cy.intercept({
method: 'GET',
url: '/config.json',
hostname: 'localhost',
}, {'env': 'ci'});
cy.initApplicationConfig();
cy.stub(OAuth2, 'getConfig').returns({
'authorityEndpoint': Cypress.config().baseUrl,
'clientId': 'clientId'
Expand Down
6 changes: 1 addition & 5 deletions cypress/component/Auth/oidcBroker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ describe('OidcBroker Failure', function () {
describe('OidcBroker Success', function () {
// Intercept configuration calls
beforeEach(() => {
cy.intercept({
method: 'GET',
url: '/config.json',
hostname: 'localhost',
}, {'env': 'ci'});
cy.initApplicationConfig();
cy.stub(OAuth2, 'getConfig').returns({
'authorityEndpoint': Cypress.config().baseUrl,
'clientId': 'clientId'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@

import { mount } from 'cypress/react';
import React from 'react';
import {Storage} from '../../../src/libs/storage';
import DatasetFilterList from '../../../src/components/data_search/DatasetFilterList';

const duosUser = {
isSigningOfficial: false,
};

describe('Data Library Filters', () => {
// Intercept configuration calls
beforeEach(() => {
cy.intercept({
method: 'GET',
url: '/config.json',
hostname: 'localhost',
}, { 'env': 'ci' });
cy.initApplicationConfig();
});

it('Renders the data library filters', () => {
Expand Down
7 changes: 1 addition & 6 deletions cypress/component/DataSearch/dataset_search_page.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ const duosUser = {
};

describe('Data Library', () => {
// Intercept configuration calls
beforeEach(() => {
cy.intercept({
method: 'GET',
url: '/config.json',
hostname: 'localhost',
}, { 'env': 'ci' });
cy.initApplicationConfig();
});

it('Renders the data library without a query', () => {
Expand Down
6 changes: 1 addition & 5 deletions cypress/component/TermsOfService/tos_acceptance.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ const mocks = {
describe('Terms of Service Acceptance Page', function () {
// Intercept configuration calls
beforeEach(async () => {
cy.intercept({
method: 'GET',
url: '/config.json',
hostname: 'localhost',
}, {'env': 'ci'});
cy.initApplicationConfig();
cy.stub(OAuth2, 'getConfig').returns({
'authorityEndpoint': 'authorityEndpoint',
'clientId': 'clientId'
Expand Down
7 changes: 1 addition & 6 deletions cypress/component/UserProfile/user_profile.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@ const duosUser = {
};

describe('User Profile', () => {
// Intercept configuration calls
beforeEach(() => {
cy.intercept({
method: 'GET',
url: '/config.json',
hostname: 'localhost',
}, {'env': 'ci'});
cy.initApplicationConfig();
});

it('Renders the user profile page', () => {
Expand Down
7 changes: 1 addition & 6 deletions cypress/component/utils/metrics.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ import eventList from '../../../src/libs/events';

describe('Metrics Tests', function () {

// Intercept configuration calls
beforeEach(() => {
cy.intercept({
method: 'GET',
url: '/config.json',
hostname: 'localhost',
}, {'env': 'ci'});
cy.initApplicationConfig();
});

Cypress._.each(Object.keys(eventList), (eventType) => {
Expand Down
Loading