Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
despairblue committed Jun 10, 2024
1 parent a74dc7e commit 5bdd315
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cypress/e2e/2-credentials.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const workflowPage = new WorkflowPage();
const nodeDetailsView = new NDV();

const NEW_CREDENTIAL_NAME = 'Something else';
const NEW_CREDENTIAL_NAME2 = 'Something else entirely';

describe('Credentials', () => {
beforeEach(() => {
Expand Down Expand Up @@ -180,6 +181,24 @@ describe('Credentials', () => {
.nodeCredentialsSelect()
.find('input')
.should('have.value', NEW_CREDENTIAL_NAME);

// Reload page to make sure this also works when the credential hasn't been
// just created.
nodeDetailsView.actions.close();
workflowPage.actions.saveWorkflowOnButtonClick();
cy.reload();
workflowPage.getters.canvasNodes().last().click();
cy.get('body').type('{enter}');
workflowPage.getters.nodeCredentialsEditButton().click();
credentialsModal.getters.credentialsEditModal().should('be.visible');
credentialsModal.getters.name().click();
credentialsModal.actions.renameCredential(NEW_CREDENTIAL_NAME2);
credentialsModal.getters.saveButton().click();
credentialsModal.getters.closeButton().click();
workflowPage.getters
.nodeCredentialsSelect()
.find('input')
.should('have.value', NEW_CREDENTIAL_NAME2);
});

it('should setup generic authentication for HTTP node', () => {
Expand Down

0 comments on commit 5bdd315

Please sign in to comment.