Skip to content

Commit

Permalink
test: enhance frontend e2e test stability (consumer) (#1116)
Browse files Browse the repository at this point in the history
* test: fix frontend e2e test (consumer test unstable)

* chore: change comment to lowercase

* chore: add ; symbol

Co-authored-by: 琚致远 <[email protected]>
Co-authored-by: YuanSheng Wang <[email protected]>
  • Loading branch information
3 people authored Dec 28, 2020
1 parent 14da383 commit 47e5345
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ context('Create and Delete Consumer', () => {
cy.wait(sleepTime * 5);
cy.contains('Create').click();

// Basic Information
// basic information
cy.get('#username').type(name);
cy.get('#desc').type('desc_by_autotest');
cy.contains('Next').click();
cy.wait(sleepTime * 3);

// Plugin Config
// plugin config
cy.contains(domSelectors.pluginsCard, 'key-auth').within(() => {
cy.get('button').first().click();
})
// edit CodeMirror
// edit codemirror
cy.get('.CodeMirror')
.first()
.then((editor) => {
Expand All @@ -57,6 +57,8 @@ context('Create and Delete Consumer', () => {
});
cy.contains('button', 'Next').click();
cy.contains('button', 'Submit').click();
cy.wait(sleepTime);
cy.get(domSelectors.notification).should('contain', 'Create Consumer Successfully');
});

it('delete the consumer', () => {
Expand All @@ -75,17 +77,17 @@ context('Create and Delete Consumer', () => {
cy.wait(sleepTime * 5);
cy.contains('Create').click();

// Basic Information
// basic information
cy.get('#username').type(name);
cy.get('#desc').type('desc_by_autotest');
cy.contains('Next').click();
cy.wait(sleepTime * 3);

// Plugin Config
// plugin config
cy.contains(domSelectors.pluginsCard, 'key-auth').within(() => {
cy.get('button').first().click();
})
// edit CodeMirror
// edit codeMirror
cy.get('.CodeMirror')
.first()
.then((editor) => {
Expand Down

0 comments on commit 47e5345

Please sign in to comment.