From ad8e2ea4711f6093dc22326ea0cb759789c0f1ff Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Fri, 20 Dec 2024 13:55:08 +0100 Subject: [PATCH 01/10] fix: adjust tests --- .../pull-integration-cluster-k3d.yml | 6 -- .../pull-integration-namespace-k3d.yml | 6 -- .../CommandPaletteProvider.tsx | 2 +- .../NamespaceChooser/NamespaceChooser.tsx | 2 +- src/hooks/useAvailableNamespaces.ts | 8 ++- .../DynamicPageComponent.js | 63 ++++++++++--------- .../components/GenericList/components.js | 2 +- src/shared/components/Labels/Labels.js | 2 + src/shared/hooks/BackendAPI/useGet.js | 2 +- src/state/useAfterInitHook.ts | 2 +- tests/integration/support/commands.js | 13 ++-- tests/integration/support/inspect-list.js | 2 +- .../test-acc-custom-resoureces.spec.js | 2 +- .../test-acc-performance.spec.js | 2 +- .../test-cluster-configuration.spec.js | 4 +- .../cluster/test-cluster-overview.spec.js | 13 ++-- .../test-cluster-role-bindings.spec.js | 7 ++- .../cluster/test-command-palette.spec.js | 5 +- .../cluster/test-custom-resources.spec.js | 8 +-- .../cluster/test-dashboard-version.spec.js | 7 +-- .../test-multiple-context-kubeconfig.spec.js | 10 ++- .../cluster/test-navigation-features.spec.js | 13 ++-- .../cluster/test-persistent-volumes.spec.js | 4 +- .../cluster/test-storage-classes.spec.js | 2 +- .../ext-test-extensibility.spec.js | 9 +-- .../kyma-cluster/test-kyma-modules.spec.js | 13 ++-- .../tests/kyma-namespace/a-run-before.spec.js | 3 +- .../tests/kyma-namespace/test-issuers.spec.js | 4 ++ .../tests/namespace/a-run-before.spec.js | 3 +- .../tests/namespace/test-jobs.spec.js | 4 +- .../namespace/test-namespace-overview.spec.js | 4 +- .../test-protected-resources.spec.js | 6 +- ...reduced-permissions--configuration.spec.js | 1 + .../test-reduced-permissions.spec.js | 2 +- .../test-resource-validation.spec.js | 6 +- .../namespace/test-service-accounts.spec.js | 5 +- .../tests/namespace/test-settings.spec.js | 9 +-- 37 files changed, 138 insertions(+), 118 deletions(-) diff --git a/.github/workflows/pull-integration-cluster-k3d.yml b/.github/workflows/pull-integration-cluster-k3d.yml index e87f7ebb9b..5b0180e2fa 100644 --- a/.github/workflows/pull-integration-cluster-k3d.yml +++ b/.github/workflows/pull-integration-cluster-k3d.yml @@ -16,12 +16,6 @@ jobs: runs-on: ubuntu-latest if: github.event.pull_request.draft == false steps: - - name: Install Chrome # this step could be removed after https://github.com/cypress-io/cypress/issues/30374 is resolved - shell: bash - run: | - wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_127.0.6533.119-1_amd64.deb - sudo apt install --allow-downgrades -y /tmp/chrome.deb - rm /tmp/chrome.deb - uses: gardenlinux/workflow-telemetry-action@v2 with: comment_on_pr: false diff --git a/.github/workflows/pull-integration-namespace-k3d.yml b/.github/workflows/pull-integration-namespace-k3d.yml index 5f2fb883a8..1359c8c519 100644 --- a/.github/workflows/pull-integration-namespace-k3d.yml +++ b/.github/workflows/pull-integration-namespace-k3d.yml @@ -16,12 +16,6 @@ jobs: runs-on: ubuntu-latest if: github.event.pull_request.draft == false steps: - - name: Install Chrome - shell: bash - run: | - wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_127.0.6533.119-1_amd64.deb - sudo apt install --allow-downgrades -y /tmp/chrome.deb - rm /tmp/chrome.deb - uses: gardenlinux/workflow-telemetry-action@v2 with: comment_on_pr: false diff --git a/src/command-pallette/CommandPaletteProvider.tsx b/src/command-pallette/CommandPaletteProvider.tsx index a641c65d9b..0202056e3d 100644 --- a/src/command-pallette/CommandPaletteProvider.tsx +++ b/src/command-pallette/CommandPaletteProvider.tsx @@ -16,7 +16,7 @@ export const CommandPaletteProvider = ({ >(); const setShowDialog = (value: boolean) => { - const modalPresent = document.querySelector('ui5-dialog[open="true"]'); + const modalPresent = document.querySelector('ui5-dialog[open]'); // disable opening palette if other modal is present if (!modalPresent || !value) { _setShowDialog(value); diff --git a/src/header/NamespaceChooser/NamespaceChooser.tsx b/src/header/NamespaceChooser/NamespaceChooser.tsx index a4168a9e1f..7f9851dbc0 100644 --- a/src/header/NamespaceChooser/NamespaceChooser.tsx +++ b/src/header/NamespaceChooser/NamespaceChooser.tsx @@ -42,7 +42,7 @@ export function NamespaceChooser() { />, ]; - allNamespaces.map(ns => + allNamespaces?.map(ns => namespaces.push( {}, + skip: false, }, ) as { loading: boolean; @@ -37,7 +37,10 @@ export function useAvailableNamespaces() { if (showHiddenNamespaces) return true; return !hiddenNamespaces.includes(n); }); - if (filteredNamespaces) { + if ( + filteredNamespaces && + JSON.stringify(filteredNamespaces) !== JSON.stringify(namespaces) + ) { setNamespaces(filteredNamespaces); } }, [ @@ -46,6 +49,7 @@ export function useAvailableNamespaces() { hiddenNamespaces, setNamespaces, showHiddenNamespaces, + namespaces, ]); return { namespaces, refetch, silentRefetch, setNamespaces }; diff --git a/src/shared/components/DynamicPageComponent/DynamicPageComponent.js b/src/shared/components/DynamicPageComponent/DynamicPageComponent.js index ed25639c62..de4f0b9567 100644 --- a/src/shared/components/DynamicPageComponent/DynamicPageComponent.js +++ b/src/shared/components/DynamicPageComponent/DynamicPageComponent.js @@ -11,6 +11,7 @@ import { } from '@ui5/webcomponents-react'; import { Toolbar } from '@ui5/webcomponents-react-compat/dist/components/Toolbar/index.js'; import { ToolbarSpacer } from '@ui5/webcomponents-react-compat/dist/components/ToolbarSpacer/index.js'; +import { ToolbarSeparator } from '@ui5/webcomponents-react-compat/dist/components/ToolbarSeparator/index.js'; import './DynamicPageComponent.scss'; import { useEffect, useState, useRef } from 'react'; @@ -163,15 +164,15 @@ export const DynamicPageComponent = ({ > {actions && ( - <> +
{actions} {(window.location.search.includes('layout') || (!window.location.search.includes('layout') && layoutColumn?.showCreate?.resourceType)) && layoutNumber !== 'StartColumn' ? ( - + ) : null} - +
)} {window.location.search.includes('layout') || (!window.location.search.includes('layout') && @@ -327,44 +328,46 @@ export const DynamicPageComponent = ({ hidePinButton={true} titleArea={headerTitle} headerArea={customHeaderContent ?? headerContent} - selectedSectionId={selectedSectionIdState} - onSelectedSectionChange={e => { - if (isFormOpen.formOpen) { - e.preventDefault(); - } - - handleActionIfFormOpen( - isResourceEdited, - setIsResourceEdited, - isFormOpen, - setIsFormOpen, - () => { - setSelectedSectionIdState(e.detail.selectedSectionId); - setIsResourceEdited({ - isEdited: false, - }); - }, - ); - - if (e.detail.selectedSectionI === 'edit') { - setIsFormOpen({ formOpen: true }); - } - }} ref={dynamicPage => handlePageRef(dynamicPage)} > { - const mode = event.detail.tab.getAttribute('data-mode'); - setSelectedSectionIdState(mode); + onTabSelect={e => { + if (isFormOpen.formOpen) { + e.preventDefault(); + } + + handleActionIfFormOpen( + isResourceEdited, + setIsResourceEdited, + isFormOpen, + setIsFormOpen, + () => { + setSelectedSectionIdState( + e.detail.tab.getAttribute('data-mode'), + ); + setIsResourceEdited({ + isEdited: false, + }); + }, + ); + + if (e.detail.tab.getAttribute('data-mode') === 'edit') { + setIsFormOpen({ formOpen: true }); + } }} > - + diff --git a/src/shared/components/GenericList/components.js b/src/shared/components/GenericList/components.js index 4bad7d571d..200d53dbc3 100644 --- a/src/shared/components/GenericList/components.js +++ b/src/shared/components/GenericList/components.js @@ -137,7 +137,7 @@ const DefaultRowRenderer = ({ ); return ( - + {cells} {!!actions.length && actionsCell} {displayArrow && ( diff --git a/src/shared/components/Labels/Labels.js b/src/shared/components/Labels/Labels.js index 62e2a14319..00f87cbecc 100644 --- a/src/shared/components/Labels/Labels.js +++ b/src/shared/components/Labels/Labels.js @@ -14,6 +14,7 @@ export const Labels = ({ style = null, displayLabelForLabels = false, disableMarginBottom = false, + hideIcon = true, }) => { const { t } = useTranslation(); if (!labels || Object.keys(labels).length === 0) { @@ -54,6 +55,7 @@ export const Labels = ({ className={`sap-margin-end-tiny ${ disableMarginBottom ? '' : 'sap-margin-bottom-tiny' }`} + hideStateIcon={hideIcon} > {shortenLongLabels && label.length > SHORTENING_TRESHOLD ? shortenLabel(label) diff --git a/src/shared/hooks/BackendAPI/useGet.js b/src/shared/hooks/BackendAPI/useGet.js index 24ac8eb4b5..b39181cff4 100644 --- a/src/shared/hooks/BackendAPI/useGet.js +++ b/src/shared/hooks/BackendAPI/useGet.js @@ -14,7 +14,7 @@ const ERROR_TOLERANCY = 2; const useGetHook = processDataFn => function( path, - { pollingInterval, onDataReceived, skip, errorTolerancy = undefined } = {}, + { pollingInterval, onDataReceived, skip, errorTolerancy } = {}, ) { const authData = useRecoilValue(authDataState); const lastAuthData = useRef(null); diff --git a/src/state/useAfterInitHook.ts b/src/state/useAfterInitHook.ts index 96c657c145..275b22c783 100644 --- a/src/state/useAfterInitHook.ts +++ b/src/state/useAfterInitHook.ts @@ -48,7 +48,7 @@ export function useAfterInitHook(handledKubeconfigId: KubeconfigIdHandleState) { } // cluster not yet loaded - if (!cluster === undefined) { + if (cluster === undefined) { return; } diff --git a/tests/integration/support/commands.js b/tests/integration/support/commands.js index 04b0410e65..68578fff0e 100644 --- a/tests/integration/support/commands.js +++ b/tests/integration/support/commands.js @@ -43,14 +43,14 @@ Cypress.Commands.add( Cypress.Commands.add('checkItemOnGenericListLink', resourceName => { cy.get('ui5-table-row') .find('ui5-table-cell') - .contains('span', resourceName) + .contains('ui5-text', resourceName) .should('be.visible'); }); Cypress.Commands.add('clickGenericListLink', resourceName => { cy.get('ui5-table-row') .find('ui5-table-cell') - .contains('span', resourceName) + .contains('ui5-text', resourceName) .click(); }); @@ -61,6 +61,7 @@ Cypress.Commands.add('filterWithNoValue', { prevSubject: true }, $elements => Cypress.Commands.add('goToNamespaceDetails', () => { // Go to the details of namespace cy.getLeftNav() + .find('ui5-side-navigation-item') .contains('Namespaces') .click(); @@ -177,8 +178,8 @@ Cypress.Commands.add( cy.wait(1000); if (selectSearchResult) { - cy.get('ui5-li-suggestion-item:visible') - .contains(resourceName) + cy.get('ui5-suggestion-item:visible') + .contains('li', resourceName) .click(); } @@ -233,7 +234,7 @@ Cypress.Commands.add( cy.get('ui5-table-row') .find('ui5-table-cell') - .contains('span', resourceName) + .contains('ui5-text', resourceName) .should('not.be.visible'); cy.getMidColumn() @@ -255,7 +256,7 @@ Cypress.Commands.add( cy.get('ui5-table-row') .find('ui5-table-cell') - .contains('span', resourceName) + .contains('ui5-text', resourceName) .should('not.be.visible'); cy.getEndColumn() diff --git a/tests/integration/support/inspect-list.js b/tests/integration/support/inspect-list.js index d93e116688..5cb3d7a890 100644 --- a/tests/integration/support/inspect-list.js +++ b/tests/integration/support/inspect-list.js @@ -6,5 +6,5 @@ Cypress.Commands.add('inspectList', (resourceName, hiddenButtons = false) => { .wait(1000) .type(`${resourceName}{enter}`); - cy.contains('span', resourceName).should('be.visible'); + cy.contains('ui5-text', resourceName).should('be.visible'); }); diff --git a/tests/integration/tests/accessibility/test-acc-custom-resoureces.spec.js b/tests/integration/tests/accessibility/test-acc-custom-resoureces.spec.js index 3d440e60d8..9cc11c5225 100644 --- a/tests/integration/tests/accessibility/test-acc-custom-resoureces.spec.js +++ b/tests/integration/tests/accessibility/test-acc-custom-resoureces.spec.js @@ -15,7 +15,7 @@ context('Accessibility test Custom Resources', () => { cy.navigateTo('Configuration', 'Custom Resource Definitions'); - cy.openCreate().click(); + cy.openCreate(); cy.wrap(loadFile(FILE_NAME)).then(CRD_CONFIG => { const CRD = JSON.stringify(CRD_CONFIG); diff --git a/tests/integration/tests/accessibility/test-acc-performance.spec.js b/tests/integration/tests/accessibility/test-acc-performance.spec.js index b224db89e8..1bae637c99 100644 --- a/tests/integration/tests/accessibility/test-acc-performance.spec.js +++ b/tests/integration/tests/accessibility/test-acc-performance.spec.js @@ -13,7 +13,7 @@ context('Accessibility test Cluster list and overview', () => { it('Acc test with performance panel open', () => { cy.get('[title="Profile"]').click(); - cy.get('ui5-menu-li:visible') + cy.get('ui5-menu-item:visible') .contains('Preferences') .click({ force: true }); diff --git a/tests/integration/tests/cluster/test-cluster-configuration.spec.js b/tests/integration/tests/cluster/test-cluster-configuration.spec.js index 8b74b75f6c..b8e148fba6 100644 --- a/tests/integration/tests/cluster/test-cluster-configuration.spec.js +++ b/tests/integration/tests/cluster/test-cluster-configuration.spec.js @@ -65,7 +65,7 @@ context('Test Cluster configuration', () => { cy.get('[title="Profile"]').click(); - cy.get('ui5-menu-li:visible') + cy.get('ui5-menu-item:visible') .contains('Preferences') .click({ force: true }); @@ -77,7 +77,7 @@ context('Test Cluster configuration', () => { .contains('20') .click(); - cy.get('ui5-list:visible') + cy.get('ui5-option:visible') .contains('10') .click(); diff --git a/tests/integration/tests/cluster/test-cluster-overview.spec.js b/tests/integration/tests/cluster/test-cluster-overview.spec.js index ce3efbf2f8..3feaec4e5a 100644 --- a/tests/integration/tests/cluster/test-cluster-overview.spec.js +++ b/tests/integration/tests/cluster/test-cluster-overview.spec.js @@ -52,7 +52,7 @@ context('Test Cluster Overview', () => { .get('.radial-chart') .contains('text.progress-label', '50%') .get('.radial-chart') - .contains('span.additional-info', 'test1233456'); + .contains('ui5-text.additional-info', 'test1233456'); // test injected statistical card exists and works cy.contains( @@ -62,7 +62,8 @@ context('Test Cluster Overview', () => { .find('ui5-link.counting-card__link') .click(); - cy.get('ui5-title') + cy.get('ui5-dynamic-page-title') + .find('ui5-title') .contains('Hpatest') .should('be.visible'); @@ -93,13 +94,17 @@ context('Test Cluster Overview', () => { cy.loginAndSelectCluster(); - cy.get('[name="feedback"]').should('exist'); + cy.get('ui5-shellbar') + .find('[name="feedback"]') + .should('exist'); cy.setBusolaFeature('FEEDBACK', false); cy.loginAndSelectCluster(); - cy.get('[name="feedback"]').should('not.exist'); + cy.get('ui5-shellbar') + .find('[name="feedback"]') + .should('not.exist'); }); it('Go to Node details', () => { diff --git a/tests/integration/tests/cluster/test-cluster-role-bindings.spec.js b/tests/integration/tests/cluster/test-cluster-role-bindings.spec.js index e61cb35aee..eba67e4643 100644 --- a/tests/integration/tests/cluster/test-cluster-role-bindings.spec.js +++ b/tests/integration/tests/cluster/test-cluster-role-bindings.spec.js @@ -52,11 +52,11 @@ context('Test Cluster Role Bindings', () => { cy.clickGenericListLink(CRB_NAME); cy.getMidColumn() - .contains('User') + .contains('ui5-table-cell', 'User') .should('be.visible'); cy.getMidColumn() - .contains(USER_NAME) + .contains('ui5-table-cell', USER_NAME) .should('be.visible'); cy.getMidColumn() @@ -71,7 +71,7 @@ context('Test Cluster Role Bindings', () => { cy.contains('[role="combobox"]', 'User').click(); - cy.get('ui5-li:visible') + cy.get('ui5-option:visible') .contains('ServiceAccount') .find('li') .click({ force: true }); @@ -96,6 +96,7 @@ context('Test Cluster Role Bindings', () => { cy.inspectTab('View'); cy.getMidColumn() + .find('ui5-table-cell') .contains('Group') .should('be.visible'); diff --git a/tests/integration/tests/cluster/test-command-palette.spec.js b/tests/integration/tests/cluster/test-command-palette.spec.js index 9528687ccc..b0881dea1e 100644 --- a/tests/integration/tests/cluster/test-command-palette.spec.js +++ b/tests/integration/tests/cluster/test-command-palette.spec.js @@ -149,9 +149,8 @@ context('Test Command Palette navigation', () => { getQueryInput().type('pref'); // autocomplete - cy.get('body') - .tab() - .type('{enter}', { force: true }); + cy.get('body').tab(); + getQueryInput().type('{enter}', { force: true }); cy.contains('Cluster interaction').should('be.visible'); diff --git a/tests/integration/tests/cluster/test-custom-resources.spec.js b/tests/integration/tests/cluster/test-custom-resources.spec.js index beac28f347..c47041385d 100644 --- a/tests/integration/tests/cluster/test-custom-resources.spec.js +++ b/tests/integration/tests/cluster/test-custom-resources.spec.js @@ -19,7 +19,7 @@ context('Test Custom Resources', () => { cy.navigateTo('Configuration', 'Custom Resource Definitions'); - cy.openCreate().click(); + cy.openCreate(); cy.wrap(loadFile(FILE_NAME)).then(CRD_CONFIG => { const CRD = JSON.stringify(CRD_CONFIG); @@ -92,6 +92,7 @@ context('Test Custom Resources', () => { }); it('Test column layout and remove CRD', () => { + cy.reload(); cy.getLeftNav() .contains('Custom Resources') .click(); @@ -107,14 +108,13 @@ context('Test Custom Resources', () => { cy.get('ui5-input[id="search-input"]:visible') .find('input') .wait(1000) - .clear() .type('cypress'); cy.clickGenericListLink('Tclusters'); cy.getMidColumn() .get('ui5-table-row') .find('ui5-table-cell') - .contains('span', 'tcluster-test') + .contains('ui5-text', 'tcluster-test') .click(); cy.testEndColumnLayout('tcluster-test', false); @@ -122,7 +122,7 @@ context('Test Custom Resources', () => { cy.getMidColumn() .get('ui5-table-row') .find('ui5-table-cell') - .contains('span', 'tcluster-test') + .contains('ui5-text', 'tcluster-test') .click(); cy.getMidColumn() diff --git a/tests/integration/tests/cluster/test-dashboard-version.spec.js b/tests/integration/tests/cluster/test-dashboard-version.spec.js index 2b64b0da8d..3dfef5b58d 100644 --- a/tests/integration/tests/cluster/test-dashboard-version.spec.js +++ b/tests/integration/tests/cluster/test-dashboard-version.spec.js @@ -10,13 +10,12 @@ context('Test Kyma Dashboard Version link', () => { it('Check Kyma Dashboard Version link', () => { cy.get('[title="Profile"]').click(); - cy.get('.ui5-menu-rp') - .find('ui5-menu-li:visible') + cy.get('ui5-menu') + .find('ui5-menu-item:visible') .contains('Legal Information') .click({ force: true }); - cy.get('ui5-responsive-popover[placement-type="Right"]') - .find('ui5-menu-li:visible') + cy.get('li:visible') .contains('Kyma Dashboard version:') .should('be.visible'); }); diff --git a/tests/integration/tests/cluster/test-multiple-context-kubeconfig.spec.js b/tests/integration/tests/cluster/test-multiple-context-kubeconfig.spec.js index 59c7598eae..97dbcabe21 100644 --- a/tests/integration/tests/cluster/test-multiple-context-kubeconfig.spec.js +++ b/tests/integration/tests/cluster/test-multiple-context-kubeconfig.spec.js @@ -64,21 +64,27 @@ context('Test multiple context kubeconfig', () => { .contains(kubeconfig['current-context']) .click(); - cy.get('ui5-li:visible').contains(kubeconfig.contexts[1].name); + cy.get('ui5-option:visible').contains(kubeconfig.contexts[1].name); - cy.get('ui5-li:visible') + cy.wait(3000); + + cy.get('ui5-option:visible') .contains('All contexts') .click(); + cy.wait(3000); cy.contains('Next').click({ force: true }); + cy.wait(3000); cy.get('ui5-button:visible') .contains('Next step') .click(); + cy.wait(3000); cy.get(`[accessible-name="last-step"]:visible`) .contains('Connect cluster') .click({ force: true }); + cy.wait(3000); cy.contains('Cluster Details').should('exist'); diff --git a/tests/integration/tests/cluster/test-navigation-features.spec.js b/tests/integration/tests/cluster/test-navigation-features.spec.js index 2c869ba928..d7b1f988a5 100644 --- a/tests/integration/tests/cluster/test-navigation-features.spec.js +++ b/tests/integration/tests/cluster/test-navigation-features.spec.js @@ -36,12 +36,17 @@ context('Test navigation features', () => { .wait(1000) .type('cronjob-controller'); - cy.get('ui5-li-suggestion-item:visible') - .contains('cronjob-controller') + cy.get('ui5-suggestion-item:visible') + .contains('li', /cronjob-controller/) .click(); - cy.contains('cronjob-controller (SA)') // link wrapper - .contains('cronjob-controller') // link itself + cy.wait(1000); + + cy.contains('ui5-text', 'system:controller:cronjob-controller').click(); + + cy.getMidColumn() + .contains('ui5-Panel', 'Subjects') + .contains('ui5-link', 'cronjob-controller') .click(); cy.contains('disabled').should('exist'); diff --git a/tests/integration/tests/cluster/test-persistent-volumes.spec.js b/tests/integration/tests/cluster/test-persistent-volumes.spec.js index 53684e49d8..a872177be8 100644 --- a/tests/integration/tests/cluster/test-persistent-volumes.spec.js +++ b/tests/integration/tests/cluster/test-persistent-volumes.spec.js @@ -28,7 +28,7 @@ context('Test Persistent Volumes', () => { it('Create PV with NFS', () => { cy.navigateTo('Storage', 'Persistent Volumes'); - cy.openCreate().click(); + cy.openCreate(); cy.wrap(loadPV(PV_NFS_NAME, 'test-persistent-volume-NFS.yaml')).then( PV_CONFIG => { @@ -83,7 +83,7 @@ context('Test Persistent Volumes', () => { }); it('Create PV with CSI', () => { - cy.openCreate().click(); + cy.openCreate(); cy.wrap(loadPV(PV_CSI_NAME, 'test-persistent-volume-CSI.yaml')).then( PV_CONFIG => { diff --git a/tests/integration/tests/cluster/test-storage-classes.spec.js b/tests/integration/tests/cluster/test-storage-classes.spec.js index c341af0c0e..8db71fa929 100644 --- a/tests/integration/tests/cluster/test-storage-classes.spec.js +++ b/tests/integration/tests/cluster/test-storage-classes.spec.js @@ -20,7 +20,7 @@ context('Test Storage Classes', () => { it('Create Storage Class', () => { cy.navigateTo('Storage', 'Storage Classes'); - cy.openCreate().click(); + cy.openCreate(); cy.wrap(loadSC(Cypress.env('STORAGE_CLASS_NAME'))).then(SC_CONFIG => { const SC = JSON.stringify(SC_CONFIG); diff --git a/tests/integration/tests/extensibility/ext-test-extensibility.spec.js b/tests/integration/tests/extensibility/ext-test-extensibility.spec.js index 1ae9f6efc4..a79af225fd 100644 --- a/tests/integration/tests/extensibility/ext-test-extensibility.spec.js +++ b/tests/integration/tests/extensibility/ext-test-extensibility.spec.js @@ -95,8 +95,8 @@ context('Test Extensibility Create/Update', () => { .wait(1000) .clear() .type(EXTENSION_NAME) - .get('ui5-li-suggestion-item:visible') - .contains(EXTENSION_NAME) + .get('ui5-suggestion-item:visible') + .contains('li', EXTENSION_NAME) .click(); cy.get('ui5-table-row') @@ -123,8 +123,8 @@ context('Test Extensibility Create/Update', () => { .wait(1000) .clear() .type(EXTENSION_NAME) - .get('ui5-li-suggestion-item:visible') - .contains(EXTENSION_NAME) + .get('ui5-suggestion-item:visible') + .contains('li', EXTENSION_NAME) .click(); cy.clickGenericListLink(EXTENSION_NAME); @@ -140,6 +140,7 @@ context('Test Extensibility Create/Update', () => { cy.get('@form') .get('[data-testid="details-view"]') + .findMonaco(monacoCount) .scrollIntoView() .within(() => { cy.pasteToMonaco(input); diff --git a/tests/integration/tests/kyma-cluster/test-kyma-modules.spec.js b/tests/integration/tests/kyma-cluster/test-kyma-modules.spec.js index 660dc26b65..cb33f074b9 100644 --- a/tests/integration/tests/kyma-cluster/test-kyma-modules.spec.js +++ b/tests/integration/tests/kyma-cluster/test-kyma-modules.spec.js @@ -33,14 +33,15 @@ context('Test Kyma Modules views', () => { it('Test adding Modules', () => { cy.get('ui5-table') - .find('ui5-illustrated-message[title-text="No modules"]') + .find('ui5-illustrated-message') + .find('ui5-title', 'No modules') .should('be.visible'); - cy.get('div[data-component-name="DynamicPageHeader"]') + cy.get('ui5-dynamic-page-header') .contains('Release channel') .should('be.visible'); - cy.get('div[data-component-name="DynamicPageHeader"]') + cy.get('ui5-dynamic-page-header') .contains('regular') .should('be.visible'); @@ -165,7 +166,7 @@ context('Test Kyma Modules views', () => { cy.wait(500); - cy.get('ui5-li:visible') + cy.get('ui5-option:visible') .contains(/^Fast .*/) .click(); @@ -210,7 +211,7 @@ context('Test Kyma Modules views', () => { .find('ui5-select') .click(); - cy.get('ui5-li:visible') + cy.get('ui5-option:visible') .contains(/Predefined .*/) .filter(':visible') .find('li') @@ -260,7 +261,7 @@ context('Test Kyma Modules views', () => { .clear(); cy.get('ui5-table') - .find('ui5-illustrated-message[title-text="No modules"]') + .contains('ui5-illustrated-message', 'No modules') .should('be.visible'); }); }); diff --git a/tests/integration/tests/kyma-namespace/a-run-before.spec.js b/tests/integration/tests/kyma-namespace/a-run-before.spec.js index 0a299bf1b3..64ac992939 100644 --- a/tests/integration/tests/kyma-namespace/a-run-before.spec.js +++ b/tests/integration/tests/kyma-namespace/a-run-before.spec.js @@ -27,10 +27,9 @@ context('Create Namespace', () => { .find('ui5-icon[accessible-name="Select Options"]') .click(); - cy.get('ui5-static-area') + cy.get('ui5-responsive-popover') .find('ui5-li:visible') .contains('XL (limits: 9Gi, requests: 8.4Gi)') - .find('li[role="listitem"]') .click({ force: true }); cy.get('.create-form') diff --git a/tests/integration/tests/kyma-namespace/test-issuers.spec.js b/tests/integration/tests/kyma-namespace/test-issuers.spec.js index f73fff479f..bbf5134702 100644 --- a/tests/integration/tests/kyma-namespace/test-issuers.spec.js +++ b/tests/integration/tests/kyma-namespace/test-issuers.spec.js @@ -10,6 +10,8 @@ context('Test Issuers', () => { cy.loginAndSelectCluster(); cy.goToNamespaceDetails(); + cy.wait(1000); + cy.navigateTo('Configuration', 'Secrets'); cy.openCreate(); @@ -85,6 +87,8 @@ context('Test Issuers', () => { .find('input') .type('other.server.com{enter}another.server.com', { force: true }); + cy.wait(2000); + cy.saveChanges('Edit'); cy.getMidColumn().inspectTab('View'); }); diff --git a/tests/integration/tests/namespace/a-run-before.spec.js b/tests/integration/tests/namespace/a-run-before.spec.js index 0a299bf1b3..64ac992939 100644 --- a/tests/integration/tests/namespace/a-run-before.spec.js +++ b/tests/integration/tests/namespace/a-run-before.spec.js @@ -27,10 +27,9 @@ context('Create Namespace', () => { .find('ui5-icon[accessible-name="Select Options"]') .click(); - cy.get('ui5-static-area') + cy.get('ui5-responsive-popover') .find('ui5-li:visible') .contains('XL (limits: 9Gi, requests: 8.4Gi)') - .find('li[role="listitem"]') .click({ force: true }); cy.get('.create-form') diff --git a/tests/integration/tests/namespace/test-jobs.spec.js b/tests/integration/tests/namespace/test-jobs.spec.js index 28815fd957..1f7a906a23 100644 --- a/tests/integration/tests/namespace/test-jobs.spec.js +++ b/tests/integration/tests/namespace/test-jobs.spec.js @@ -100,7 +100,7 @@ context('Test Jobs', () => { .find('ui5-panel') .find('ui5-table-row') .find('ui5-table-cell') - .contains('span', JOB_NAME) + .contains('ui5-text', JOB_NAME) .click(); cy.wait(1000); @@ -149,7 +149,7 @@ context('Test Jobs', () => { cy.contains('After a Job is created, the containers are read-only.'); cy.get('.edit-form') - .get('ui5-button[icon="add"][disabled="true"]') + .get('ui5-button[icon="add"][disabled]') .contains('Add Container') .should('be.visible'); diff --git a/tests/integration/tests/namespace/test-namespace-overview.spec.js b/tests/integration/tests/namespace/test-namespace-overview.spec.js index 2d2f1b4efe..7001aee1fb 100644 --- a/tests/integration/tests/namespace/test-namespace-overview.spec.js +++ b/tests/integration/tests/namespace/test-namespace-overview.spec.js @@ -15,13 +15,13 @@ context( }); it('Check sections of namespace details', () => { - cy.contains('span', LIMIT_NAME) + cy.contains('ui5-text', LIMIT_NAME) .scrollIntoView() .should('be.visible'); cy.contains('Container').should('be.visible'); - cy.contains('span', QUOTA_NAME) + cy.contains('ui5-text', QUOTA_NAME) .scrollIntoView() .should('be.visible'); diff --git a/tests/integration/tests/namespace/test-protected-resources.spec.js b/tests/integration/tests/namespace/test-protected-resources.spec.js index 80a669b74f..1b52013167 100644 --- a/tests/integration/tests/namespace/test-protected-resources.spec.js +++ b/tests/integration/tests/namespace/test-protected-resources.spec.js @@ -82,7 +82,7 @@ context('Test Protected Resources', () => { cy.clickGenericListLink(NAME); - cy.get('ui5-button[disabled="true"]') + cy.get('ui5-button[disabled]') .should('contain.text', 'Delete') .should('be.visible'); }); @@ -111,14 +111,14 @@ context('Test Protected Resources', () => { cy.getMidColumn() .contains('ui5-table-row', NAME) - .find('[accessible-name="Delete"][disabled="true"]') + .find('[accessible-name="Delete"][disabled]') .should('exist'); }); it('Change protection setting', () => { cy.get('[title="Profile"]').click(); - cy.get('ui5-menu-li:visible') + cy.get('ui5-menu-item:visible') .contains('Preferences') .click({ force: true }); diff --git a/tests/integration/tests/namespace/test-reduced-permissions--configuration.spec.js b/tests/integration/tests/namespace/test-reduced-permissions--configuration.spec.js index 286c08186b..181772501b 100644 --- a/tests/integration/tests/namespace/test-reduced-permissions--configuration.spec.js +++ b/tests/integration/tests/namespace/test-reduced-permissions--configuration.spec.js @@ -106,6 +106,7 @@ context('Test reduced permissions 2', () => { .click(); cy.getLeftNav() + .find('ui5-side-navigation-item') .contains('Namespaces') .click(); diff --git a/tests/integration/tests/namespace/test-reduced-permissions.spec.js b/tests/integration/tests/namespace/test-reduced-permissions.spec.js index 3a077443b5..59e6499528 100644 --- a/tests/integration/tests/namespace/test-reduced-permissions.spec.js +++ b/tests/integration/tests/namespace/test-reduced-permissions.spec.js @@ -99,7 +99,7 @@ context('Test reduced permissions', () => { .get('ui5-select:visible') .click(); - cy.get('ui5-li:visible') + cy.get('ui5-option:visible') .contains('ServiceAccount') .find('li') .click({ force: true }); diff --git a/tests/integration/tests/namespace/test-resource-validation.spec.js b/tests/integration/tests/namespace/test-resource-validation.spec.js index 2f166a0cce..14b5ce7344 100644 --- a/tests/integration/tests/namespace/test-resource-validation.spec.js +++ b/tests/integration/tests/namespace/test-resource-validation.spec.js @@ -41,7 +41,7 @@ context('Test resource validation', () => { it('Disables resource validation via preferences', () => { cy.get('[title="Profile"]').click(); - cy.get('ui5-menu-li:visible') + cy.get('ui5-menu-item:visible') .contains('Preferences') .click({ force: true }); @@ -80,7 +80,7 @@ context('Test resource validation', () => { it('Customize resource validation policies via preferences', () => { cy.get('[title="Profile"]').click(); - cy.get('ui5-menu-li:visible') + cy.get('ui5-menu-item:visible') .contains('Preferences') .click({ force: true }); @@ -136,7 +136,7 @@ context('Test resource validation', () => { cy.get('[title="Profile"]').click(); - cy.get('ui5-menu-li:visible') + cy.get('ui5-menu-item:visible') .contains('Preferences') .click({ force: true }); diff --git a/tests/integration/tests/namespace/test-service-accounts.spec.js b/tests/integration/tests/namespace/test-service-accounts.spec.js index 5084267d4d..989e9bcfc2 100644 --- a/tests/integration/tests/namespace/test-service-accounts.spec.js +++ b/tests/integration/tests/namespace/test-service-accounts.spec.js @@ -98,15 +98,16 @@ context('Test Service Accounts', () => { }); it('Generate TokenRequest', () => { - cy.get('[data-component-name="ToolbarChildContainer"]') + cy.getMidColumn() .contains('ui5-button', 'Generate TokenRequest') .click(); + cy.contains('TokenRequest generated').should('be.visible'); + cy.contains( 'The TokenRequest allows you to log in with your ServiceAccount credentials.', ).should('be.visible'); - cy.contains('TokenRequest generated').should('be.visible'); cy.readFile(filepath).should('not.exist'); //check if TokenRequest is being generated after value change diff --git a/tests/integration/tests/namespace/test-settings.spec.js b/tests/integration/tests/namespace/test-settings.spec.js index 46bed4327d..dda048aa31 100644 --- a/tests/integration/tests/namespace/test-settings.spec.js +++ b/tests/integration/tests/namespace/test-settings.spec.js @@ -11,7 +11,7 @@ context('Test app settings and preferences', () => { it('Deletes without confirmation', () => { cy.get('[title="Profile"]').click(); - cy.get('ui5-menu-li:visible') + cy.get('ui5-menu-item:visible') .contains('Preferences') .click({ force: true }); @@ -52,7 +52,7 @@ context('Test app settings and preferences', () => { // disable "deletion without confirmation" to not mess other tests cy.get('[title="Profile"]').click(); - cy.get('ui5-menu-li:visible') + cy.get('ui5-menu-item:visible') .contains('Preferences') .click({ force: true }); @@ -71,7 +71,7 @@ context('Test app settings and preferences', () => { it('Changes application theme', () => { cy.get('[title="Profile"]').click(); - cy.get('ui5-menu-li:visible') + cy.get('ui5-menu-item:visible') .contains('Preferences') .click({ force: true }); @@ -96,7 +96,7 @@ context('Test app settings and preferences', () => { it('Shows hidden namespaces', () => { cy.get('[title="Profile"]').click(); - cy.get('ui5-menu-li:visible') + cy.get('ui5-menu-item:visible') .contains('Preferences') .click({ force: true }); @@ -123,6 +123,7 @@ context('Test app settings and preferences', () => { .click(); cy.getLeftNav() + .find('ui5-side-navigation-item') .contains('Namespaces') .click(); From e29c66e775b1f7036f3b74210e136592a6fe5ac3 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Fri, 20 Dec 2024 13:59:34 +0100 Subject: [PATCH 02/10] fix: adjust more tests --- .../tests/extensibility/ext-test-extensibility.spec.js | 2 +- tests/integration/tests/kyma-namespace/a-run-before.spec.js | 6 +++--- tests/integration/tests/kyma-namespace/test-issuers.spec.js | 6 +++++- tests/integration/tests/namespace/test-jobs.spec.js | 2 +- .../tests/namespace/test-reduced-permissions.spec.js | 6 +----- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/integration/tests/extensibility/ext-test-extensibility.spec.js b/tests/integration/tests/extensibility/ext-test-extensibility.spec.js index a79af225fd..0b73e1aaab 100644 --- a/tests/integration/tests/extensibility/ext-test-extensibility.spec.js +++ b/tests/integration/tests/extensibility/ext-test-extensibility.spec.js @@ -140,7 +140,7 @@ context('Test Extensibility Create/Update', () => { cy.get('@form') .get('[data-testid="details-view"]') - .findMonaco(monacoCount) + .findMonaco() .scrollIntoView() .within(() => { cy.pasteToMonaco(input); diff --git a/tests/integration/tests/kyma-namespace/a-run-before.spec.js b/tests/integration/tests/kyma-namespace/a-run-before.spec.js index 64ac992939..abe952391a 100644 --- a/tests/integration/tests/kyma-namespace/a-run-before.spec.js +++ b/tests/integration/tests/kyma-namespace/a-run-before.spec.js @@ -27,9 +27,9 @@ context('Create Namespace', () => { .find('ui5-icon[accessible-name="Select Options"]') .click(); - cy.get('ui5-responsive-popover') - .find('ui5-li:visible') - .contains('XL (limits: 9Gi, requests: 8.4Gi)') + cy.get('ui5-responsive-popover:visible') + .contains('ui5-li:visible', 'XL (limits: 9Gi, requests: 8.4Gi)') + .find('li') .click({ force: true }); cy.get('.create-form') diff --git a/tests/integration/tests/kyma-namespace/test-issuers.spec.js b/tests/integration/tests/kyma-namespace/test-issuers.spec.js index bbf5134702..e1f8a21e68 100644 --- a/tests/integration/tests/kyma-namespace/test-issuers.spec.js +++ b/tests/integration/tests/kyma-namespace/test-issuers.spec.js @@ -85,7 +85,11 @@ context('Test Issuers', () => { cy.get('[placeholder^="Domain"]:visible') .find('input') - .type('other.server.com{enter}another.server.com', { force: true }); + .type('other.server.com', { force: true }); + + cy.get('[placeholder^="Domain"]:visible') + .find('input') + .type('another.server.com', { force: true }); cy.wait(2000); diff --git a/tests/integration/tests/namespace/test-jobs.spec.js b/tests/integration/tests/namespace/test-jobs.spec.js index 1f7a906a23..376bdaf2bf 100644 --- a/tests/integration/tests/namespace/test-jobs.spec.js +++ b/tests/integration/tests/namespace/test-jobs.spec.js @@ -181,6 +181,6 @@ context('Test Jobs', () => { .contains(/^Jobs/) .click(); - cy.contains('span', JOB_NAME).should('be.visible'); + cy.contains('ui5-text', JOB_NAME).should('be.visible'); }); }); diff --git a/tests/integration/tests/namespace/test-reduced-permissions.spec.js b/tests/integration/tests/namespace/test-reduced-permissions.spec.js index 59e6499528..5f737e358d 100644 --- a/tests/integration/tests/namespace/test-reduced-permissions.spec.js +++ b/tests/integration/tests/namespace/test-reduced-permissions.spec.js @@ -132,6 +132,7 @@ context('Test reduced permissions', () => { it('Download kubeconfig for Service Account', () => { cy.getLeftNav() + .find('ui5-side-navigation-item') .contains('Namespaces') .click(); @@ -144,11 +145,6 @@ context('Test reduced permissions', () => { cy.clickGenericListLink(SA_NAME); cy.getMidColumn() - .find('header') - .find('ui5-toggle-button:visible') - .click(); - - cy.get('[data-component-name="ToolbarOverflowPopoverContent"]') .find('ui5-button[accessible-name="enter-full-screen"]') .click(); From 755c9078b5f0b5bf3198cb30ebad3dc3c1872efe Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Fri, 20 Dec 2024 14:01:29 +0100 Subject: [PATCH 03/10] fix: selected in list --- src/shared/components/GenericList/components.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/GenericList/components.js b/src/shared/components/GenericList/components.js index 200d53dbc3..4bad7d571d 100644 --- a/src/shared/components/GenericList/components.js +++ b/src/shared/components/GenericList/components.js @@ -137,7 +137,7 @@ const DefaultRowRenderer = ({ ); return ( - + {cells} {!!actions.length && actionsCell} {displayArrow && ( From dbed0cb3350346cc94a16aa09a59d7271bebea64 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Fri, 20 Dec 2024 14:23:25 +0100 Subject: [PATCH 04/10] comment out rebase action --- .github/actions/rebase/action.yml | 60 ++++++++++++++++--------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/.github/actions/rebase/action.yml b/.github/actions/rebase/action.yml index 4e6d0cec0b..9998c0323d 100644 --- a/.github/actions/rebase/action.yml +++ b/.github/actions/rebase/action.yml @@ -1,36 +1,38 @@ name: 'Rebase' description: 'Action for rebasing to the main branch' -runs: - using: 'composite' - steps: - # Setup identity to avoid errors when git is trying to rebase without identity set - - name: Setup git identity - run: | - git config --global user.email "rebase@action.com" - git config --global user.name "Rebase Action" - shell: bash +# TODO UNCOMMENT BEFORE FEATURE BRANCH MERGE! - # Update origin/main branch locally to cover case when repo is not fully cloned - # for example when using `actions/checkout@v4` action with default `fetch-depth` value (1) - # read more: https://github.com/actions/checkout?tab=readme-ov-file#usage - - name: Update origin/main - run: | - git fetch origin main - git checkout origin/main - git checkout -B main - git pull --unshallow origin main +# runs: +# using: 'composite' +# steps: +# # Setup identity to avoid errors when git is trying to rebase without identity set +# - name: Setup git identity +# run: | +# git config --global user.email "rebase@action.com" +# git config --global user.name "Rebase Action" +# shell: bash - # go back to the HEAD commit - git switch --detach ${{ github.sha }} - shell: bash +# # Update origin/main branch locally to cover case when repo is not fully cloned +# # for example when using `actions/checkout@v4` action with default `fetch-depth` value (1) +# # read more: https://github.com/actions/checkout?tab=readme-ov-file#usage +# - name: Update origin/main +# run: | +# git fetch origin main +# git checkout origin/main +# git checkout -B main +# git pull --unshallow origin main - - name: Rebase to main - run: | - git rebase main - shell: bash +# # go back to the HEAD commit +# git switch --detach ${{ github.sha }} +# shell: bash - - name: Print branch log - run: | - git log origin/main~1.. - shell: bash +# - name: Rebase to main +# run: | +# git rebase main +# shell: bash + +# - name: Print branch log +# run: | +# git log origin/main~1.. +# shell: bash From 84f5fbf2175703b85f2f0d3418a7cd8f9351337d Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Fri, 20 Dec 2024 14:26:04 +0100 Subject: [PATCH 05/10] comment out rebase action v2 --- .github/actions/rebase/action.yml | 60 +++++++++---------- .../pull-integration-cluster-k3d.yml | 2 +- .../pull-integration-namespace-k3d.yml | 2 +- .../workflows/pull-kyma-integration-tests.yml | 2 +- .github/workflows/pull-lighthouse.yml | 2 +- .github/workflows/pull-smoke-test-prod.yml | 2 +- .github/workflows/pull-smoke-test-stage.yml | 2 +- 7 files changed, 35 insertions(+), 37 deletions(-) diff --git a/.github/actions/rebase/action.yml b/.github/actions/rebase/action.yml index 9998c0323d..4e6d0cec0b 100644 --- a/.github/actions/rebase/action.yml +++ b/.github/actions/rebase/action.yml @@ -1,38 +1,36 @@ name: 'Rebase' description: 'Action for rebasing to the main branch' -# TODO UNCOMMENT BEFORE FEATURE BRANCH MERGE! +runs: + using: 'composite' + steps: + # Setup identity to avoid errors when git is trying to rebase without identity set + - name: Setup git identity + run: | + git config --global user.email "rebase@action.com" + git config --global user.name "Rebase Action" + shell: bash -# runs: -# using: 'composite' -# steps: -# # Setup identity to avoid errors when git is trying to rebase without identity set -# - name: Setup git identity -# run: | -# git config --global user.email "rebase@action.com" -# git config --global user.name "Rebase Action" -# shell: bash + # Update origin/main branch locally to cover case when repo is not fully cloned + # for example when using `actions/checkout@v4` action with default `fetch-depth` value (1) + # read more: https://github.com/actions/checkout?tab=readme-ov-file#usage + - name: Update origin/main + run: | + git fetch origin main + git checkout origin/main + git checkout -B main + git pull --unshallow origin main -# # Update origin/main branch locally to cover case when repo is not fully cloned -# # for example when using `actions/checkout@v4` action with default `fetch-depth` value (1) -# # read more: https://github.com/actions/checkout?tab=readme-ov-file#usage -# - name: Update origin/main -# run: | -# git fetch origin main -# git checkout origin/main -# git checkout -B main -# git pull --unshallow origin main + # go back to the HEAD commit + git switch --detach ${{ github.sha }} + shell: bash -# # go back to the HEAD commit -# git switch --detach ${{ github.sha }} -# shell: bash + - name: Rebase to main + run: | + git rebase main + shell: bash -# - name: Rebase to main -# run: | -# git rebase main -# shell: bash - -# - name: Print branch log -# run: | -# git log origin/main~1.. -# shell: bash + - name: Print branch log + run: | + git log origin/main~1.. + shell: bash diff --git a/.github/workflows/pull-integration-cluster-k3d.yml b/.github/workflows/pull-integration-cluster-k3d.yml index 5b0180e2fa..ad798d6c40 100644 --- a/.github/workflows/pull-integration-cluster-k3d.yml +++ b/.github/workflows/pull-integration-cluster-k3d.yml @@ -20,7 +20,7 @@ jobs: with: comment_on_pr: false - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase + #- uses: ./.github/actions/rebase # TODO UNCOMMENT BEFORE FEATURE BRANCH MERGE! - name: Create Single Cluster uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0 with: diff --git a/.github/workflows/pull-integration-namespace-k3d.yml b/.github/workflows/pull-integration-namespace-k3d.yml index 1359c8c519..44990b2914 100644 --- a/.github/workflows/pull-integration-namespace-k3d.yml +++ b/.github/workflows/pull-integration-namespace-k3d.yml @@ -20,7 +20,7 @@ jobs: with: comment_on_pr: false - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase + #- uses: ./.github/actions/rebase # TODO UNCOMMENT BEFORE FEATURE BRANCH MERGE! - name: Create Single Cluster uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0 with: diff --git a/.github/workflows/pull-kyma-integration-tests.yml b/.github/workflows/pull-kyma-integration-tests.yml index 60fc82f6bc..ae21249edd 100644 --- a/.github/workflows/pull-kyma-integration-tests.yml +++ b/.github/workflows/pull-kyma-integration-tests.yml @@ -21,7 +21,7 @@ jobs: with: comment_on_pr: false - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase + #- uses: ./.github/actions/rebase # TODO UNCOMMENT BEFORE FEATURE BRANCH MERGE! - name: Install k3d env: K3D_URL: https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh diff --git a/.github/workflows/pull-lighthouse.yml b/.github/workflows/pull-lighthouse.yml index d1d71ccf07..bd0421d49b 100644 --- a/.github/workflows/pull-lighthouse.yml +++ b/.github/workflows/pull-lighthouse.yml @@ -19,7 +19,7 @@ jobs: with: comment_on_pr: false - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase + #- uses: ./.github/actions/ # TODO UNCOMMENT BEFORE FEATURE BRANCH MERGE! - name: Create Single Cluster uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0 with: diff --git a/.github/workflows/pull-smoke-test-prod.yml b/.github/workflows/pull-smoke-test-prod.yml index 9ba14d5f26..1c68eae96b 100644 --- a/.github/workflows/pull-smoke-test-prod.yml +++ b/.github/workflows/pull-smoke-test-prod.yml @@ -21,7 +21,7 @@ jobs: with: comment_on_pr: false - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase + #- uses: ./.github/actions/ # TODO UNCOMMENT BEFORE FEATURE BRANCH MERGE! - name: Install k3d env: K3D_URL: https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh diff --git a/.github/workflows/pull-smoke-test-stage.yml b/.github/workflows/pull-smoke-test-stage.yml index 0d1b6d4015..3749ee8b27 100644 --- a/.github/workflows/pull-smoke-test-stage.yml +++ b/.github/workflows/pull-smoke-test-stage.yml @@ -21,7 +21,7 @@ jobs: with: comment_on_pr: false - uses: actions/checkout@v4 - - uses: ./.github/actions/rebase + #- uses: ./.github/actions/ # TODO UNCOMMENT BEFORE FEATURE BRANCH MERGE! - name: Install k3d env: K3D_URL: https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh From dfd891e4e0034117de1711b35391aad69569f1a1 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Fri, 20 Dec 2024 14:48:54 +0100 Subject: [PATCH 06/10] fix: create namespace --- .../integration/tests/kyma-namespace/a-run-before.spec.js | 1 - tests/integration/tests/namespace/a-run-before.spec.js | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/integration/tests/kyma-namespace/a-run-before.spec.js b/tests/integration/tests/kyma-namespace/a-run-before.spec.js index abe952391a..8053a6bdfe 100644 --- a/tests/integration/tests/kyma-namespace/a-run-before.spec.js +++ b/tests/integration/tests/kyma-namespace/a-run-before.spec.js @@ -24,7 +24,6 @@ context('Create Namespace', () => { cy.get('[aria-label="Apply Total Memory Quotas, collapsed"]') .find('ui5-combobox[placeholder="Choose template"]:visible') - .find('ui5-icon[accessible-name="Select Options"]') .click(); cy.get('ui5-responsive-popover:visible') diff --git a/tests/integration/tests/namespace/a-run-before.spec.js b/tests/integration/tests/namespace/a-run-before.spec.js index 64ac992939..8053a6bdfe 100644 --- a/tests/integration/tests/namespace/a-run-before.spec.js +++ b/tests/integration/tests/namespace/a-run-before.spec.js @@ -24,12 +24,11 @@ context('Create Namespace', () => { cy.get('[aria-label="Apply Total Memory Quotas, collapsed"]') .find('ui5-combobox[placeholder="Choose template"]:visible') - .find('ui5-icon[accessible-name="Select Options"]') .click(); - cy.get('ui5-responsive-popover') - .find('ui5-li:visible') - .contains('XL (limits: 9Gi, requests: 8.4Gi)') + cy.get('ui5-responsive-popover:visible') + .contains('ui5-li:visible', 'XL (limits: 9Gi, requests: 8.4Gi)') + .find('li') .click({ force: true }); cy.get('.create-form') From 19af2571c99462ae228cfb59a3dba56309841550 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Fri, 20 Dec 2024 15:28:22 +0100 Subject: [PATCH 07/10] fix: adjust comboboxes --- .../tests/extensibility/ext-test-variables.spec.js | 1 - .../integration/tests/kyma-namespace/test-issuers.spec.js | 2 +- tests/integration/tests/namespace/test-cron-jobs.spec.js | 8 ++------ .../tests/namespace/test-service-accounts.spec.js | 2 +- tests/integration/tests/namespace/z-run-after.spec.js | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/integration/tests/extensibility/ext-test-variables.spec.js b/tests/integration/tests/extensibility/ext-test-variables.spec.js index 1e685fcd2c..3ad8a0c0d3 100644 --- a/tests/integration/tests/extensibility/ext-test-variables.spec.js +++ b/tests/integration/tests/extensibility/ext-test-variables.spec.js @@ -163,7 +163,6 @@ context('Test extensibility variables', () => { // test presets cy.get('@form') .get('ui5-combobox[placeholder="Choose template"]:visible') - .find('ui5-icon[accessible-name="Select Options"]') .click(); cy.get('ui5-li:visible') diff --git a/tests/integration/tests/kyma-namespace/test-issuers.spec.js b/tests/integration/tests/kyma-namespace/test-issuers.spec.js index e1f8a21e68..05120db448 100644 --- a/tests/integration/tests/kyma-namespace/test-issuers.spec.js +++ b/tests/integration/tests/kyma-namespace/test-issuers.spec.js @@ -87,7 +87,7 @@ context('Test Issuers', () => { .find('input') .type('other.server.com', { force: true }); - cy.get('[placeholder^="Domain"]:visible') + cy.get('[placeholder^="Domain"][value]:visible') .find('input') .type('another.server.com', { force: true }); diff --git a/tests/integration/tests/namespace/test-cron-jobs.spec.js b/tests/integration/tests/namespace/test-cron-jobs.spec.js index c67bf5c2f5..e8a9bd9110 100644 --- a/tests/integration/tests/namespace/test-cron-jobs.spec.js +++ b/tests/integration/tests/namespace/test-cron-jobs.spec.js @@ -77,9 +77,7 @@ context('Test Cron Jobs', () => { .clear() .type('busybox', { force: true }); - cy.get('ui5-combobox[value="IfNotPresent"]') - .find('ui5-icon[accessible-name="Select Options"]') - .click(); + cy.get('ui5-combobox[value="IfNotPresent"]').click(); cy.get('ui5-li:visible') .contains('Always') @@ -145,9 +143,7 @@ context('Test Cron Jobs', () => { .clear() .type('busytest', { force: true }); - cy.get('ui5-combobox[value="Always"]') - .find('ui5-icon[accessible-name="Select Options"]') - .click(); + cy.get('ui5-combobox[value="Always"]').click(); cy.get('ui5-li:visible') .contains('Never') diff --git a/tests/integration/tests/namespace/test-service-accounts.spec.js b/tests/integration/tests/namespace/test-service-accounts.spec.js index 989e9bcfc2..9d7a72b0de 100644 --- a/tests/integration/tests/namespace/test-service-accounts.spec.js +++ b/tests/integration/tests/namespace/test-service-accounts.spec.js @@ -135,6 +135,6 @@ context('Test Service Accounts', () => { }); it('Inspect list', () => { - cy.inspectList(SERVICE_NAME, true); + cy.inspectList(SERVICE_NAME, false); }); }); diff --git a/tests/integration/tests/namespace/z-run-after.spec.js b/tests/integration/tests/namespace/z-run-after.spec.js index 2cbfaa1c21..5fc876b997 100644 --- a/tests/integration/tests/namespace/z-run-after.spec.js +++ b/tests/integration/tests/namespace/z-run-after.spec.js @@ -34,7 +34,7 @@ context('Clean up Namespace', () => { () => { cy.get('ui5-table') .contains(Cypress.env('NAMESPACE_NAME')) - .should('not.exist', { timeout: 50000 }); + .should('not.exist', { timeout: 60000 }); }, ); }); From f17d92c2b185ed0f7d390e20dd491fe506341633 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Mon, 23 Dec 2024 07:10:45 +0100 Subject: [PATCH 08/10] fix: adjust tests --- .../cluster/test-multiple-context-kubeconfig.spec.js | 6 ------ .../tests/extensibility/ext-test-extensibility.spec.js | 9 +++++++-- .../tests/kyma-namespace/test-issuers.spec.js | 5 +---- tests/integration/tests/namespace/z-run-after.spec.js | 4 ++-- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/tests/integration/tests/cluster/test-multiple-context-kubeconfig.spec.js b/tests/integration/tests/cluster/test-multiple-context-kubeconfig.spec.js index 97dbcabe21..4b77d64b5d 100644 --- a/tests/integration/tests/cluster/test-multiple-context-kubeconfig.spec.js +++ b/tests/integration/tests/cluster/test-multiple-context-kubeconfig.spec.js @@ -66,25 +66,19 @@ context('Test multiple context kubeconfig', () => { cy.get('ui5-option:visible').contains(kubeconfig.contexts[1].name); - cy.wait(3000); - cy.get('ui5-option:visible') .contains('All contexts') .click(); - cy.wait(3000); cy.contains('Next').click({ force: true }); - cy.wait(3000); cy.get('ui5-button:visible') .contains('Next step') .click(); - cy.wait(3000); cy.get(`[accessible-name="last-step"]:visible`) .contains('Connect cluster') .click({ force: true }); - cy.wait(3000); cy.contains('Cluster Details').should('exist'); diff --git a/tests/integration/tests/extensibility/ext-test-extensibility.spec.js b/tests/integration/tests/extensibility/ext-test-extensibility.spec.js index 0b73e1aaab..bf93124a4b 100644 --- a/tests/integration/tests/extensibility/ext-test-extensibility.spec.js +++ b/tests/integration/tests/extensibility/ext-test-extensibility.spec.js @@ -140,8 +140,13 @@ context('Test Extensibility Create/Update', () => { cy.get('@form') .get('[data-testid="details-view"]') - .findMonaco() - .scrollIntoView() + .find('div.monaco-editor') + .find('textarea[aria-roledescription="editor"]') + .focus() + .scrollIntoView(); + + cy.get('@form') + .get('[data-testid="details-view"]') .within(() => { cy.pasteToMonaco(input); }); diff --git a/tests/integration/tests/kyma-namespace/test-issuers.spec.js b/tests/integration/tests/kyma-namespace/test-issuers.spec.js index 05120db448..0210ae9d6e 100644 --- a/tests/integration/tests/kyma-namespace/test-issuers.spec.js +++ b/tests/integration/tests/kyma-namespace/test-issuers.spec.js @@ -10,8 +10,6 @@ context('Test Issuers', () => { cy.loginAndSelectCluster(); cy.goToNamespaceDetails(); - cy.wait(1000); - cy.navigateTo('Configuration', 'Secrets'); cy.openCreate(); @@ -88,11 +86,10 @@ context('Test Issuers', () => { .type('other.server.com', { force: true }); cy.get('[placeholder^="Domain"][value]:visible') + .eq(1) .find('input') .type('another.server.com', { force: true }); - cy.wait(2000); - cy.saveChanges('Edit'); cy.getMidColumn().inspectTab('View'); }); diff --git a/tests/integration/tests/namespace/z-run-after.spec.js b/tests/integration/tests/namespace/z-run-after.spec.js index 5fc876b997..f7de13fdc5 100644 --- a/tests/integration/tests/namespace/z-run-after.spec.js +++ b/tests/integration/tests/namespace/z-run-after.spec.js @@ -33,8 +33,8 @@ context('Clean up Namespace', () => { }, () => { cy.get('ui5-table') - .contains(Cypress.env('NAMESPACE_NAME')) - .should('not.exist', { timeout: 60000 }); + .contains(Cypress.env('NAMESPACE_NAME'), { timeout: 60000 }) + .should('not.exist'); }, ); }); From 2975b7702de88673133b2e2b152a70c673f41fec Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Mon, 23 Dec 2024 07:50:59 +0100 Subject: [PATCH 09/10] fix: add wait --- .../tests/extensibility/ext-test-extensibility.spec.js | 2 ++ tests/integration/tests/kyma-namespace/test-issuers.spec.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/integration/tests/extensibility/ext-test-extensibility.spec.js b/tests/integration/tests/extensibility/ext-test-extensibility.spec.js index bf93124a4b..880c1bd338 100644 --- a/tests/integration/tests/extensibility/ext-test-extensibility.spec.js +++ b/tests/integration/tests/extensibility/ext-test-extensibility.spec.js @@ -69,6 +69,8 @@ context('Test Extensibility Create/Update', () => { chooseComboboxOption('[id="combobox-input"]', 'potato'); + cy.wait(500); + cy.get(`ui5-input[value="Potatoes"]`) .find('input') .clear() diff --git a/tests/integration/tests/kyma-namespace/test-issuers.spec.js b/tests/integration/tests/kyma-namespace/test-issuers.spec.js index 0210ae9d6e..e154721022 100644 --- a/tests/integration/tests/kyma-namespace/test-issuers.spec.js +++ b/tests/integration/tests/kyma-namespace/test-issuers.spec.js @@ -10,6 +10,8 @@ context('Test Issuers', () => { cy.loginAndSelectCluster(); cy.goToNamespaceDetails(); + cy.wait(1000); + cy.navigateTo('Configuration', 'Secrets'); cy.openCreate(); From ea9c80b1a9d40e8778ddfd51c8e337752fcd22b5 Mon Sep 17 00:00:00 2001 From: Oliwia Gowor Date: Mon, 23 Dec 2024 08:16:59 +0100 Subject: [PATCH 10/10] cleanup --- .../components/DynamicPageComponent/DynamicPageComponent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/DynamicPageComponent/DynamicPageComponent.js b/src/shared/components/DynamicPageComponent/DynamicPageComponent.js index de4f0b9567..ca7bb851e7 100644 --- a/src/shared/components/DynamicPageComponent/DynamicPageComponent.js +++ b/src/shared/components/DynamicPageComponent/DynamicPageComponent.js @@ -164,7 +164,7 @@ export const DynamicPageComponent = ({ > {actions && ( -
+ <> {actions} {(window.location.search.includes('layout') || (!window.location.search.includes('layout') && @@ -172,7 +172,7 @@ export const DynamicPageComponent = ({ layoutNumber !== 'StartColumn' ? ( ) : null} -
+ )} {window.location.search.includes('layout') || (!window.location.search.includes('layout') &&