Skip to content

Commit

Permalink
Merge branch 'develop' into feature/5726/search-cards
Browse files Browse the repository at this point in the history
  • Loading branch information
kathy-t committed Jan 15, 2025
2 parents c04b4c0 + 9792e69 commit 4c078e9
Show file tree
Hide file tree
Showing 9 changed files with 633 additions and 23 deletions.
7 changes: 4 additions & 3 deletions cypress/e2e/group2/myworkflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ describe('Dockstore my workflows part 2', () => {
gotoVersionsAndClickActions();
// Request DOI
cy.fixture('versionWithDoi.json').then((json) => {
cy.intercept('GET', '/api/workflows/11/workflowVersions?limit=10&offset=0&sortOrder=desc', {
cy.intercept('GET', '/api/workflows/11/workflowVersions?limit=10&offset=0&sortOrder=desc&include=metrics', {
body: json,
statusCode: 200,
}).as('getVersionWithDoi');
Expand All @@ -448,14 +448,15 @@ describe('Dockstore my workflows part 2', () => {

// Export to ORCID
cy.fixture('versionAfterOrcidExport.json').then((json) => {
cy.intercept('GET', '/api/workflows/11/workflowVersions?limit=10&offset=0&sortOrder=desc', {
cy.intercept('GET', '/api/workflows/11/workflowVersions?limit=10&offset=0&sortOrder=desc&include=metrics', {
body: json,
statusCode: 200,
}).as('getVersionAfterOrcidExport');
});
cy.get('[data-cy=dockstore-export-orcid-button]').click();
cy.get('[data-cy=export-button').should('be.enabled');
cy.get('[data-cy=export-button').click();

gotoVersionsAndClickActions();
cy.get('[data-cy=dockstore-export-orcid-button]').should('not.exist'); // Should not be able to export to ORCID again
});
Expand Down Expand Up @@ -521,7 +522,7 @@ describe('Dockstore my workflows part 2', () => {
cy.wait('@refreshWorkflow');

cy.fixture('sampleWorkflowVersion').then((json) => {
cy.intercept('GET', '/api/workflows/11/workflowVersions?limit=10&offset=0&sortOrder=desc', {
cy.intercept('GET', '/api/workflows/11/workflowVersions?limit=10&offset=0&sortOrder=desc&include=metrics', {
body: json,
}).as('getVersion');
});
Expand Down
11 changes: 11 additions & 0 deletions cypress/e2e/group3/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ describe('Dockstore Metrics', () => {
}).as('getMetrics');
});
cy.visit('/workflows/github.com/A/l:master');
cy.fixture('versionWithMetrics.json').then((json) => {
cy.intercept('GET', '/api/workflows/published/11/workflowVersions?limit=10&offset=0&sortOrder=desc&include=metrics', {
body: json,
statusCode: 200,
}).as('getVersionWithMetrics');
});
cy.wait('@getVersionWithMetrics');
goToTab('Versions');
cy.get('[data-cy=execution-metrics-icon]').should('be.visible');
cy.get('[data-cy=validation-metrics-icon]').should('be.visible');

cy.wait('@getMetrics');
goToTab('Metrics');

Expand Down
64 changes: 47 additions & 17 deletions cypress/fixtures/versionAfterOrcidExport.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,66 @@
[
{
"aiTopicProcessed": false,
"aliases": null,
"author": null,
"authors": [],
"author": "Muhammed Lee",
"authors": [
{
"affiliation": null,
"email": "[email protected]",
"name": "Muhammed Lee",
"role": null
}
],
"commitID": null,
"dbUpdateDate": 1622246514895,
"description": null,
"dbUpdateDate": 1722026014356,
"descriptionSource": null,
"dirtyBit": false,
"doiStatus": "CREATED",
"doiURL": "10.5072/zenodo.841014",
"doiStatus": "NOT_REQUESTED",
"doiURL": null,
"dois": {
"USER": {
"id": 1234,
"type": "VERSION",
"name": "10.5072/zenodo.841014",
"initiator": "USER"
}
},
"email": null,
"email": "[email protected]",
"frozen": true,
"hidden": false,
"id": 13,
"images": null,
"input_file_formats": [],
"last_modified": 1480374117003,
"kernelImagePath": null,
"last_modified": 1480345317003,
"legacyVersion": true,
"metricsByPlatform": null,
"name": "master",
"orcidAuthors": [],
"orcidAuthors": null,
"output_file_formats": [],
"readMePath": null,
"reference": "master",
"referenceType": "UNSET",
"subClass": null,
"synced": false,
"userFiles": [],
"valid": true,
"validations": null,
"verified": false,
"verifiedPlatforms": [],
"verifiedSource": null,
"verifiedSources": [],
"versionEditor": null,
"versionMetadata": {
"descriptorTypeVersions": [],
"dois": {
"USER": {
"id": 1234,
"type": "VERSION",
"name": "10.5072/zenodo.841014",
"initiator": "USER"
}
},
"engineVersions": [],
"id": 13,
"parsedInformationSet": null,
"userIdToOrcidPutCode": {
Expand All @@ -51,12 +73,12 @@
"workingDirectory": ""
},
{
"aiTopicProcessed": false,
"aliases": null,
"author": null,
"authors": [],
"commitID": null,
"dbUpdateDate": 1480374117003,
"description": null,
"dbUpdateDate": 1480345317003,
"descriptionSource": null,
"dirtyBit": false,
"doiStatus": "NOT_REQUESTED",
Expand All @@ -68,24 +90,32 @@
"id": 14,
"images": null,
"input_file_formats": [],
"last_modified": 1480374117003,
"kernelImagePath": null,
"last_modified": 1480345317003,
"legacyVersion": true,
"metricsByPlatform": null,
"name": "test",
"orcidAuthors": [],
"orcidAuthors": null,
"output_file_formats": [],
"readMePath": null,
"reference": "test",
"referenceType": "UNSET",
"subClass": null,
"synced": false,
"synced": true,
"userFiles": [],
"valid": true,
"validations": null,
"verified": false,
"verifiedPlatforms": [],
"verifiedSource": null,
"verifiedSources": [],
"versionEditor": null,
"versionMetadata": {
"descriptorTypeVersions": [],
"dois": {},
"engineVersions": [],
"id": 14,
"parsedInformationSet": null,
"parsedInformationSet": [],
"publicAccessibleTestParameterFile": null,
"userIdToOrcidPutCode": {}
},
"workflow_path": "/1st-workflow.cwl",
Expand Down
Loading

0 comments on commit 4c078e9

Please sign in to comment.