From 34cb707899d75e260b1d452304e5854d2bcda4f6 Mon Sep 17 00:00:00 2001 From: Gary Luu Date: Wed, 14 Feb 2018 12:27:42 -0500 Subject: [PATCH] Hotfix/docker pull fix (#196) * Fix for docker pull command in versions modal * Remove function in template * Update docker pull command when tool changes * Test docker pull command by injecting a real tool and real tag into the component * Add an additional tool to database * Simplify unit test * Hotfix conflict fix * Revert "Remove enduser" This reverts commit 0aabdb902be4558fa0a9314993a0a2cbc742c490. * Revert changes again * Update database for hotfix branch --- cypress/integration/ToolsSearch.js | 4 +- cypress/integration/VersionModal.js | 23 + .../version-modal.component.html | 2 +- .../version-modal.component.spec.ts | 74 ++ .../version-modal/version-modal.component.ts | 42 +- .../version-modal/version-modal.service.ts | 9 +- src/app/test/mocked-objects.ts | 10 +- src/app/test/service-stubs.ts | 121 ++- travisci/db_dump.sql | 877 ++++++++++++------ 9 files changed, 856 insertions(+), 306 deletions(-) create mode 100644 cypress/integration/VersionModal.js create mode 100644 src/app/container/version-modal/version-modal.component.spec.ts diff --git a/cypress/integration/ToolsSearch.js b/cypress/integration/ToolsSearch.js index b28b0a24aa..71d35e2c9e 100644 --- a/cypress/integration/ToolsSearch.js +++ b/cypress/integration/ToolsSearch.js @@ -6,11 +6,11 @@ describe('Dockstore tool search page', function() { }); describe('Select a tool', function() { - it('Should have three tools and no hidden row)', function() { + it('Should have 4 tools', function() { cy .get('tbody') .children('tr') - .should('have.length', 3) + .should('have.length', 4) }); it('Select dockstore-tool-imports', function() { diff --git a/cypress/integration/VersionModal.js b/cypress/integration/VersionModal.js new file mode 100644 index 0000000000..28a8ecb2ba --- /dev/null +++ b/cypress/integration/VersionModal.js @@ -0,0 +1,23 @@ +describe('Public Version Modal', function() { + require('./helper.js') + beforeEach(function() { + cy.visit(String(global.baseUrl) + "/containers/quay.io/garyluu/dockstore-cgpmap/cgpmap-cramOut") + cy + .get('tab') + .should('have.length', 7) + }); + + it('Change tab to versions', function() { + cy + .get('.nav-link') + .contains('Versions') + .parent() + .click() + + cy + .contains("View") + .click() + cy.get('form') + cy.get('#dockerPullCommand').should('be.visible').should('have.value','docker pull quay.io/garyluu/dockstore-cgpmap:3.0.0-rc8') + }); +}) diff --git a/src/app/container/version-modal/version-modal.component.html b/src/app/container/version-modal/version-modal.component.html index 59cbd4667c..f39a567e2e 100644 --- a/src/app/container/version-modal/version-modal.component.html +++ b/src/app/container/version-modal/version-modal.component.html @@ -220,7 +220,7 @@
- +