guoqqqi commented on a change in pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#discussion_r594960775
##########
File path: web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js
##########
@@ -45,7 +45,6 @@ context('Create and Delete Plugin List', () => {
.then(() => {
cy.get('.ant-drawer-footer').contains('button', 'Delete').click();
cy.contains('button', 'Confirm').click({ force: true });
- cy.get(this.domSelector.empty).should('be.visible');
});
Review comment:
This assertion ensures that the plugin can be removed in its entirety
properly, and I think it's best that we don't remove it
##########
File path: web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js
##########
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Create and Delete Plugin List', () => {
+ const timeout = 5000;
+
+ beforeEach(() => {
+ cy.login();
+
+ cy.fixture('selector.json').as('domSelector');
+ cy.fixture('data.json').as('data');
+ });
+
+ it('should visit plugin market', function () {
+ cy.visit('/');
+ cy.contains('Plugin').click();
+ cy.contains('Create').click();
+ cy.fixture('plugin-dataset.json').as('cases');
+ cy.get('@cases').then((cases) => {
+ cy.configurePlugins(cases);
+ });
+ });
Review comment:
In this test we don't need to create all the plugins, it takes up more
time than necessary, we just need to create a few plugin examples to test that
the deletion functions properly.
----------------------------------------------------------------
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]