Skip to content

Commit

Permalink
test: delete wait
Browse files Browse the repository at this point in the history
  • Loading branch information
guoqqqi committed Jan 24, 2021
1 parent c9ea15c commit 1819bbe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
/* eslint-disable no-undef */

context('Create and Delete Plugin List', () => {
const timeout = 5000;
const domSelectors = {
tableCell: '.ant-table-cell',
empty: '.ant-empty-normal',
refresh: '.anticon-reload',
};

beforeEach(() => {
Expand All @@ -40,15 +42,15 @@ context('Create and Delete Plugin List', () => {
it('should delete plugin list', () => {
cy.visit('/');
cy.contains('Plugin').click();

cy.wait(500);
cy.get(domSelectors.refresh).click();
cy.get(domSelectors.tableCell).then(function (rows) {
[...rows].forEach((row) => {
const name = row.innerText;
const cases = this.cases[name] || [];

cases.forEach(() => {
cy.contains(name).siblings().contains('Delete').click();
cy.contains(name).siblings().contains('Delete').click({ timeout });
cy.contains('button', 'Confirm').click();
});
});
Expand Down
3 changes: 0 additions & 3 deletions web/cypress/integration/plugin/schema-smocktest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
/* eslint-disable no-undef */

context('smoke test for plugin schema', () => {
const timeout = 50000;

beforeEach(() => {
cy.login();

Expand All @@ -31,7 +29,6 @@ context('smoke test for plugin schema', () => {
cy.contains('Plugin').click();
cy.contains('Create').click();

// add test plugins
cy.configurePlugins(this.cases);
});
});

0 comments on commit 1819bbe

Please sign in to comment.