Skip to content
Open
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 @@ -25,7 +25,7 @@ export const searchResource = {
navigateToAdminMenu(adminNavigationBar.Home);
}
});
cy.get(adminNavigationMenuPO.home.search).click();
cy.get(adminNavigationMenuPO.home.search).scrollIntoView().click();
performResourceSearching(resourceName);
cy.get('[id="resource-dropdown-listbox"]').scrollTo('top', { ensureScrollable: false });
cy.byLegacyTestID('close-icon').should('be.visible').click({ force: true });
Expand Down
3 changes: 3 additions & 0 deletions frontend/packages/integration-tests/views/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const nav = {
// dropdown menu inside the toggle element, so .text() on the toggle
// itself would include menu item labels.
cy.byLegacyTestID('perspective-switcher-toggle')
.scrollIntoView()
.should('be.visible')
.then(($toggle) => {
if (text === switchPerspective.Administrator) {
Expand All @@ -32,6 +33,7 @@ export const nav = {
case 'Admin':
case 'admin':
cy.byLegacyTestID('perspective-switcher-toggle')
.scrollIntoView()
.should('be.visible')
.then(($toggle) => {
if ($toggle.attr('id') === 'core-platform-perspective') {
Expand Down Expand Up @@ -76,6 +78,7 @@ export const nav = {
// dropdown menu item text (PF appends the menu inside the toggle
// element via popperProps.appendTo).
cy.byLegacyTestID('perspective-switcher-toggle')
.scrollIntoView()
.should('be.visible')
.find('.pf-v6-c-menu-toggle__text')
.invoke('text')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Disabled due to createRoot concurrent rendering failures (OCPBUGS-82510)
@web-terminal @manual
@web-terminal
Feature: Web Terminal for Admin user
As a user with admin rights, I should be able to use web terminal


Background:
Given user has logged in
# And user is at administrator perspective
# And user has created or selected namespace "aut-terminal"
And user has closed existing terminal workspace


@regression @ODC-6463
Expand All @@ -33,7 +31,6 @@ Feature: Web Terminal for Admin user
And user clicks on Start button
Then user will see the terminal instance for namespace "openshift-terminal"
And user ID obtained by API should match with user id in yaml editor for "openshift-terminal" namespace
And user has closed existing terminal workspace


@smoke @ODC-6745
Expand All @@ -44,4 +41,3 @@ Feature: Web Terminal for Admin user
Then user will see the terminal window
And user will see the terminal instance for namespace "openshift-terminal"
And user ID obtained by API should match with user id in yaml editor for "openshift-terminal" namespace
And user has closed existing terminal workspace
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Given('user can see terminal icon on masthead', () => {

When('user clicks on the Web Terminal icon on the Masthead', () => {
webTerminalPage.clickOpenCloudShellBtn();
cy.get('cos-status-box cos-status-box--loading').should('not.exist');
cy.get('[data-test="loading-box"]').should('not.exist');
});

Then('user will see the terminal window', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import { switchPerspective } from '@console/dev-console/integration-tests/support/constants';
import { formPO } from '@console/dev-console/integration-tests/support/pageObjects';
import { webTerminalPO } from '@console/dev-console/integration-tests/support/pageObjects/webterminal-po';
import {
app,
perspective,
projectNameSpace,
} from '@console/dev-console/integration-tests/support/pages/app';
import { searchResource } from '@console/dev-console/integration-tests/support/pages/search-resources/search-page';
import { webTerminalPage } from './webTerminal-page';
import { app } from '@console/dev-console/integration-tests/support/pages/app';

export const initTerminalPage = {
clickOnProjectDropDown: () => {
Expand All @@ -25,26 +18,7 @@ export const initTerminalPage = {

clickStartButton: () => {
cy.get(formPO.create).should('be.enabled').click({ force: true });
cy.get('body').then(($body) => {
cy.wait(5000);
// Due to initialization issue if multiple operators present OCPBUGS-44891
if ($body.find('[data-test="loading-box-body"]').length === 0) {
cy.log('loading did not go through');
cy.wait(10000);
cy.get(webTerminalPO.closeTerminalIcon).click();
cy.reload();
app.waitForDocumentLoad();
perspective.switchTo(switchPerspective.Administrator);
cy.byLegacyTestID('topology-header').should('exist').click({ force: true });
projectNameSpace.selectProject('openshift-terminal');
webTerminalPage.clickOpenCloudShellBtn();
searchResource.searchResourceByNameAsAdmin('DevWorkspace');
searchResource.selectSearchedItem('terminal');
// cy.get('[data-test="loading-indicator"]').should('not.exist', { timeout: 210000 });
} else {
cy.wait(5000);
}
});
cy.get('[data-test="loading-box-body"]').should('exist');
},

selectProject: (projectName: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,15 @@ import {
import { checkTerminalIcon } from '@console/dev-console/integration-tests/support/pages/functions/checkTerminalIcon';
import { operatorsPage } from '@console/dev-console/integration-tests/support/pages/operators-page';
import { searchResource } from '@console/dev-console/integration-tests/support/pages/search-resources/search-page';
import { webTerminalPage } from '../pages/web-terminal/webTerminal-page';

Given('user has logged in', () => {
cy.login();
});

Given('user has closed existing terminal workspace', () => {
searchResource.searchResourceByNameAsAdmin('DevWorkspace');
cy.get('.loading-box').then(($body) => {
if ($body.find('[data-test="empty-box-body"]').length === 0) {
cy.log($body.find('[data-test="empty-box-body"]').length.toString());
searchResource.selectSearchedItem('terminal');
webTerminalPage.deleteTerminalInstanceActionMenu();
} else {
cy.log('No DevWorkspaces found');
}
cy.exec('oc delete devworkspaces --all -n openshift-terminal', {
failOnNonZeroExit: false,
timeout: 30000,
});
});

Expand All @@ -42,7 +35,7 @@ Given('user can see terminal icon on masthead', () => {

When('user clicks on the Web Terminal icon on the Masthead', () => {
cy.get(webTerminalPO.webTerminalIcon).click();
cy.get('cos-status-box cos-status-box--loading').should('not.exist');
cy.get('[data-test="loading-box"]').should('not.exist');
});

When('user clicks advanced option for Timeout', () => {
Expand Down