guoqqqi commented on code in PR #2506:
URL: https://github.com/apache/apisix-dashboard/pull/2506#discussion_r917419764
##########
web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js:
##########
@@ -71,6 +72,13 @@ context('Delete Plugin List with the Drawer', () => {
});
cy.contains('button', 'Submit').click();
+
+ cy.get(selector.authPluginType, {
+ timeout,
+ }).should(($p) => {
+ expect($p.first()).to.contain(data.basicAuthPlugin);
Review Comment:
Is it better to confirm the button status of the plug-in card again?
##########
web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js:
##########
@@ -71,6 +72,13 @@ context('Delete Plugin List with the Drawer', () => {
});
cy.contains('button', 'Submit').click();
+
+ cy.get(selector.authPluginType, {
+ timeout,
Review Comment:
Generally speaking, we don't need to add timeout.
##########
web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js:
##########
@@ -30,6 +30,7 @@ context('Delete Plugin List with the Drawer', () => {
checkedSwitcher: '.ant-switch-checked',
refresh: '.anticon-reload',
empty: '.ant-empty-normal',
+ authPluginType: '#plugin-category-authentication > div:nth-child(2)',
Review Comment:
It's not a good selector. We should use a clearer.
##########
web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js:
##########
@@ -40,7 +41,7 @@ context('Delete Plugin List with the Drawer', () => {
cy.login();
});
- it('should visit plugin market and enable plugin', function () {
+ it('should visit plugin market and enable plugin then show plugin in order
by state)', function () {
Review Comment:
```suggestion
it('should visit plugin market and enable plugin then show plugin in order
by state', function () {
```
It looks like there is an extra bracket. Isn't there an error prompt here?
##########
web/src/components/Plugin/data.tsx:
##########
@@ -74,6 +74,15 @@ export enum PluginType {
other = 'other',
}
+export enum PluginState {
+ disable = 10,
+ enable = 20,
+}
+
+export interface PluginItem extends PluginComponent.Meta {
+ state?: PluginState;
+}
Review Comment:
If it is a writing type, we'd better put it in the type file.
##########
web/src/components/Plugin/data.tsx:
##########
@@ -74,6 +74,15 @@ export enum PluginType {
other = 'other',
}
+export enum PluginState {
+ disable = 10,
+ enable = 20,
Review Comment:
Hi, can you explain why it is written like this?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]