Skip to content

Commit

Permalink
Merge pull request openshift#11529 from hemantsaini-7/topology-toolba…
Browse files Browse the repository at this point in the history
…r-filter

Topology-toolbar-filter feature
  • Loading branch information
openshift-merge-robot authored May 31, 2022
2 parents c9615b2 + b6a3661 commit 0a5d1fd
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ Feature: Topology Toolbar Filter Group
And user is at Add page


@regression @to-do
@regression
Scenario: Topology filter by resource: T-13-TC01
Given user has created workload "nodejs-ex-git-dc" with resource type "Deployment Config"
Given user has created workload "nodejs-ex-git-d" with resource type "Deployment"
And user is at Add page
And user has created workload "nodejs-ex-git-dc" with resource type "Deployment Config"
When user clicks on List view button
And user clicks the filter by resource on top
Then user will see Deployment and DeploymentConfig options with 1 associated with it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,16 @@ export const topologyPO = {
nodejsDevfiles: '[data-test="item-name-Basic Node.js-Devfiles"]',
nodejsSamples: '[data-test="item-name-Basic Node.js-Samples"]',
},
toolbarFilterPO: {
deployment: '[data-test="Deployment"]',
deploymentConfig: '[data-test="DeploymentConfig"]',
deploymentSpan: '[data-test="Deployment"] span',
deploymentConfigSpan: '[data-test="DeploymentConfig"] span',
deploymentCheckbox: '[data-test="Deployment"] input',
deploymentConfigCheckbox: '[data-test="DeploymentConfig"] input',
deploymentApp: '#nodejs-ex-git-app-Deployment',
deploymentConfigApp: '#nodejs-ex-git-app-DeploymentConfig',
},
};

export const typeOfWorkload = (workload: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,26 @@ When('user unchecks the Expand', () => {
Then('user will see the Knative Services checkbox is disabled', () => {
topologyPage.verifyExpandDisabled();
});

Then('user will see Deployment and DeploymentConfig options with 1 associated with it', () => {
cy.get(topologyPO.toolbarFilterPO.deployment).should('be.visible');
cy.get(topologyPO.toolbarFilterPO.deploymentConfig).should('be.visible');
cy.get(topologyPO.toolbarFilterPO.deploymentSpan).contains('Deployment (1)');
cy.get(topologyPO.toolbarFilterPO.deploymentConfigSpan).contains('DeploymentConfig (1)');
});

Then('user clicks on Deployment checkbox to see only the deployment type workload', () => {
cy.get(topologyPO.toolbarFilterPO.deploymentCheckbox).check();
cy.get(topologyPO.toolbarFilterPO.deploymentApp).should('be.visible');
cy.get(topologyPO.toolbarFilterPO.deploymentConfigApp).should('not.exist');
});

Then(
'user clicks on DeploymentConfig checkbox to see only the deploymentconfig type workload',
() => {
cy.get(topologyPO.toolbarFilterPO.deploymentCheckbox).uncheck();
cy.get(topologyPO.toolbarFilterPO.deploymentConfigCheckbox).check();
cy.get(topologyPO.toolbarFilterPO.deploymentConfigApp).should('be.visible');
cy.get(topologyPO.toolbarFilterPO.deploymentApp).should('not.exist');
},
);

0 comments on commit 0a5d1fd

Please sign in to comment.