fix: Correctly allow sharees to test credential when opening the modal (#6111)

* fix: Prevent incorrect error message when sharee opens a credential

* test: Add testing for automated credential testing

* chore: Remove unnecessary comments
This commit is contained in:
Omar Ajoue
2023-04-28 12:02:28 +02:00
committed by GitHub
parent 206b6b90b8
commit 2e73f4abd0
5 changed files with 22 additions and 8 deletions

View File

@@ -10,9 +10,7 @@ export class CredentialsModal extends BasePage {
newCredentialTypeButton: () => cy.getByTestId('new-credential-type-button'),
connectionParameters: () => cy.getByTestId('credential-connection-parameter'),
connectionParameter: (fieldName: string) =>
this.getters
.connectionParameters()
.find(`:contains('${fieldName}') .n8n-input input`),
this.getters.connectionParameters().find(`:contains('${fieldName}') .n8n-input input`),
name: () => cy.getByTestId('credential-name'),
nameInput: () => cy.getByTestId('credential-name').find('input'),
// Saving of the credentials takes a while on the CI so we need to increase the timeout
@@ -27,6 +25,7 @@ export class CredentialsModal extends BasePage {
menu: () => this.getters.editCredentialModal().get('.menu-container'),
menuItem: (name: string) => this.getters.menu().get('.n8n-menu-item').contains(name),
usersSelect: () => cy.getByTestId('credential-sharing-modal-users-select'),
testSuccessTag: () => cy.getByTestId('credentials-config-container-test-success'),
};
actions = {
addUser: (email: string) => {