mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
test: Update getters, add search and sort tests for credentials (no-changelog) (#4716)
* test(e2e): Update getters, add search and sort tests for credentials * fix: Refactor sortOptions getter * fix: fix merge conflict * fix: removed double key * fix: Add db and session reset for every credentials suite run
This commit is contained in:
@@ -3,10 +3,10 @@ import { BasePage } from "../base";
|
||||
export class CredentialsModal extends BasePage {
|
||||
getters = {
|
||||
newCredentialModal: () => cy.getByTestId('selectCredential-modal', { timeout: 5000 }),
|
||||
editCredentialModal: () => cy.getByTestId('editCredential-modal', { timeout: 5000 }),
|
||||
newCredentialTypeSelect: () => cy.getByTestId('new-credential-type-select'),
|
||||
newCredentialTypeOption: (credentialType: string) => cy.getByTestId('new-credential-type-select-option').contains(credentialType),
|
||||
newCredentialTypeButton: () => cy.getByTestId('new-credential-type-button'),
|
||||
editCredentialModal: () => cy.getByTestId('editCredential-modal', { timeout: 5000 }),
|
||||
connectionParameters: () => cy.getByTestId('credential-connection-parameter'),
|
||||
connectionParameter: (fieldName: string) => this.getters.connectionParameters().contains(fieldName)
|
||||
.parents('[data-test-id="credential-connection-parameter"]')
|
||||
@@ -14,7 +14,7 @@ export class CredentialsModal extends BasePage {
|
||||
name: () => cy.getByTestId('credential-name'),
|
||||
nameInput: () => cy.getByTestId('credential-name').find('input'),
|
||||
saveButton: () => cy.getByTestId('credential-save-button'),
|
||||
closeButton: () => this.getters.editCredentialModal().find('.el-dialog__close'),
|
||||
closeButton: () => this.getters.editCredentialModal().find('.el-dialog__close').first(),
|
||||
};
|
||||
actions = {
|
||||
setName: (name: string) => {
|
||||
@@ -23,6 +23,7 @@ export class CredentialsModal extends BasePage {
|
||||
},
|
||||
save: () => {
|
||||
this.getters.saveButton().click();
|
||||
this.getters.saveButton().should('contain.text', 'Saved');
|
||||
},
|
||||
close: () => {
|
||||
this.getters.closeButton().click();
|
||||
|
||||
Reference in New Issue
Block a user