Skip to content

Commit b72c130

Browse files
committed
Reworked "clickStartButton"
Signed-off-by: Oleksii Korniienko <[email protected]>
1 parent d3879d4 commit b72c130

File tree

2 files changed

+5
-30
lines changed

2 files changed

+5
-30
lines changed

frontend/packages/webterminal-plugin/integration-tests/features/web-terminal/web-teminal-basic.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ Feature: Web Terminal
44

55
Background:
66
Given user has logged in as basic user
7-
And user has installed webTerminal in namespace "aut-terminal-basic"
7+
# And user has installed webTerminal in namespace "aut-terminal-basic"
88
And user has created or selected namespace "aut-terminal-basic"
99

1010
@regression
1111
Scenario: Open existing Web Terminal instance: WT-01-TC01
1212
When user clicks on the Web Terminal icon on the Masthead
1313
And user clicks advanced option for Timeout
14-
And user sets timeout to 1 Minute
14+
And user sets timeout to "1" Minute
1515
And user clicks on Start button
1616
Then user will see the terminal window
1717
And user close current Web Terminal session

frontend/packages/webterminal-plugin/integration-tests/support/step-definitions/pages/web-terminal/initTerminal-page.ts

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
import { switchPerspective } from '@console/dev-console/integration-tests/support/constants';
21
import { formPO } from '@console/dev-console/integration-tests/support/pageObjects';
32
import { webTerminalPO } from '@console/dev-console/integration-tests/support/pageObjects/webterminal-po';
4-
import {
5-
app,
6-
perspective,
7-
projectNameSpace,
8-
} from '@console/dev-console/integration-tests/support/pages/app';
9-
import { searchResource } from '@console/dev-console/integration-tests/support/pages/search-resources/search-page';
10-
import { webTerminalPage } from './webTerminal-page';
3+
import { app } from '@console/dev-console/integration-tests/support/pages/app';
114

125
export const initTerminalPage = {
136
clickOnProjectDropDown: () => {
@@ -25,26 +18,8 @@ export const initTerminalPage = {
2518

2619
clickStartButton: () => {
2720
cy.get(formPO.create).should('be.enabled').click({ force: true });
28-
cy.get('body').then(($body) => {
29-
cy.wait(5000);
30-
// Due to initialization issue if multiple operators present OCPBUGS-44891
31-
if ($body.find('[data-test="loading-box-body"]').length === 0) {
32-
cy.log('loading did not go through');
33-
cy.wait(10000);
34-
cy.get(webTerminalPO.terminalCloseWindowBtn).click();
35-
cy.reload();
36-
app.waitForDocumentLoad();
37-
perspective.switchTo(switchPerspective.Administrator);
38-
cy.byLegacyTestID('topology-header').should('exist').click({ force: true });
39-
projectNameSpace.selectProject('openshift-terminal');
40-
webTerminalPage.clickOpenCloudShellBtn();
41-
searchResource.searchResourceByNameAsAdmin('DevWorkspace');
42-
searchResource.selectSearchedItem('terminal');
43-
// cy.get('[data-test="loading-indicator"]').should('not.exist', { timeout: 210000 });
44-
} else {
45-
cy.wait(5000);
46-
}
47-
});
21+
cy.get('[data-test="loading-box-body"]').should('exist', { timeout: 5000 }); // wait for "loading..." appears
22+
cy.get('[data-test="loading-box-body"]').should('not.exist', { timeout: 90000 }); // wait for terminal loading
4823
},
4924

5025
selectProject: (projectName: string) => {

0 commit comments

Comments
 (0)