Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2efa276
commit b243f95
Showing
2 changed files
with
58 additions
and
3 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
52 changes: 52 additions & 0 deletions
52
.../dev-console/integration-tests/support/step-definitions/pipelines/pipelines-workspaces.ts
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,52 @@ | ||
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; | ||
import { pipelineBuilderPage } from '../../pages/pipelines/pipelineBuilder-page'; | ||
import { naviagteTo } from '../../pages/app'; | ||
import { devNavigationMenu } from '../../constants/global'; | ||
import { pipelinesPO, pipelineBuilderPO } from '../../pageObjects/pipelines-po'; | ||
|
||
When('user enters yaml content {string} in editor', (pipelineYamlFile: string) => { | ||
cy.fixture(`pipelines/pipelines-workspaces/${pipelineYamlFile}`).then((yaml) => { | ||
cy.log(yaml); | ||
cy.get('[data-mode-id="yaml"]') | ||
.click() | ||
.focused() | ||
.type('{ctrl}a') | ||
.type(yaml); | ||
}); | ||
}); | ||
|
||
When('user clicks on create button in Edit Yaml file', () => { | ||
cy.get(pipelineBuilderPO.yamlCreatePipeline.create).click(); | ||
}); | ||
|
||
Given('user is at Edit Yaml page', () => { | ||
pipelineBuilderPage.editYaml(); | ||
}); | ||
|
||
Given('user created pipeline with workspace', () => { | ||
pipelineBuilderPage.editYaml(); | ||
cy.fixture(`pipelines/pipelines-workspaces/pipeline-with-workspace.yaml`).then((yaml) => { | ||
cy.log(yaml); | ||
cy.get('[data-mode-id="yaml"]') | ||
.click() | ||
.focused() | ||
.type('{ctrl}a') | ||
.type(yaml); | ||
}); | ||
cy.get(pipelineBuilderPO.yamlCreatePipeline.create).click(); | ||
naviagteTo(devNavigationMenu.Pipelines); | ||
}); | ||
|
||
Then( | ||
'user is able to see different shared workspaces like Empty Directory, Config Map, Secret, PVC', | ||
() => { | ||
cy.byTestDropDownMenu('EmptyDirectory').should('be.visible'); | ||
cy.byTestDropDownMenu('ConfigMap').should('be.visible'); | ||
cy.byTestDropDownMenu('Secret').should('be.visible'); | ||
cy.byTestDropDownMenu('PVC').should('be.visible'); | ||
}, | ||
); | ||
|
||
When('user selects shared workspaces drop down', () => { | ||
cy.get(pipelinesPO.startPipeline.sharedWorkspace).click(); | ||
}); |