Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Bump UI5 packages and add accessibleName for Tables #3657

Merged
merged 11 commits into from
Feb 5, 2025
641 changes: 306 additions & 335 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@
"@types/jsonpath": "^0.2.0",
"@types/pluralize": "^0.0.29",
"@ui-schema/ui-schema": "^0.4.5",
"@ui5/webcomponents": "^2.4.0",
"@ui5/webcomponents-base": "^2.4.0",
"@ui5/webcomponents-compat": "^2.4.0",
"@ui5/webcomponents-fiori": "^2.4.0",
"@ui5/webcomponents-icons": "^2.4.0",
"@ui5/webcomponents-icons-tnt": "^2.4.0",
"@ui5/webcomponents-react": "^2.4.0",
"@ui5/webcomponents-react-base": "^2.4.0",
"@ui5/webcomponents-react-charts": "^2.4.0",
"@ui5/webcomponents-react-compat": "^2.4.0",
"@ui5/webcomponents": "^2.7.0",
"@ui5/webcomponents-base": "^2.7.0",
"@ui5/webcomponents-compat": "^2.7.0",
"@ui5/webcomponents-fiori": "^2.7.0",
"@ui5/webcomponents-icons": "^2.7.0",
"@ui5/webcomponents-icons-tnt": "^2.7.0",
"@ui5/webcomponents-react": "^2.7.0",
"@ui5/webcomponents-react-base": "^2.7.0",
"@ui5/webcomponents-react-charts": "^2.7.0",
"@ui5/webcomponents-react-compat": "^2.7.0",
"classnames": "^2.2.6",
"copy-to-clipboard": "^3.2.0",
"core-js": "^3.3.6",
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/ContentWrapper/ContentWrapper.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:root {
--solidBg: var(--_ui5-v2-4-0_fcl_solid_bg);
--solidBg: var(--_ui5-v2-7-0_fcl_solid_bg);
}

