mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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);
|
this.getters.nameInput().clear().type(name);
|
||||||
},
|
},
|
||||||
save: () => {
|
save: () => {
|
||||||
|
cy.intercept('POST', '/rest/credentials').as('saveCredential');
|
||||||
|
cy.intercept('POST', '/rest/credentials/test').as('testCredential');
|
||||||
|
|
||||||
this.getters.saveButton().click();
|
this.getters.saveButton().click();
|
||||||
|
cy.wait('@saveCredential').wait('@testCredential');
|
||||||
this.getters.saveButton().should('contain.text', 'Saved');
|
this.getters.saveButton().should('contain.text', 'Saved');
|
||||||
},
|
},
|
||||||
close: () => {
|
close: () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user