Skip to content

ODC-7782: Test adjustments to perspective merge #14970

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

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import {
perspective,
projectNameSpace,
} from '@console/dev-console/integration-tests/support/pages';
import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective';

Given('user is at developer perspective', () => {
checkDeveloperPerspective();
perspective.switchTo(switchPerspective.Developer);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const addPage = {
cy.byTestID('item dev-catalog').click();
app.waitForLoad();
detailsPage.titleShouldContain(pageTitle.SoftwareCatalog);
cy.testA11y(pageTitle.SoftwareCatalog);
// cy.testA11y(pageTitle.SoftwareCatalog);
break;
case 'Database':
case addOptions.Database:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const navigateTo = (opt: devNavigationMenu) => {
break;
}
case devNavigationMenu.Topology: {
cy.get(devNavigationMenuPO.topology).click();
cy.get(devNavigationMenuPO.topology).should('exist').click({ force: true });
cy.url().should('include', 'topology');
app.waitForLoad();
cy.url().then(($url) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
import { detailsPage } from '@console/cypress-integration-tests/views/details-page';
import { guidedTour } from '@console/cypress-integration-tests/views/guided-tour';
import { topologyPage } from '@console/topology/integration-tests/support/pages/topology';
import { devNavigationMenu, addOptions } from '../../constants';
import { devNavigationMenu, addOptions, pageTitle } from '../../constants';
import { formPO, topologyPO } from '../../pageObjects';
import { addPage, gitPage } from '../add-flow';
import { createForm, navigateTo } from '../app';

export const selectImportFromGitQuickCreate = () => {
guidedTour.close();
cy.get('[data-test="quick-create-dropdown"]').click();
cy.get('[data-test="qc-import-from-git"] [role="menuitem"]')
.should('be.visible')
.click({ force: true });
cy.testA11y('Import from Git Page');
detailsPage.titleShouldContain(pageTitle.Git);
};

export const createGitWorkload = (
gitUrl: string = 'https://github.com/sclorg/nodejs-ex.git',
componentName: string = 'nodejs-ex-git',
Expand All @@ -12,7 +24,7 @@ export const createGitWorkload = (
isPipelineSelected: boolean = false,
isServerlessFunction: boolean = false,
) => {
addPage.selectCardFromOptions(addOptions.ImportFromGit);
selectImportFromGitQuickCreate();
gitPage.enterGitUrl(gitUrl);
gitPage.verifyValidatedMessage(gitUrl);
gitPage.enterComponentName(componentName);
Expand Down Expand Up @@ -52,7 +64,6 @@ export const createGitWorkloadIfNotExistsOnTopologyPage = (
cy.get('body').then(($body) => {
if ($body.find(topologyPO.emptyStateIcon).length) {
cy.log(`Topology doesn't have workload "${componentName}", lets create it`);
navigateTo(devNavigationMenu.Add);
createGitWorkload(
gitUrl,
componentName,
Expand All @@ -68,7 +79,6 @@ export const createGitWorkloadIfNotExistsOnTopologyPage = (
if ($node.find(topologyPO.highlightNode).length) {
cy.log(`knative service: ${componentName} is already created`);
} else {
navigateTo(devNavigationMenu.Add);
createGitWorkload(
gitUrl,
componentName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
closeExportNotification,
} from '../../pages';
import { navigateTo } from '../../pages/app';
import { checkDeveloperPerspective } from '../../pages/functions/checkDeveloperPerspective';

Given(
'user has created {string} workload in {string} application',
Expand All @@ -23,6 +24,7 @@ Given(
);

Given('user is at Add page', () => {
checkDeveloperPerspective();
navigateTo(devNavigationMenu.Add);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import { addOptions, devNavigationMenu } from '../../constants';
import { addPagePO, helmChartRepositoriesPO } from '../../pageObjects';
import { addPage, createForm, navigateTo } from '../../pages';
import { helmChartRepository } from '../../pages/add-flow/helm-chart-repository';
import { checkDeveloperPerspective } from '../../pages/functions/checkDeveloperPerspective';

Given('user is at Add page', () => {
checkDeveloperPerspective();
navigateTo(devNavigationMenu.Add);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
import { detailsPage } from '@console/cypress-integration-tests/views/details-page';
import { addOptions, devNavigationMenu } from '../../constants';
import { addPage, navigateTo } from '../../pages';
import { checkDeveloperPerspective } from '../../pages/functions/checkDeveloperPerspective';

Given('user is at Add page', () => {
checkDeveloperPerspective();
navigateTo(devNavigationMenu.Add);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ import {
createGitWorkloadIfNotExistsOnTopologyPage,
verifyAndInstallGitopsPrimerOperator,
} from '../../pages';
import { checkDeveloperPerspective } from '../../pages/functions/checkDeveloperPerspective';

Given('user is at Add page', () => {
checkDeveloperPerspective();
navigateTo(devNavigationMenu.Add);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { modal } from '@console/cypress-integration-tests/views/modal';
import { nav } from '@console/cypress-integration-tests/views/nav';
import { switchPerspective, devNavigationMenu, adminNavigationMenu } from '../../constants';
import { perspective, projectNameSpace, navigateTo, app } from '../../pages';
import { checkDeveloperPerspective } from '../../pages/functions/checkDeveloperPerspective';

Given('user has logged in as a basic user', () => {
cy.logout();
Expand All @@ -17,6 +18,7 @@ Given('user has logged in as a basic user', () => {
});

Given('user is at developer perspective', () => {
checkDeveloperPerspective();
perspective.switchTo(switchPerspective.Developer);
// Due to bug ODC-6231
// cy.testA11y('Developer perspective with guide tour modal');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import {
topologyPage,
verifyAddPage,
} from '../../pages';
import { checkDeveloperPerspective } from '../../pages/functions/checkDeveloperPerspective';

Given('user is at developer perspective', () => {
checkDeveloperPerspective();
perspective.switchTo(switchPerspective.Developer);
});

Expand All @@ -22,6 +24,7 @@ Given('user has created or selected namespace {string}', (projectName: string) =
});

Given('user is at Add page', () => {
checkDeveloperPerspective();
navigateTo(devNavigationMenu.Add);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ import {
catalogPage,
addPage,
} from '@console/dev-console/integration-tests/support/pages';
import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective';

Given('user is at developer perspective', () => {
checkDeveloperPerspective();
perspective.switchTo(switchPerspective.Developer);
// cy.testA11y('Developer perspective with guider tour modal');
});
Expand Down Expand Up @@ -111,6 +113,7 @@ When('user clicks on the link for the {string} of helm release', (resource: stri
});

Given('user is at Add page', () => {
checkDeveloperPerspective();
navigateTo(devNavigationMenu.Add);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
perspective,
createForm,
} from '@console/dev-console/integration-tests/support/pages';
import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective';
import { topologyPage } from '@console/topology/integration-tests/support/pages/topology/topology-page';
import { helmPage, helmDetailsPage } from '../../pages';

Expand All @@ -30,6 +31,7 @@ const deleteChartRepositoryFromDetailsPage = (name: string, type: string) => {
};

Given('user is at developer perspective', () => {
checkDeveloperPerspective();
perspective.switchTo(switchPerspective.Developer);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
projectNameSpace,
app,
} from '@console/dev-console/integration-tests/support/pages';
import { checkDeveloperPerspective } from '@console/dev-console/integration-tests/support/pages/functions/checkDeveloperPerspective';

When('user selects YAML view', () => {
cy.document().its('readyState').should('eq', 'complete');
Expand Down Expand Up @@ -80,6 +81,7 @@ Then('user will see A-Z, Z-A sort by dropdown', () => {
});

Given('user is at Add page', () => {
checkDeveloperPerspective();
navigateTo(devNavigationMenu.Add);
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@knative-admin @knative
@knative-admin @knative @broken-test
# Broken due to https://issues.redhat.com/browse/OCPBUGS-55368
Feature: Eventing page at Administrator perspective
As a user, I should be able to access event sources, channels, brokers at Administrator perspective

Expand All @@ -10,7 +11,7 @@ Feature: Eventing page at Administrator perspective

@regression
Scenario: Create new Event Source: KA-01-TC01
Given user has created knative service "hello-openshift"
Given user has created knative service "hello-openshift" in admin
And user is at administrator perspective
And user is at eventing page
When user clicks on Create dropdown button
Expand All @@ -20,8 +21,8 @@ Feature: Eventing page at Administrator perspective
And user enters "* * * * *" in Schedule field
And user selects resource "hello-openshift"
And user clicks on Create button to submit
Then user will be redirected to Project Details page
And user will see ping-source created
Then user will be redirected to Topology page
And ApiServerSource event source "ping-source" is created and linked to selected knative service "hello-openshift"


@regression
Expand All @@ -31,8 +32,8 @@ Feature: Eventing page at Administrator perspective
And user selects Channel
And user selects Default channels
And user clicks on Create button to create channel
Then user will be redirected to Project Details page
And user will see channel created
Then user will be redirected to Topology page
And user will see the channel "channel" created


@manual
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Filters on Serving and Eventing page

Background:
Given user has created or selected namespace "aut-serving-eventing"
And user has created knative service "hello-openshift"
And user has created knative service "hello-openshift" in admin
And user is at administrator perspective

@regression
Expand Down Expand Up @@ -41,7 +41,8 @@ Feature: Filters on Serving and Eventing page
And user will see Clear all filters


@regression
@regression @broken-test
# Broken due to https://issues.redhat.com/browse/OCPBUGS-55368
Scenario: Filter the Event Sources: KA-02-TC04
Given user has created ApiServer Source
And user has created Ping Source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Serving page at Administrator perspective

Background:
Given user has created or selected namespace "aut-serving-page"
And user has created knative service "hello-openshift"
And user has created knative service "hello-openshift" in admin
And user is at administrator perspective


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Feature: Create a workload of 'knative Service' type resource

Background:
Given user has created or selected namespace "aut-knative-workload"
And user is at Add page


@regression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export const eventingPO = {
containersource: '[data-test-row-filter="containersource"]',
pingsource: '[data-test-row-filter="pingsource"]',
sinkbinding: '[data-test-row-filter="sinkbinding"]',
labelSuggestion: '.co-suggestion-line',
labelSuggestion: '[data-test="suggestion-line"]',
checkbox: '.pf-v6-c-check__input',
},
resourceIcon: '.co-m-resource-icon',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { operatorsPage } from '@console/dev-console/integration-tests/support/pages';
import { operatorsPage, topologyPage } from '@console/dev-console/integration-tests/support/pages';
import { eventingPO } from '@console/knative-plugin/integration-tests/support/pageObjects/global-po';

export const eventingSources = {
Expand All @@ -15,7 +15,8 @@ export const eventingSources = {
cy.get(eventingPO.pingSource.resource).click();
cy.get(eventingPO.pingSource.resourceItem).eq(0).click({ force: true });
cy.get(eventingPO.pingSource.submit).click();
cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
// cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
topologyPage.verifyTopologyPage();
},
createApiServerSource: () => {
operatorsPage.navigateToEventingPage();
Expand All @@ -30,7 +31,8 @@ export const eventingSources = {
cy.get(eventingPO.apiServerSource.resource).click();
cy.get(eventingPO.apiServerSource.resourceItem).eq(0).click({ force: true });
cy.get(eventingPO.apiServerSource.submit).click();
cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
// cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
topologyPage.verifyTopologyPage();
},
createSinkBinding: () => {
operatorsPage.navigateToEventingPage();
Expand All @@ -45,7 +47,8 @@ export const eventingSources = {
cy.get(eventingPO.sinkBinding.resource).click();
cy.get(eventingPO.sinkBinding.resourceItem).contains('openshift').click({ force: true });
cy.get(eventingPO.sinkBinding.submit).click();
cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
// cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
topologyPage.verifyTopologyPage();
},
createContainerSource: () => {
operatorsPage.navigateToEventingPage();
Expand All @@ -59,7 +62,8 @@ export const eventingSources = {
cy.get(eventingPO.containerSource.resource).click();
cy.get(eventingPO.containerSource.resourceItem).contains('openshift').click({ force: true });
cy.get(eventingPO.containerSource.submit).click();
cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
// cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
topologyPage.verifyTopologyPage();
},
};

Expand All @@ -71,7 +75,8 @@ export const eventingChannel = {
cy.get(eventingPO.channel.typeField).click();
cy.get(eventingPO.channel.createDropDownDefaultChannel).click();
cy.get(eventingPO.channel.submit).click();
cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
// cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
topologyPage.verifyTopologyPage();
},
createInMemoryChannel: () => {
operatorsPage.navigateToEventingPage();
Expand All @@ -80,7 +85,8 @@ export const eventingChannel = {
cy.get(eventingPO.channel.typeField).click();
cy.get(eventingPO.channel.createDropDownInMemoryChannel).click();
cy.get(eventingPO.channel.submit).click();
cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
// cy.get(eventingPO.pageDetails).should('include.text', 'Project details');
topologyPage.verifyTopologyPage();
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ When('user clicks on Service button', () => {
});

Then('user can see titles URL, Revision, Created, Conditions, Ready, Reason', () => {
cy.get('[role="rowgroup"]')
cy.get('[aria-label="Services"]')
// cy.get('[role="rowgroup"]')
.should('contain', 'URL')
.and('contain', 'Revision')
.and('contain', 'Created')
Expand All @@ -59,7 +60,8 @@ Then('user can see titles URL, Revision, Created, Conditions, Ready, Reason', ()
});

Then('user can see titles Namespace, Service, Created, Conditions, Ready, Reason', () => {
cy.get('[role="rowgroup"]')
cy.get('[aria-label="Revisions"]')
// cy.get('[role="rowgroup"]')
.should('contain', 'Name')
.and('contain', 'Service')
.and('contain', 'Created')
Expand All @@ -69,7 +71,8 @@ Then('user can see titles Namespace, Service, Created, Conditions, Ready, Reason
});

Then('user can see titles URL, Created, Conditions, Traffic', () => {
cy.get('[role="rowgroup"]')
cy.get('[aria-label="Routes"]')
// cy.get('[role="rowgroup"]')
.should('contain', 'URL')
.and('contain', 'Created')
.and('contain', 'Conditions')
Expand Down
Loading