Skip to content

Commit

Permalink
Merge pull request #13660 from The-Anton/odc-7436
Browse files Browse the repository at this point in the history
ODC-7436: shipwright test package update concerning pf5 update
  • Loading branch information
openshift-merge-bot[bot] committed Apr 3, 2024
2 parents 1a28a06 + f35888f commit 7ea10c5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Feature: Shipwright build in topolgy
Scenario Outline: BuildRun Section in Topology Sidebar: SWB-02-TC02
When user navigates to Topology in Developer perspective
And user filters the workload "<workload_name>" by name and sets the workload type to "<workload_type>"
And user clicks on the workload of type "<workload_type>"
And user clicks on the workload with name "<workload_name>" and of type "<workload_type>"
Then user will clicks on the Resources tab on the topology sidebar for "<workload_name>"
And user will verify BuildRuns section is visible

Expand All @@ -49,7 +49,7 @@ Feature: Shipwright build in topolgy
When user selects "Start" option from Actions menu
And user navigates to Topology in Developer perspective
And user filters the workload "<workload_name>" by name and sets the workload type to "<workload_type>"
Then user will see build running for "<workload_type>"
Then user will see build running for "<workload_name>" of type "<workload_type>"

Examples:
| build_name | workload_name | workload_type |
Expand All @@ -62,7 +62,7 @@ Feature: Shipwright build in topolgy
Scenario Outline: View logs for shipwright buildrun: SWB-02-TC04
When user navigates to Topology in Developer perspective
And user filters the workload "<workload_name>" by name and sets the workload type to "<workload_type>"
And user clicks on View logs button for buildrun for workload type "<workload_type>" from the sidebar
And user clicks on View logs button for buildrun for workload with name "<workload_name>" and of type "<workload_type>" from the sidebar
Then user will be able to see the buildRun logs

Examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,16 @@ Then('user will be able to see the buildRun logs', () => {
cy.get(buildPO.shipwrightBuild.buildrunLogs).should('be.visible');
});

When('user clicks on the workload of type {string}', (type: string) => {
if (type === 'Service') {
cy.get('g.odc-knative-service__label > text').first().click({ force: true });
} else {
cy.get(topologyPO.highlightNode).within(() => {
cy.get('g.pf-topology__node__label > text').click({ force: true });
});
}
});
When(
'user clicks on the workload with name {string} and of type {string}',
(name: string, type: string) => {
if (type === 'Service') {
cy.get('[data-type="knative-service"]').contains(name).click({ force: true });
} else {
cy.byLegacyTestID(name).click('center');
}
},
);

Then(
'user will clicks on the Resources tab on the topology sidebar for {string}',
Expand All @@ -89,31 +90,31 @@ Then('user will verify BuildRuns section is visible', () => {
topologySidePane.verifySection('BuildRuns');
});

Then('user will see build running for {string}', (type: string) => {
Then('user will see build running for {string} of type {string}', (name: string, type: string) => {
if (type === 'Service') {
cy.get('g.odc-knative-service__label > text').click({ force: true });

cy.get('div.ocs-sidebar-tabsection:nth-child(6)')
.find('ul.list-group > li.so-build-run-item')
.should('have.length.greaterThan', 1);
} else {
cy.get('g.pf-topology__node__label > text').click({ force: true });
cy.byLegacyTestID(name).click('center');
cy.get('div.ocs-sidebar-tabsection:nth-child(5)')
.find('ul.list-group > li.so-build-run-item')
.should('have.length.greaterThan', 1);
}
});

When(
'user clicks on View logs button for buildrun for workload type {string} from the sidebar',
(type: string) => {
'user clicks on View logs button for buildrun for workload with name {string} and of type {string} from the sidebar',
(name: string, type: string) => {
if (type === 'Service') {
cy.get('g.odc-knative-service__label > text').click({ force: true });

cy.get('div.ocs-sidebar-tabsection:nth-child(6)').should('be.visible');
cy.get('ul.list-group > li.so-build-run-item').contains('View logs').click({ force: true });
} else {
cy.get('g.pf-topology__node__label > text').click({ force: true });
cy.byLegacyTestID(name).click('center');

cy.get('div.ocs-sidebar-tabsection:nth-child(5)').should('be.visible');
cy.get('ul.list-group > li.so-build-run-item').contains('View logs').click({ force: true });
Expand Down

0 comments on commit 7ea10c5

Please sign in to comment.