-
Notifications
You must be signed in to change notification settings - Fork 593
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
cdea2e7
commit 510c538
Showing
7 changed files
with
249 additions
and
53 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
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
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
64 changes: 64 additions & 0 deletions
64
...ges/topology/integration-tests/support/step-definitions/topology/application-groupings.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,64 @@ | ||
import { When, Then } from 'cypress-cucumber-preprocessor/steps'; | ||
import { topologyHelper } from '@console/dev-console/integration-tests/support/pages'; | ||
import { addToApplication } from '@console/topology/integration-tests/support/pages/topology/topology-actions-page'; | ||
import { | ||
topologyPage, | ||
addGitWorkload, | ||
} from '@console/topology/integration-tests/support/pages/topology/topology-page'; | ||
import { topologySidePane } from '@console/topology/integration-tests/support/pages/topology/topology-side-pane-page'; | ||
|
||
When('user right clicks on Application {string} to open Context Menu', (appName: string) => { | ||
topologyPage.rightClickOnApplicationGroupings(appName); | ||
}); | ||
|
||
When('user clicks on application groupings {string}', (applicationGroupings: string) => { | ||
topologyPage.clickOnApplicationGroupings(applicationGroupings); | ||
}); | ||
|
||
Then( | ||
'user is able to see workload {string} under resources tab in the sidebar', | ||
(workloadName: string) => { | ||
topologyPage.verifyApplicationGroupings(workloadName); | ||
}, | ||
); | ||
|
||
Then('user can see Actions dropdown menu', () => { | ||
topologySidePane.verifyActionsDropDown(); | ||
}); | ||
|
||
Then('user can view Add to Application and Delete Application options', () => { | ||
topologySidePane.verifyActionsOnApplication(); | ||
}); | ||
|
||
When( | ||
'user fills the form with workload name {string} and clicks Create', | ||
(workloadName: string) => { | ||
addGitWorkload('https://github.com/sclorg/nodejs-ex.git', workloadName, 'Deployment'); | ||
}, | ||
); | ||
|
||
When('user clicks on {string}', (addOption: string) => { | ||
addToApplication.selectAction(addOption); | ||
}); | ||
|
||
Then('user can see {string} workload', (workloadName: string) => { | ||
topologyHelper.verifyWorkloadInTopologyPage(workloadName); | ||
}); | ||
|
||
When( | ||
'user enters the name {string} in the Delete Application modal and clicks on Delete button', | ||
(appName: string) => { | ||
topologyPage.deleteApplication(appName); | ||
}, | ||
); | ||
|
||
Then('user will not see Application groupings {string}', (appName: string) => { | ||
topologyPage.verifyApplicationGroupingsDeleted(appName); | ||
}); | ||
|
||
Then( | ||
'user can see sidebar opens with Resources tab selected by default for application groupings', | ||
() => { | ||
topologyPage.verifyApplicationGroupingSidepane(); | ||
}, | ||
); |