Skip to content

Commit 86b9ab4

Browse files
mrCherry97OliwiaGoworchriskariakucharskaIwonaLanger
authored
chore: update UI5 from v1 to v2 (#3542)
* chore: UI5 bump packages (#3439) * chore: update packages * chore: bump ui5-react * fix: adjust tests to not use enzyme * chore: fix dependencies * fix: remove unused * fix: remove not existing import * chore: add compatibility package * fix: adjust render, css names and imports (#3440) * fix: change render * fix: adjust css names * fix: change imports for Toolbar * fix: change imports for tables * fix: rename list comp. & badge * fix: fix imports * chore: adjust spacing to classNames (#3442) * change some spacing to new classnames * fix merge * pray to god, that everything is working * pray to god, that everything is working * some spacing and iconEnd for ExternalLink * some spacing and iconEnd for SA token * add no-margin class in index.scss * adjust the rest of the spacing * remove unused impott * fix stupid classNames * adjust separatorLine to tsx and use style prop * review changes * fix: Ui5 codemod adjustments (#3449) * fix: ui5 codemode adjustments * fix: fix imports * fix: fix table imports * fix: fix unused * fix: adjust DynamicPageComponent (#3445) * fix: adjust dynamicPage * fix: separate actionsBar * fix: fix actions behavior * fix: remove unused * fix: fix classNames * fix: fix empty toolbar & move banners * fix: fix dependency * fix: remove spacing file * fix: toast adjustments (#3462) * fix: adjust tokens (#3463) * fix: adjust tokens * fix: adjust spacing * fix: adjust badges (#3464) * fix: adjust badges type names * fix: fix type mappings * fix: remove console.log * fix: adjust headers size (#3467) * fix: add 'size' to headers * fix: add size to headers * fix: defaultProps (#3469) * remove defaultProps and disableEdit prop from resourcelist * Update src/shared/components/ResourcesList/ResourcesList.js Co-authored-by: Oliwia Gowor <72342415+OliwiaGowor@users.noreply.github.com> --------- Co-authored-by: Oliwia Gowor <72342415+OliwiaGowor@users.noreply.github.com> * fix: spinner size (#3474) * fix: theme (#3475) * fix: adjust forms (#3473) * fix: fix styling and alerts * fix: fix unsaved message * fix: fix background in add modules * fix: remove unused * fix: passing props * fix: key error * fix: resources in list * fix: adjust Preferences modal (#3476) * fix: adjust Preferences modal * fix: move import * fix: opening preferences menu * fix: list props * fix: props * fix: objectPageHeader styling and modules card (#3487) * fix: Ui5 console errors (#3486) * fix: key errors * fix: fetch error * fix: monaco worker fix * fix: dynamicPage header error * fix: small fixes * fix: review fixes * fix: adjust V1 Tables (#3491) * fix: adjust tables * fix: emptyListComp flickering * fix: adjust reset.css * fix: change logo acc name (#3518) * remove unnecessary css code from reset.css & some minor adjustments (#3524) * fix: Busola is flickering when ObjectPage is opened (#3498) * fix: fix flickering on column layout * fix: remove unused * fix: replace DynamicPage with ObjectPage * fix: fix key error * fix: banner height and remove unused * fix: initial render flicker * fix: change to DynamicPage * hotfix * Replace props spread * hotfix * fix: shadow & unused * fix: shadow & sticky tabs * fix: hide button everywhere --------- Co-authored-by: mrCherry97 <mwisnia97@gmail.com> Co-authored-by: akucharska <agata.kucharska@sap.com> * fix: selected in lists (#3543) Co-authored-by: Oliwia Gowor <oliwiagowor@gmail.com> * fix: Fix delete cluster action (#3540) * Fix delete cluster action * fix: Toast is hidden behind Dialogs (#3538) * Revert "Merge branch 'main' into ui5-migrate-v2" This reverts commit 79fb867, reversing changes made to 5b7fd61. * fix: selected in lists (#3539) * fix: toasts in dialogs * fix: adjust Cypress tests (#3553) * fix: adjust tests * fix: adjust more tests * fix: selected in list * comment out rebase action * comment out rebase action v2 * fix: create namespace * fix: adjust comboboxes * fix: adjust tests * fix: add wait * cleanup * chore: add unsafe eval for accessibility tests (#3554) * fix: small leftover bugs (#3555) * fix: small fixes * fix: ProgressIndicator colors * fix: sidebar z-index * fix: acc tests * fix: more acc * feat: migrate UI5 vitest unit tests to cypress component tests (#3551) * cypress config for component testing * first tests migration * migrated badge tests * migrated generic list * migrated counting card * migrated copiable text * migrated namespace settings * migrated ui5radial chart * migrated podrestarts * migrated errorboundary * migrated pagination * migrated listactions * migrated resourcenotfound * migrated modalwithform * migrated helmreleases * migrated selector * migrated ResourceLink * migrated controlledby * mocked ui5 dependencies in nodeQueries test * migrated JoinedArray * migrated CodeViewer * mocked ui5 dependencies in useCreateResource test * mocked ui5 dependencies in useGetCRDByPath * migrated Columns * migrated Widget * mocked ui5 dependencies in linkExtractor * migrated SecretData * migrated SideDrawer * migrated ResourceDetailsColumns * migrated ResourceDetailsVisibility * fixed issues in tests * migrated Table * mocked ui5 dependencies in Widget.copyable * fixed useGet test * refined vitest * adjust github actions workflow * adjust github actions workflow * added command for headless component tests * add cypress as dev dependency * fixed genericList test * adjusted testing-strategy.md * Update docs/contributor/testing-strategy.md Co-authored-by: Iwona Langer <iwona.langer@sap.com> --------- Co-authored-by: Oliwia Gowor <72342415+OliwiaGowor@users.noreply.github.com> Co-authored-by: Iwona Langer <iwona.langer@sap.com> * fix: theme on initial and refresh (#3565) * fix: combobox (#3588) * fix: Command Palette shouldn't navigate when Form is edited (#3583) * fix: command palette and form + tests * fix: badge test * fix: keyboard navigation * fix: adjust styles (#3595) * fix: open dropdown popover correctly (#3594) * fix: dropdown popover opens correctly * test: added component test for Dropdown component * fix: remove empty selectedKey property * fix: remove unused css & small changes (#3599) * fix: container selector (#3597) * fix: remove unused proprtey from KymaModulesAddModule * fix: remove unnecessary css from FormGroup * fix: @container selector for featurecard * fix: @container selector for ClusterStats * fix: @container selector for rest of the components * fix: small styling fixes * test: adjust viewport for pagination component test * test: fix flakiness for pvc test * fix: change classnames to be less generic * test: adjust unit test workflow (#3609) * fix: UI5 adjust badges (#3619) * fix: adjust badges * fix: add checkBeta back * fix: adjust Web Components to React 18 (#3622) * fix: adjust badges after overriding functionality (#3627) * fix: adjust badges * adjust test * Update docs/contributor/testing-strategy.md Co-authored-by: Grzegorz Karaluch <grzegorz.karaluch@sap.com> * fix: undefined in data sources (#3633) * fix: undefined in state * fix: stabilize test * fix: stabilize navigation test * fix: stabilize tests? * move wait for cr test --------- Co-authored-by: Oliwia Gowor <72342415+OliwiaGowor@users.noreply.github.com> Co-authored-by: Christian Karidas <105549337+chriskari@users.noreply.github.com> Co-authored-by: akucharska <agata.kucharska@sap.com> Co-authored-by: Oliwia Gowor <oliwiagowor@gmail.com> Co-authored-by: Agata Kucharska <akucharska@users.noreply.github.com> Co-authored-by: Iwona Langer <iwona.langer@sap.com> Co-authored-by: Damian Badura <45110612+dbadura@users.noreply.github.com> Co-authored-by: Grzegorz Karaluch <grzegorz.karaluch@sap.com>
1 parent 79d7b67 commit 86b9ab4

File tree

333 files changed

+6344
-5894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+6344
-5894
lines changed

.github/workflows/pull-integration-cluster-k3d.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ jobs:
1616
runs-on: ubuntu-latest
1717
if: github.event.pull_request.draft == false
1818
steps:
19-
- name: Install Chrome # this step could be removed after https://github.com/cypress-io/cypress/issues/30374 is resolved
20-
shell: bash
21-
run: |
22-
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
23-
sudo apt install --allow-downgrades -y /tmp/chrome.deb
24-
rm /tmp/chrome.deb
2519
- uses: gardenlinux/workflow-telemetry-action@v2
2620
with:
2721
comment_on_pr: false

.github/workflows/pull-integration-namespace-k3d.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ jobs:
1616
runs-on: ubuntu-latest
1717
if: github.event.pull_request.draft == false
1818
steps:
19-
- name: Install Chrome
20-
shell: bash
21-
run: |
22-
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
23-
sudo apt install --allow-downgrades -y /tmp/chrome.deb
24-
rm /tmp/chrome.deb
2519
- uses: gardenlinux/workflow-telemetry-action@v2
2620
with:
2721
comment_on_pr: false
Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
name: PR Unit Tests
1+
name: PR Unit and Component Tests
22

3-
on:
3+
on:
44
pull_request:
55
types: [opened, edited, synchronize, reopened, ready_for_review]
66
paths:
7-
- ".github/workflows/pull-unit-tests.yml"
8-
- "public/**"
9-
- "src/**"
10-
- "package.json"
7+
- '.github/workflows/pull-unit-tests.yml'
8+
- 'public/**'
9+
- 'src/**'
10+
- 'backend/**'
11+
- 'package.json'
12+
- 'cypress/**'
13+
- 'cypress.config.component.ts'
1114

1215
jobs:
13-
run-unit-test:
16+
run-unit-and-component-test:
1417
runs-on: ubuntu-latest
1518
if: github.event.pull_request.draft == false
1619
steps:
@@ -27,7 +30,11 @@ jobs:
2730
run: |
2831
set -e
2932
npm ci
30-
- name: run_tests
33+
- name: run_unit_tests
3134
shell: bash
32-
run: |
35+
run: |
3336
npm run test
37+
- name: run_component_tests
38+
shell: bash
39+
run: |
40+
npm run component-test-headless

cypress.config.component.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from 'cypress';
2+
3+
export default defineConfig({
4+
component: {
5+
screenshotOnRunFailure: false,
6+
includeShadowDom: true,
7+
devServer: {
8+
framework: 'react',
9+
bundler: 'vite',
10+
},
11+
specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}',
12+
supportFile: 'cypress/support/component.jsx',
13+
},
14+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
7+
<title>Components App</title>
8+
</head>
9+
<body>
10+
<div data-cy-root></div>
11+
</body>
12+
</html>

cypress/support/component.jsx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/* global Cypress */
2+
import React from 'react';
3+
import { mount } from 'cypress/react18';
4+
import { ThemeProvider } from '@ui5/webcomponents-react';
5+
import { MemoryRouter } from 'react-router-dom';
6+
import { RecoilRoot } from 'recoil';
7+
8+
import i18n from 'i18next';
9+
import { initReactI18next } from 'react-i18next';
10+
import { I18nextProvider } from 'react-i18next';
11+
12+
i18n.use(initReactI18next).init({
13+
lng: 'en',
14+
fallbackLng: false,
15+
nsSeparator: '::',
16+
defaultNS: 'translation',
17+
saveMissing: true,
18+
interpolation: {
19+
escapeValue: false,
20+
},
21+
});
22+
23+
Cypress.Commands.add(
24+
'mount',
25+
(component, { initializeRecoil, ...options } = {}) => {
26+
return mount(
27+
<RecoilRoot initializeState={initializeRecoil}>
28+
<I18nextProvider i18n={i18n}>
29+
<MemoryRouter>
30+
<ThemeProvider>{component}</ThemeProvider>
31+
</MemoryRouter>
32+
</I18nextProvider>
33+
</RecoilRoot>,
34+
options,
35+
);
36+
},
37+
);

docs/contributor/testing-strategy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Each pull request (PR) to the repository triggers CI/CD jobs that verify the Bus
1212
- `PR Kyma Dashboard Smoke Tests Prod / run-smoke-test-prod` - Performs smoke testing for Busola with PROD environement and configuration related to the Kyma functionalities using a k3d cluster with installed Kyma.
1313
- `PR Lighthouse Test / run-lighthouse-test` - Performs performance testing for Busola - threshold for accessibility: 80, best-practices: 100.
1414
- `PR Lint Check / run-lint-check` - Performing ESlint and Prettier code quality.
15-
- `PR Unit Tests / run-unit-test` - Performs unit tests of the Busola.
15+
- `PR Unit and Component Tests / run-unit-and-component-test` - Performs unit and component tests of Busola.
1616
- `Lint Markdown Links PR / markdown-link-check` - Checks links in documentation.
1717
- `CodeQL / Analyze (javascript)` - Code quality static code check.
1818

0 commit comments

Comments
 (0)