Skip to content

Commit

Permalink
more fixes for test maker (#4973)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisman authored Aug 22, 2024
1 parent 69dde84 commit 8e59189
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shared/api/cbioportalInternalClientInstance.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CBioPortalAPIInternal } from 'cbioportal-ts-api-client';
import { getLoadConfig } from 'config/config';
import { getBrowserWindow } from 'cbioportal-frontend-commons';
import { getBrowserWindow, hashString } from 'cbioportal-frontend-commons';
import { toJS } from 'mobx';
import { reportValidationResult, validate } from 'shared/api/validation';
import _ from 'lodash';
Expand Down Expand Up @@ -52,8 +52,8 @@ function proxyColumnStore(client: any, endpoint: string) {
setTimeout(() => {
makeTest(params, url, matchedMethod[0]);
}, 1000);

validate(url, params, matchedMethod[0], 0).then(
const hash = hashString(JSON.stringify({ data: params, url }));
validate(url, params, matchedMethod[0], hash).then(
(result: any) => {
reportValidationResult(result);
}
Expand Down
2 changes: 2 additions & 0 deletions src/shared/api/testMaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export async function makeTest(data: any, url: string, label: string) {

if (getBrowserWindow().localStorage.getItem(SAVE_TEST_KEY))
saveTest(hash, entry);

return entry;
}

function saveTest(hash: number, entry: any) {
Expand Down

0 comments on commit 8e59189

Please sign in to comment.