Skip to content

Commit 7d47244

Browse files
committed
Adjust tests
1 parent 2c4d4f3 commit 7d47244

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

src/components/Modules/community/components/AddSourceYamls.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export const AddSourceYamls = () => {
237237
if (allTemplatesInstalled) {
238238
return (
239239
<>
240-
<Text>
240+
<Text data-testid="error-all-modules-installed">
241241
{t('modules.community.source-yaml.all-modules-installed')}
242242
</Text>
243243
{displayExistingModulesList(existingModuleTemplates)}

tests/integration/tests/kyma-cluster/test-community-modules.spec.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,6 @@ context('Test Community Modules views', () => {
8989
// Open Add YAML
9090
cy.get('[accessible-name="add-yamls"]').click();
9191

92-
// Check access to raw github files
93-
cy.get('[accessible-name="Source YAML URL"]')
94-
.find('input')
95-
.click()
96-
.clear()
97-
.type(
98-
'https://raw.githubusercontent.com/kyma-project/busola/refs/heads/main/tests/integration/fixtures/community-modules/busola-0-12.yaml',
99-
);
100-
10192
// Open Add to Namespace select
10293
cy.get(`[header-text="Add Source YAML"]:visible`)
10394
.find('[data-testid="add-to-namespace-select"]')
@@ -113,6 +104,20 @@ context('Test Community Modules views', () => {
113104
// Click of default namespace
114105
cy.get('ui5-option-custom:visible').contains('default').click();
115106

107+
// Check access to raw github files
108+
cy.get('[accessible-name="Source YAML URL"]')
109+
.find('input')
110+
.click()
111+
.clear()
112+
.type(
113+
'https://raw.githubusercontent.com/kyma-project/busola/refs/heads/main/tests/integration/fixtures/community-modules/busola-0-12.yaml',
114+
);
115+
116+
// Check if error 'all modules installed' is displayed
117+
cy.get('[data-testid="error-all-modules-installed"]')
118+
.contains('All modules in this YAML are already installed.')
119+
.should('be.visible');
120+
116121
cy.get('ui5-button:visible').contains('Cancel').click();
117122
});
118123

0 commit comments

Comments
 (0)