Skip to content

Commit a6edb43

Browse files
committed
adjust more tests
1 parent 0d93b12 commit a6edb43

File tree

7 files changed

+16
-20
lines changed

7 files changed

+16
-20
lines changed

tests/integration/support/commands.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ Cypress.Commands.add('changeCluster', clusterName => {
219219
.find('button[aria-haspopup="menu"][data-ui5-stable="menu"]:visible')
220220
.click({ force: true });
221221

222-
cy.get('ui5-list')
223-
.find(`[accessible-name="${clusterName}"]:visible`)
222+
cy.get(`[accessible-name="${clusterName}"]:visible`)
224223
.find('span[part="title"]')
225224
.click({ force: true });
226225
});

tests/integration/support/helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function chooseComboboxOption(selector, optionText) {
1+
export function chooseComboboxOption(selector, optionText, force = false) {
22
cy.get(`ui5-combobox${selector}`)
33
.find('input')
44
.filterWithNoValue()
@@ -7,7 +7,7 @@ export function chooseComboboxOption(selector, optionText) {
77

88
cy.get('ui5-cb-item:visible')
99
.contains(optionText)
10-
.click();
10+
.click({ force: force });
1111

1212
return cy.end();
1313
}

tests/integration/tests/extensibility/ext-test-extensibility.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ context('Test Extensibility Create/Update', () => {
6767

6868
cy.openCreate();
6969

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

7272
cy.wait(500);
7373

tests/integration/tests/namespace/test-protected-resources.spec.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,9 @@ context('Test Protected Resources', () => {
124124

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

127-
cy.contains(
128-
'.preferences-row',
129-
'Allow for modification of protected resources',
130-
)
131-
.find('ui5-switch')
132-
.click();
127+
cy.get(
128+
'ui5-switch[accessible-name="Allow for modification of protected resources"',
129+
).click({ force: true });
133130

134131
cy.contains('Close').click();
135132
});

tests/integration/tests/namespace/test-resource-validation.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ context('Test resource validation', () => {
5353

5454
cy.contains('ui5-panel', 'Validate Resources')
5555
.find('ui5-switch')
56-
.click();
56+
.click({ force: true });
5757

5858
cy.get('ui5-dialog')
5959
.contains('ui5-button', 'Close')
@@ -72,7 +72,7 @@ context('Test resource validation', () => {
7272

7373
cy.contains('.validate-resources', 'Validate resources')
7474
.find('ui5-switch')
75-
.click();
75+
.click({ force: true });
7676

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

9595
cy.contains('.policy-row', 'Default')
9696
.find('ui5-switch')
97-
.click();
97+
.click({ force: true });
9898

9999
cy.contains('.policy-row', 'PodSecurityStandardsBaseline')
100100
.find('ui5-switch')
101-
.click();
101+
.click({ force: true });
102102

103103
cy.contains('.policy-row', 'TestPolicy')
104104
.find('ui5-switch')
105-
.click();
105+
.click({ force: true });
106106

107107
cy.get('ui5-dialog')
108108
.contains('ui5-button', 'Close')

tests/integration/tests/namespace/test-service-accounts.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ context('Test Service Accounts', () => {
115115
.get('.form-field')
116116
.find('ui5-icon')
117117
.click()
118-
.get('ui5-list')
118+
.get('ui5-cb-item')
119119
.contains('21600s (6h)')
120120
.wait(100)
121121
.click({ force: true });

tests/integration/tests/namespace/test-settings.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ context('Test app settings and preferences', () => {
1919

2020
cy.contains('.preferences-row', 'Delete without confirmation')
2121
.find('ui5-switch')
22-
.click();
22+
.click({ force: true });
2323

2424
cy.get('ui5-dialog')
2525
.contains('ui5-button', 'Close')
@@ -60,7 +60,7 @@ context('Test app settings and preferences', () => {
6060

6161
cy.contains('.preferences-row', 'Delete without confirmation')
6262
.find('ui5-switch')
63-
.click();
63+
.click({ force: true });
6464

6565
cy.get('ui5-dialog')
6666
.contains('ui5-button', 'Close')
@@ -109,7 +109,7 @@ context('Test app settings and preferences', () => {
109109
if (value === 'true' || value === 'checked') {
110110
cy.contains('.preferences-row', 'Show hidden Namespaces')
111111
.find('ui5-switch')
112-
.click();
112+
.click({ force: true });
113113
}
114114
});
115115

0 commit comments

Comments
 (0)