-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for workflow version aliases (#827)
Support workflow version aliases
- Loading branch information
Walter Shands
authored
Dec 20, 2019
1 parent
ee9e910
commit 7dfc899
Showing
5 changed files
with
106 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright 2019 OICR | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { goToTab, isActiveTab, resetDB, setTokenUserViewPort } from '../../support/commands'; | ||
|
||
describe('Dockstore aliases', () => { | ||
resetDB(); | ||
setTokenUserViewPort(); | ||
|
||
describe('Find workflow version by alias', () => { | ||
it('workflow version alias', () => { | ||
cy.server(); | ||
cy.route({ | ||
url: '*/aliases/workflow-versions/w11wv13alias', | ||
method: 'GET', | ||
status: 200, | ||
response: {'fullWorkflowPath' : 'github.com/A/l', 'tagName' : 'master'} | ||
}); | ||
cy.visit('/aliases/workflow-versions/w11wv13alias'); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/workflows/github.com/A/l:master?tab=info'); | ||
}); | ||
|
||
it('invalid workflow version alias type', () => { | ||
cy.server(); | ||
cy.visit('/aliases/foobar/fakeAlias'); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/aliases/foobar/fakeAlias'); | ||
cy.contains('foobar is not a valid type'); | ||
}); | ||
|
||
it('workflow version alias incorrect', () => { | ||
cy.server(); | ||
cy.route({ | ||
url: '*/aliases/workflow-versions/incorrectAlias', | ||
method: 'GET', | ||
status: 404, | ||
response: {} | ||
}); | ||
cy.visit('/aliases/workflow-versions/incorrectAlias'); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/aliases/workflow-versions/incorrectAlias'); | ||
cy.contains('No workflow-versions with the alias incorrectAlias found'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters