Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ describe('assay-importRun.api', () => {
const run = await getRunQueryRow(server, ASSAY_A_NAME, runId, topFolderOptions);
const expectedUrl = `/${encodeURIComponent(PROJECT_NAME)}/core-downloadFileLink.view?propertyId=`;
const runBatchField = `Batch/${BATCH_FILE_FIELD_NAME}`;
expect(run[runBatchField].value).toEqual(`assaydata/${batchFileName}`);
expect(run[runBatchField].value.replaceAll('\\', '/')).toEqual(`assaydata/${batchFileName}`);
expect(run[runBatchField].url).toContain(expectedUrl);
expect(run[RUN_FILE_FIELD_NAME].value).toEqual(`assaydata/${runFileName}`);
expect(run[RUN_FILE_FIELD_NAME].value.replaceAll('\\', '/')).toEqual(`assaydata/${runFileName}`);
expect(run[RUN_FILE_FIELD_NAME].url).toContain(expectedUrl);

// Verify audit log
Expand Down Expand Up @@ -504,9 +504,9 @@ describe('assay-importRun.api', () => {
const run = await getRunQueryRow(server, ASSAY_A_NAME, runId, topFolderOptions);
const expectedUrl = `/${encodeURIComponent(PROJECT_NAME)}/core-downloadFileLink.view?propertyId=`;
const runBatchField = `Batch/${BATCH_FILE_FIELD_TWO_NAME}`;
expect(run[runBatchField].value).toEqual(`assaydata/${batchFileName}`);
expect(run[runBatchField].value.replaceAll('\\', '/')).toEqual(`assaydata/${batchFileName}`);
expect(run[runBatchField].url).toContain(expectedUrl);
expect(run[RUN_FILE_FIELD_NAME].value).toEqual(`assaydata/${runFileName}`);
expect(run[RUN_FILE_FIELD_NAME].value.replaceAll('\\', '/')).toEqual(`assaydata/${runFileName}`);
expect(run[RUN_FILE_FIELD_NAME].url).toContain(expectedUrl);

// Verify audit log
Expand Down
8 changes: 6 additions & 2 deletions experiment/src/client/test/integration/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ async function verifyDomainCreateFailure(server: IntegrationTestServer, domainTy
}, {...folderOptions, ...userOptions});

expect(badDomainNameResp['body']['success']).toBeFalsy();
expect(badDomainNameResp['body']['exception']).toBe(error.replace('REPLACE', badDomainName));
expect(badDomainNameResp['body']['exception']).toBe(error.replace('REPLACE', () => badDomainName));
}

async function verifyDomainUpdateFailure(server: IntegrationTestServer, domainId: number, domainURI: string, dataTypeRowId/*needed for updating dataclass*/: number, badDomainName: string, error: string, folderOptions: RequestOptions, userOptions: RequestOptions, domainFields?: any[]) {
Expand All @@ -488,7 +488,7 @@ async function verifyDomainUpdateFailure(server: IntegrationTestServer, domainId
const badDomainNameResp = await server.post('property', 'saveDomain', updatedDomainPayload, {...folderOptions, ...userOptions});

expect(badDomainNameResp['body']['success']).toBeFalsy();
expect(badDomainNameResp['body']['exception']).toBe(error.replace('REPLACE', badDomainName));
expect(badDomainNameResp['body']['exception']).toBe(error.replace('REPLACE', () => badDomainName));
}

async function verifyDomainCreateSuccess(server: IntegrationTestServer, domainType: string, domainName: string, folderOptions: RequestOptions, userOptions: RequestOptions) {
Expand All @@ -502,6 +502,8 @@ async function verifyDomainCreateSuccess(server: IntegrationTestServer, domainTy
}
}, {...folderOptions, ...userOptions}).expect((result) => {
const domain = JSON.parse(result.text);
expect(domain).toHaveProperty('domainId');
expect(domain).toHaveProperty('domainURI');
domainId = domain.domainId;
domainURI = domain.domainURI;
return true;
Expand Down Expand Up @@ -626,6 +628,8 @@ export async function verifyRequiredLineageInsertUpdate(server: IntegrationTestS
}
}, {...topFolderOptions, ...designerReaderOptions}).expect((result) => {
const domain = JSON.parse(result.text);
expect(domain).toHaveProperty('domainId');
expect(domain).toHaveProperty('domainURI');
childDomainId = domain.domainId;
childDomainURI = domain.domainURI;
return true;
Expand Down