guoqqqi commented on a change in pull request #1372:
URL: https://github.com/apache/apisix-dashboard/pull/1372#discussion_r565810222
##########
File path: web/cypress/integration/plugin/create-edit-delete-plugin.spec.js
##########
@@ -36,14 +41,30 @@ context('Create and Delete Plugin List', () => {
cy.contains('Create').click();
// add test plugins
- cy.configurePlugins(this.cases);
+ cy.get('@cases').then((cases) => {
+ cy.configurePlugins(cases);
+ })
+ });
+
+ it('should edit the plugin', () => {
+ cy.visit('/plugin/list');
+ cy.get(domSelector.refresh).click();
+ cy.contains(data.name).should('exist').siblings().contains('Edit').click({
+ force: true,
+ });
+ cy.get(domSelector.codemirror)
+ .first()
+ .then(() => {
+ cy.get(domSelector.switch).click();
+ cy.contains('button', 'Submit').click();
+ });
+ cy.contains(data.name).should('not.exist');
});
it('should delete plugin list', () => {
- cy.visit('/');
- cy.contains('Plugin').click();
- cy.get(domSelectors.refresh).click();
- cy.get(domSelectors.tableCell).then(function (rows) {
+ cy.visit('/plugin/list');
+ cy.get(domSelector.refresh).click();
+ cy.get(domSelector.tableCell, { timeout }).should('exist').then(function
(rows) {
Review comment:
This is a good idea, thanks~
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]