Skip to content

Commit

Permalink
feat: add stub for ecm call
Browse files Browse the repository at this point in the history
  • Loading branch information
rushtong committed Dec 4, 2024
1 parent 66737a6 commit d119982
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cypress/component/UserProfile/user_profile.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import {mount} from 'cypress/react';
import React from 'react';
import {Storage} from '../../../src/libs/storage';
import {AuthenticateNIH} from '../../../src/libs/ajax/AuthenticateNIH';
import {User} from '../../../src/libs/ajax/User';
import {Institution} from '../../../src/libs/ajax/Institution';
import UserProfile from '../../../src/pages/user_profile/UserProfile';
Expand Down Expand Up @@ -32,6 +33,7 @@ describe('User Profile', () => {
cy.stub(User, 'getMe').returns(duosUser);
cy.stub(User, 'getApprovedDatasets').returns([]);
cy.stub(User, 'getAcknowledgements').returns({});
cy.stub(AuthenticateNIH, 'getECMeRACommonsStatus').returns(undefined);
cy.intercept(
{method: 'PUT', url: '**/user'},
{statusCode: 200, body: duosUser}
Expand Down
1 change: 1 addition & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Cypress.Commands.add('initApplicationConfig', () => {
'ontologyApiUrl': '',
'terraUrl': '',
'tdrApiUrl': '',
'ecmApiUrl': '',
'errorApiKey': '',
'profileUrl': '',
'nihUrl': '',
Expand Down

0 comments on commit d119982

Please sign in to comment.