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

e2e(KTO-450): add test for settings switch for node label #1280

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
describe('Tests for switching description and ID in settings page', () => {
beforeEach(() => {
cy.openHomePage();
});

// Reset nodeLabel to description
after(() => {
cy.openSettings();
cy.selectInTypeaheadField('nodeLabel', 'description');
cy.get('[data-testid="settings-form-save-btn"]').click();
cy.waitSchemasLoading();
});

it('User switches node label type description and ID to be displayed in canvas', () => {
cy.uploadFixture('flows/camelRoute/idDescriptionSettings.yaml');
cy.openSettings();
cy.selectInTypeaheadField('nodeLabel', 'id');
cy.get('[data-testid="settings-form-save-btn"]').click();
cy.waitSchemasLoading();
cy.openDesignPage();

cy.checkNodeExist('idTimer', 1);
cy.checkNodeExist('descriptionSetHeader', 1);
cy.checkNodeExist('idMarshal', 1);
cy.checkNodeExist('log', 1);

cy.openSettings();
cy.selectInTypeaheadField('nodeLabel', 'description');
cy.get('[data-testid="settings-form-save-btn"]').click();
cy.waitSchemasLoading();
cy.openDesignPage();

cy.checkNodeExist('descriptionTimer', 1);
cy.checkNodeExist('descriptionSetHeader', 1);
cy.checkNodeExist('marshal', 1);
cy.checkNodeExist('log', 1);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- route:
id: camel-route
from:
id: idTimer
description: descriptionTimer
uri: timer
steps:
- setHeader:
description: descriptionSetHeader
- marshal:
id: idMarshal
- to:
uri: log:test
Loading