#content-wrap {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const ValidationWarnings = ({ resource, validationSchema }) => {
state="Critical"
className="sap-margin-end-small"
style={{
marginLeft: '-0.3125rem', //set icon in one line with expand arrow. The value from class `--_ui5-v2-4-0_panel_content_padding` is divided by 2
marginLeft: '-0.3125rem', //set icon in one line with expand arrow. The value from class `--_ui5-v2-7-0_panel_content_padding` is divided by 2
}}
/>
<ValidationWarning warning={warning.message} />
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/Dropdown/Dropdown.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('Dropdown Component', () => {
cy.mount(<Dropdown {...defaultProps} onSelect={onSelect} />);

cy.get('[data-testid="test-dropdown"]').click();
cy.get('ui5-li')
cy.get('ui5-cb-item')
.eq(1)
.click();

Expand Down
2 changes: 2 additions & 0 deletions src/shared/components/GenericList/GenericList.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const GenericList = ({
noHideFields,
customRowClick,
className = '',
accessibleName,
}) => {
const navigate = useNavigate();
searchSettings = { ...defaultSearch, ...searchSettings };
Expand Down Expand Up @@ -406,6 +407,7 @@ export const GenericList = ({
className={className}
>
<Table
accessibleName={accessibleName ?? title}
className={`ui5-generic-list ${
hasDetailsView && filteredEntries.length ? 'cursor-pointer' : ''
}`}
Expand Down
4 changes: 4 additions & 0 deletions src/shared/components/ResourcesList/ResourcesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ export function ResourceListRenderer({
disableHiding,
displayArrow,
handleRedirect,
accessibleName,
}) {
useVersionWarning({
resourceUrl,
Expand Down Expand Up @@ -535,6 +536,9 @@ export function ResourceListRenderer({
enableColumnLayout={enableColumnLayout}
disableMargin={disableMargin}
title={showTitle ? title || prettifiedResourceName : null}
accessibleName={
accessibleName ?? prettifyNamePlural(resourceTitle, resourceType)
}
actions={actions}
entries={resources || []}
headerRenderer={headerRenderer}
Expand Down
6 changes: 3 additions & 3 deletions src/sidebar/Sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
:root {
--sidebar-padding: var(--_ui5-v2-4-0_side_navigation_padding);
--sidebar-width: var(--_ui5-v2-4-0_side_navigation_width);
--sidebar-padding: var(--_ui5-v2-7-0_side_navigation_padding);
--sidebar-width: var(--_ui5-v2-7-0_side_navigation_width);
}

.ui5-content-density-compact {
--_ui5-v2-4-0_side_navigation_padding: 0.2rem 0.7rem 0.75rem 0.75rem !important;
--_ui5-v2-7-0_side_navigation_padding: 0.2rem 0.7rem 0.75rem 0.75rem !important;
}

.sidebar__content {
Expand Down
10 changes: 5 additions & 5 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
@import './wizard-dialog.scss';

:root {
--card-box-shadow: var(--_ui5-v2-4-0_card_box_shadow);
--card-border: var(--_ui5-v2-4-0_card_border);
--card-border-radius: var(--_ui5-v2-4-0_card_border-radius);
--card-border: var(--_ui5-v2-4-0_card_border);
--ui5-v2-4-0_table_bottom_border: none !important;
--card-box-shadow: var(--_ui5-v2-7-0_card_box_shadow);
--card-border: var(--_ui5-v2-7-0_card_border);
--card-border-radius: var(--_ui5-v2-7-0_card_border-radius);
--card-border: var(--_ui5-v2-7-0_card_border);
--ui5-v2-7-0_table_bottom_border: none !important;
}

html {
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ Cypress.Commands.add('changeCluster', clusterName => {
.find('button[aria-haspopup="menu"][data-ui5-stable="menu"]:visible')
.click({ force: true });

cy.get('ui5-list')
.find(`[accessible-name="${clusterName}"]:visible`)
cy.get(`[accessible-name="${clusterName}"]:visible`)
.find('span[part="title"]')
.click({ force: true });
});
Expand Down
7 changes: 3 additions & 4 deletions tests/integration/support/helpers.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
export function chooseComboboxOption(selector, optionText) {
export function chooseComboboxOption(selector, optionText, force = false) {
cy.get(`ui5-combobox${selector}`)
.find('input')
.filterWithNoValue()
.click()
.type(optionText);

cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains(optionText)
.find('li')
.click();
.click({ force: force });

return cy.end();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ context('Accessibility test Cron Jobs', () => {

cy.get('ui5-combobox[value="IfNotPresent"]').click();

cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains('Always')
.click();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ context('Test Cluster Role Bindings', () => {
.click()
.type('admin');

cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains('cluster-admin')
.find('li')
.click();

cy.get('[accessible-name="User name"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ context('Test Command Palette navigation', () => {

getQueryInput().type('ns/-a');

cy.get('li')
cy.get('ul[class="command-palette-ui__results"]')
.find('li')
.contains('All Namespaces')
.click();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ context('Test Extensibility Create/Update', () => {

cy.openCreate();

chooseComboboxOption('[id="combobox-input"]', 'potato');
chooseComboboxOption('[id="combobox-input"]', 'potato', true);

cy.wait(500);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ context('Test extensibility variables', () => {
})
.click();

cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains('simple')
.should('exist');

cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains('advanced')
.should('exist');

Expand All @@ -117,7 +117,7 @@ context('Test extensibility variables', () => {
);

// test visibility based on var (select 'simple')
cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains('simple')
.click();

Expand All @@ -134,7 +134,7 @@ context('Test extensibility variables', () => {
})
.click();

cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains('advanced')
.click();

Expand Down Expand Up @@ -165,7 +165,7 @@ context('Test extensibility variables', () => {
.get('ui5-combobox[placeholder="Choose template"]:visible')
.click();

cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains('Fixes')
.click();

Expand Down
5 changes: 2 additions & 3 deletions tests/integration/tests/kyma-namespace/a-run-before.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ context('Create Namespace', () => {
.find('ui5-combobox[placeholder="Choose template"]:visible')
.click();

cy.get('ui5-responsive-popover:visible')
.contains('ui5-li:visible', 'XL (limits: 9Gi, requests: 8.4Gi)')
.find('li')
cy.get('ui5-cb-item:visible')
.find('li', 'XL (limits: 9Gi, requests: 8.4Gi)')
.click({ force: true });

cy.get('.create-form')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ context('Test Issuers', () => {
.clear()
.type('ACME');

cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains('ACME')
.find('li')
.click({ force: true });

cy.get('[placeholder="ACME Server URL"]:visible')
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/tests/namespace/a-run-before.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ context('Create Namespace', () => {
.find('ui5-combobox[placeholder="Choose template"]:visible')
.click();

cy.get('ui5-responsive-popover:visible')
.contains('ui5-li:visible', 'XL (limits: 9Gi, requests: 8.4Gi)')
.find('li')
cy.get('ui5-cb-item:visible')
.find('li', 'XL (limits: 9Gi, requests: 8.4Gi)')
.click({ force: true });

cy.get('.create-form')
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/tests/namespace/test-cron-jobs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ context('Test Cron Jobs', () => {

cy.get('ui5-combobox[value="IfNotPresent"]').click();

cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains('Always')
.click();

Expand Down Expand Up @@ -145,7 +145,7 @@ context('Test Cron Jobs', () => {

cy.get('ui5-combobox[value="Always"]').click();

cy.get('ui5-li:visible')
cy.get('ui5-cb-item:visible')
.contains('Never')
.click();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,11 @@ context('Test Protected Resources', () => {

cy.contains('Cluster interaction').click();

cy.contains(
'.preferences-row',
'Allow for modification of protected resources',
cy.get(
'ui5-switch[accessible-name="Allow for modification of protected resources"',
)
.find('ui5-switch')
.click();
.find('div[role="switch"')
.click({ force: true });

cy.contains('Close').click();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ context('Test resource validation', () => {

cy.contains('ui5-panel', 'Validate Resources')
.find('ui5-switch')
.click();
.find('div[role="switch"')
.click({ force: true });

cy.get('ui5-dialog')
.contains('ui5-button', 'Close')
Expand All @@ -72,7 +73,8 @@ context('Test resource validation', () => {

cy.contains('.validate-resources', 'Validate resources')
.find('ui5-switch')
.click();
.find('div[role="switch"')
.click({ force: true });

cy.get('[data-testid=yaml-cancel]').click();
});
Expand All @@ -94,15 +96,18 @@ context('Test resource validation', () => {

cy.contains('.policy-row', 'Default')
.find('ui5-switch')
.click();
.find('div[role="switch"')
.click({ force: true });

cy.contains('.policy-row', 'PodSecurityStandardsBaseline')
.find('ui5-switch')
.click();
.find('div[role="switch"')
.click({ force: true });

cy.contains('.policy-row', 'TestPolicy')
.find('ui5-switch')
.click();
.find('div[role="switch"')
.click({ force: true });

cy.get('ui5-dialog')
.contains('ui5-button', 'Close')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ context('Test Service Accounts', () => {
.get('.form-field')
.find('ui5-icon')
.click()
.get('ui5-list')
.get('ui5-cb-item')
.contains('21600s (6h)')
.wait(100)
.click({ force: true });
Expand Down
9 changes: 6 additions & 3 deletions tests/integration/tests/namespace/test-settings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ context('Test app settings and preferences', () => {

cy.contains('.preferences-row', 'Delete without confirmation')
.find('ui5-switch')
.click();
.find('div[role="switch"')
.click({ force: true });

cy.get('ui5-dialog')
.contains('ui5-button', 'Close')
Expand Down Expand Up @@ -60,7 +61,8 @@ context('Test app settings and preferences', () => {

cy.contains('.preferences-row', 'Delete without confirmation')
.find('ui5-switch')
.click();
.find('div[role="switch"')
.click({ force: true });

cy.get('ui5-dialog')
.contains('ui5-button', 'Close')
Expand Down Expand Up @@ -109,7 +111,8 @@ context('Test app settings and preferences', () => {
if (value === 'true' || value === 'checked') {
cy.contains('.preferences-row', 'Show hidden Namespaces')
.find('ui5-switch')
.click();
.find('div[role="switch"')
.click({ force: true });
}
});

Expand Down
Loading