mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
test(editor): Intercept credentials save and test request and wait for them in e2e test (#4778)
test(editor): Intercept credentials save and test request and wait for them to complete before doing assertions
This commit is contained in:
@@ -22,7 +22,11 @@ export class CredentialsModal extends BasePage {
|
||||
this.getters.nameInput().clear().type(name);
|
||||
},
|
||||
save: () => {
|
||||
cy.intercept('POST', '/rest/credentials').as('saveCredential');
|
||||
cy.intercept('POST', '/rest/credentials/test').as('testCredential');
|
||||
|
||||
this.getters.saveButton().click();
|
||||
cy.wait('@saveCredential').wait('@testCredential');
|
||||
this.getters.saveButton().should('contain.text', 'Saved');
|
||||
},
|
||||
close: () => {
|
||||
|
||||
Reference in New Issue
Block a user