Skip to content

Commit

Permalink
[DUOS-2903][risk=no] Update dataset selection in DAR form (#2451)
Browse files Browse the repository at this point in the history
  • Loading branch information
rushtong authored Feb 13, 2024
1 parent 010464e commit 6c0cd4b
Show file tree
Hide file tree
Showing 4 changed files with 308 additions and 306 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('Data Access Request - Validation', () => {
describe('With Library Cards', () => {
beforeEach(() => {
cy.stub(User, 'getSOsForCurrentUser').returns(userSigningOfficials);
cy.stub(DataSet, 'searchDatasets').returns(Promise.resolve(datasets));
cy.stub(DataSet, 'autocompleteDatasets').returns(Promise.resolve(datasets));
cy.stub(DataSet, 'getDatasetsByIds').returns(Promise.resolve(datasets));
cy.stub(Storage, 'getCurrentUser').returns(user);
cy.stub(User, 'getMe').returns(user);
Expand Down Expand Up @@ -248,7 +248,7 @@ describe('Data Access Request - Validation', () => {
describe('Without Library Cards', () => {
beforeEach(() => {
cy.stub(User, 'getSOsForCurrentUser').returns(userSigningOfficials);
cy.stub(DataSet, 'searchDatasets').returns(Promise.resolve(datasets));
cy.stub(DataSet, 'autocompleteDatasets').returns(Promise.resolve(datasets));
cy.stub(DataSet, 'getDatasetsByIds').returns(Promise.resolve(datasets));
cy.stub(Storage, 'getCurrentUser').returns(userNoLibraryCard);
cy.stub(User, 'getMe').returns(userNoLibraryCard);
Expand Down
4 changes: 2 additions & 2 deletions src/libs/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ export const DataSet = {
return await res.json();
},

searchDatasets: async (query) => {
const url = `${await getApiUrl()}/api/dataset/search?query=${query}`;
autocompleteDatasets: async (query) => {
const url = `${await getApiUrl()}/api/dataset/autocomplete?query=${query}`;
const res = await fetchOk(url, Config.authOpts());
return await res.json();
},
Expand Down
Loading

0 comments on commit 6c0cd4b

Please sign in to comment.