mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -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);
|
||||
},
|
||||
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: () => {
|
||||
|
|
Loading…
Reference in a new issue