Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODC-5581 - Topology Filter Bar - Display Options Automation #9482

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -109,13 +109,14 @@ export const gitPage = {
break;
case 'deployment config':
case 'Deployment Config':
case 'DeploymentConfig':
cy.get(gitPO.resources.deploymentConfig)
.scrollIntoView()
.check();
break;
case 'Knative':
case 'knative':
case 'Knative Service':
case 'Serverless Deployment':
cy.get(gitPO.resources.knative)
.scrollIntoView()
.check();
Expand Down

This file was deleted.

Expand Up @@ -5,59 +5,37 @@ Feature: Workload Groupings in Topology

Background:
Given user is at developer perspective
And user has created or selected namespace "aut-topology-display-options"
And user is at Add page


@regression @to-do
@smoke
Scenario: Default state of Display dropdown: T-16-TC01
Given user is at the Topology page
Given user has created workload "nodejs-ex-git" with resource type "Deployment"
gajanan-more marked this conversation as resolved.
Show resolved Hide resolved
When user clicks on the Display dropdown
Then user will see the Connectivity Mode is checked
And user will see the Expand is checked
And user will see the Knative Services checkbox checked
And user will see the Helm Releses checkbox checked
And user will see the Operator Groups checkbox checked
And user will see the Pod count is unchecked


@regression @to-do
@regression
Scenario: Check the Consumption Mode: T-16-TC02
Given user is at the Topology page
Given user is at Topology page
When user clicks on the Display dropdown
And user checks the Consumption Mode
Then user will see that the Expand and it's children are disabled
And user will see that the group no longer appear in the view
Then user will see that the Expand options are disabled


@to-do
@regression
Scenario: Uncheck the Expand: T-16-TC03
Given user is at Topology page
When user clicks on the Display dropdown
And user unchecks the Expand
Then user will see the Knative Services checkbox is disabled
And user will see the Helm Releses checkbox is disabled
And user will see the Operator Groups checkbox is disabled


@regression @to-do
Scenario: Provide ability to expand and collapse all groups in Topology graph view: T-16-TC04
Given user is at Topology page
And user is on the graph view
When user clicks on the Display dropdown
And user unchecks the Expand button
Then user will see the grouped resources collapsed
And user will see the summary of workloads


@regression @to-do
Scenario: Provide ability to expand and collapse all groups in Topology list view: T-16-TC05
Given user is at Topology page
And user is on the list view
When user clicks on the Display dropdown
And user unchecks the Expand button
Then user will see the grouped resources collapsed
Then user will see that the Expand options are disabled


@regression @manual
Scenario: Provide ability to hide and show Helm release groupings in Topology graph and list view: T-16-TC06
Scenario: Provide ability to hide and show Helm release groupings in Topology graph and list view: T-16-TC04
Given user is at the Topology page
And user is at the graph view
When user clicks on the Display dropdown
Expand All @@ -67,7 +45,7 @@ Feature: Workload Groupings in Topology


@regression @manual
Scenario: Provide ability to hide and show Knative Services groupings in Topology graph and list view: T-16-TC07
Scenario: Provide ability to hide and show Knative Services groupings in Topology graph and list view: T-16-TC05
Given user is at the Topology page
And user is at the graph view
When user clicks on the Display dropdown
Expand All @@ -77,10 +55,24 @@ Feature: Workload Groupings in Topology


@regression @manual
Scenario: Provide ability to hide and show Operator Groups groupings in Topology graph and list view: T-16-TC08
Scenario: Provide ability to hide and show Operator Groups groupings in Topology graph and list view: T-16-TC06
Given user is at the Topology page
And user is at the graph view
When user clicks on the Display dropdown
And user unchecks the Operator Groups checkbox
Then user will see the Operator Groups collapsed
And user will see the summary of workloads


@regression @manual
Scenario: Display options menu in topology with defaut options: T-08-TC07
Given user has created deployment, deployment-config and knative-service resource type git workloads
When user clicks on Display Options
And user sees "Pod Count" and "Labels" under "Show" and "Expand" have options according to their presence which are "Application Groupings" and "knative Services"
And user deselects "Labels" which is selected by default
And user sees the labels under the workloads have dissapeared
And user hovers over application grouping the label appears
And user selects "Pod Count" which is deselected by default
And user checks the workloads which shows pod count instead of buider images
And user deselects "Application Groupings" in the Expand section
Then user can see workloads squashed in Application grouping
Expand Up @@ -23,6 +23,12 @@ export const topologyPO = {
applicationGroupingTitle: '.odc-topology-list-view__application-label',
addNewAnnotations: '[data-test="add-button"]',
connector: '[data-test-id="edge-handler"]',
displayOptions: {
connenctivityMode: '[id="showGroups"]',
consumptionMode: '[id="hideGroups"]',
expandSwitchToggle: '.pf-c-switch__input',
applicationGroupingsDisabled: '.pf-c-check.pf-c-select__menu-item.pf-m-disabled',
},
filterByResource: {
filterByResourceDropDown: '.pf-c-select__toggle-text',
deploymentResource: '.co-m-resource-icon.co-m-resource-deployment',
Expand All @@ -39,6 +45,7 @@ export const topologyPO = {
},
sidePane: {
actionsDropDown: '[data-test-id="actions-menu-button"]',
showPodCount: '[id$=show-pod-count]',
dialog: '[role="dialog"]',
title: '[role="dialog"] h1',
tabs: '[role="dialog"] li button',
Expand Down
Expand Up @@ -34,11 +34,26 @@ export const topologyPage = {
verifyWorkloadInTopologyPage: (appName: string) => {
topologyHelper.verifyWorkloadInTopologyPage(appName);
},
clickDisplayOptionDropdown: () =>
cy
.get(topologyPO.graph.filterDropdown)
.contains('Display Options')
.click(),
verifyWorkloadNotInTopologyPage: (appName: string) => {
topologyHelper.search(appName).should('not.exist');
},
clickDisplayOptionDropdown: () => cy.contains('Display options').click(),
checkConnectivityMode: () => cy.get(topologyPO.graph.displayOptions.connenctivityMode).click(),
checkConsumptionMode: () => cy.get(topologyPO.graph.displayOptions.consumptionMode).click(),
verifyConnectivityModeChecked: () =>
cy.get(topologyPO.graph.displayOptions.connenctivityMode).should('be.checked'),
verifyConsumptionModeChecked: () =>
cy.get(topologyPO.graph.displayOptions.consumptionMode).should('be.checked'),
verifyExpandChecked: () =>
cy.get(topologyPO.graph.displayOptions.expandSwitchToggle).should('be.checked'),
verifyExpandDisabled: () =>
cy.get(topologyPO.graph.displayOptions.expandSwitchToggle).should('be.disabled'),
verifyExpandOptionsDisabled: () =>
cy.get(topologyPO.graph.displayOptions.applicationGroupingsDisabled).should('be.visible'),
uncheckExpandToggle: () => {
cy.get(topologyPO.graph.displayOptions.expandSwitchToggle).click({ force: true });
},
verifyPodCountUnchecked: () => cy.get(topologyPO.sidePane.showPodCount).should('not.be.checked'),
selectDisplayOption: (opt: displayOptions) => {
topologyPage.clickDisplayOptionDropdown();
switch (opt) {
Expand Down
Expand Up @@ -24,6 +24,11 @@ Given('user is at the Topology page', () => {
topologyPage.verifyTopologyPage();
});

Given('user is at Topology page', () => {
navigateTo(devNavigationMenu.Topology);
topologyPage.verifyTopologyPage();
});

When('user navigates to Topology page', () => {
navigateTo(devNavigationMenu.Topology);
});
Expand Down Expand Up @@ -114,6 +119,19 @@ Given(
},
);

Given(
'user has created workload {string} with resource type {string} and application groupings {string}',
(componentName: string, resourceType: string = 'Deployment', applicationGroupings: string) => {
createGitWorkload(
'https://github.com/sclorg/nodejs-ex.git',
componentName,
resourceType,
applicationGroupings,
);
topologyPage.verifyWorkloadInTopologyPage(componentName);
},
);

Given('user is at Add page', () => {
navigateTo(devNavigationMenu.Add);
});
Expand Down
@@ -0,0 +1,42 @@
import { When, Then } from 'cypress-cucumber-preprocessor/steps';
import { topologyPage } from '@console/topology/integration-tests/support/pages/topology/topology-page';

When('user clicks on the Display dropdown', () => {
topologyPage.clickDisplayOptionDropdown();
});

Then('user will see the Connectivity Mode is checked', () => {
topologyPage.verifyConnectivityModeChecked();
});

Then('user will see the Expand is checked', () => {
topologyPage.verifyExpandChecked();
});

Then('user will see the Pod count is unchecked', () => {
topologyPage.verifyPodCountUnchecked();
});

When('user checks the Consumption Mode', () => {
topologyPage.checkConsumptionMode();
});

When('user will see that the Expand options are disabled', () => {
topologyPage.verifyExpandOptionsDisabled();
});

When(
'user will see that the application groupings {string} no longer visible in the view',
(applicationGroupings: string) => {
topologyPage.verifyWorkloadNotInTopologyPage(applicationGroupings);
},
);

When('user unchecks the Expand', () => {
topologyPage.checkConnectivityMode();
topologyPage.uncheckExpandToggle();
});

Then('user will see the Knative Services checkbox is disabled', () => {
topologyPage.verifyExpandDisabled();
});