mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08: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:
parent
741c7da8b1
commit
830bda5f55
|
@ -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: () => {
|
||||||
|
|
Loading…
Reference in a new issue