You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/08/10 15:20:33 UTC

[GitHub] [apisix-dashboard] FangSen9000 opened a new pull request, #2581: Feat: add tip for plugin editor

FangSen9000 opened a new pull request, #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581

   Please answer these questions before submitting a pull request, **or your PR will get closed**.
   
   **Why submit this pull request?**
   
   - [ ] Bugfix
   - [x] New feature provided
   - [x] Improve performance
   - [ ] Backport patches
   
   **What changes will this PR take into?**
   
   We need to tell users clearly that which part of the data should be filled.
   ![image](https://user-images.githubusercontent.com/72308243/183942048-773870a1-5541-4654-ba44-f98876d09e25.png)
   
   ##Before the change:
   
   ![1660141066378](https://user-images.githubusercontent.com/72308243/183942195-347de16c-c541-4a89-80ac-cd20abdaa895.jpg)
   ![1660141500524](https://user-images.githubusercontent.com/72308243/183942241-da4c6fea-9bd5-4f3b-8a0d-6b48e769f6e0.jpg)
   
   ##After the change:
   
   ![1660140973538](https://user-images.githubusercontent.com/72308243/183942299-b664195c-4b5c-4b2e-bb5a-d531f086200f.jpg)
   ![1660141388893](https://user-images.githubusercontent.com/72308243/183942324-49799bdf-a152-4c8d-bc81-0e98b33e25d5.jpg)
   
   
   
   **Related issues**
   
   #1363
   
   **Checklist:**
   
   - [x] Did you explain what problem does this PR solve? Or what new features have been added?
   - [x] Have you added corresponding test cases?
   - [x] Have you modified the corresponding document?
   - [x] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip for plugin editor (Finished)

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963468646


##########
web/cypress/e2e/rest/service-edit-service-with-upstream.cy.js:
##########
@@ -94,7 +93,6 @@ context('Edit Service with Upstream', () => {
         force: true,
       })
       .should('value', data.ip1);
-    cy.get(selector.input).should('be.disabled');

Review Comment:
   This is a relatively old test case. In any case, there will be no input box abandoned. It is meaningless to judge whether it is abandoned



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on pull request #2581: Feat: add tip for plugin editor

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#issuecomment-1212631386

   WIP, do not merge yet


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#issuecomment-1263051174

   @Baoyuantop @guoqqqi @bzp2010 @SkyeYoung 
   
   All test cases of Dashboard have been repaired and passed, and the issue#2615 can be closed.
   
   ![image](https://user-images.githubusercontent.com/72308243/193181508-dbf1e8b5-08f3-44b0-8e44-e16b6014ff32.png)
   ![image](https://user-images.githubusercontent.com/72308243/193181556-cb8ca6aa-9444-452b-9e32-71b04bc1b3e8.png)
   
   cc @butterfly1924 **plugin-schema.cy.js** has been fixed.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963474405


##########
web/cypress/e2e/rest/service-edit-service-with-upstream.cy.js:
##########
@@ -94,7 +93,6 @@ context('Edit Service with Upstream', () => {
         force: true,
       })
       .should('value', data.ip1);
-    cy.get(selector.input).should('be.disabled');

Review Comment:
   If you don't click next, some will be banned and some will not. Its positioning of elements is not accurate. It may refer to all input boxes, but there are forbidden and good input boxes. No matter whether it is '.not ' or '.be', it will make mistakes. If it refers to the box just entered, there is something wrong with its writing. It's better to delete it.



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] SkyeYoung commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r972726808


##########
web/src/components/Plugin/PluginDetail.tsx:
##########
@@ -43,6 +48,8 @@ import type { languages } from 'monaco-editor';
 import { fetchSchema } from './service';
 import { json2yaml, yaml2json } from '../../helpers';
 import { PluginForm, PLUGIN_UI_LIST } from './UI';
+import*as allModels from './Models';
+import*as modelCode from './modelCode';

Review Comment:
   ```suggestion
   import * as allModels from './Models';
   import * as modelCode from './modelCode';
   ```



##########
web/src/components/Plugin/Models.ts:
##########
@@ -0,0 +1,220 @@
+/*
+ * 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.
+ */
+
+/**
+ * Model List of PluginType of Monaco editor
+ */
+
+import { Uri, editor } from "monaco-editor";
+import*as modelCode from './modelCode'

Review Comment:
   ```suggestion
   import * as modelCode from './modelCode'
   ```



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963571257


##########
web/cypress/e2e/rest/service-edit-service-with-upstream.cy.js:
##########
@@ -73,7 +73,7 @@ context('Edit Service with Upstream', () => {
     cy.get(selector.description).type(data.description);
     cy.get(selector.upstreamSelector).click();
     cy.contains(data.upstreamName).click();
-    cy.get(selector.input).should('be.disabled');
+    cy.get(selector.input).should('not.be.disabled');

Review Comment:
   name has just been written. It will not be abandoned until I click ‘next’



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#issuecomment-1263328713

   I've removed the prompt box, maybe it'll be a little bit cleaner @SkyeYoung 
   ![image](https://user-images.githubusercontent.com/72308243/193238115-7ca42734-f728-4cb5-bae9-16ade2f68fdf.png)
   cc @Baoyuantop @guoqqqi 
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r968251474


##########
web/cypress/e2e/plugin/create-delete-in-drawer-plugin.cy.js:
##########
@@ -292,12 +292,12 @@ context('Delete Plugin List with the Drawer', () => {
       cy.contains(item)
         .parents(selector.pluginCardBordered)
         .within(() => {
-          cy.get('button').click();
+          cy.get('button', 'Enable').click();

Review Comment:
   Well, I thought this would be more stable, and I would cancel the 'enable'. 
   
   > As for "this E2E test actually disabled the plugins and then attempted to check if the plugin was enabled (or switch is in" on "state) which is causing failure in CI." 
   
   what do you think should be solved? You can change it directly in my PR
   @butterfly1924 
   cc @bzp2010 



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963482143


##########
web/cypress/e2e/plugin/create-delete-in-drawer-plugin.cy.js:
##########
@@ -292,12 +292,12 @@ context('Delete Plugin List with the Drawer', () => {
       cy.contains(item)
         .parents(selector.pluginCardBordered)
         .within(() => {
-          cy.get('button').click();
+          cy.get('button', 'Enable').click();
         });
       cy.get(selector.drawer)
         .should('be.visible')
         .within(() => {
-          cy.get(selector.checkedSwitcher).should('exist');
+          cy.get(selector.disabledSwitcher).should('exist');

Review Comment:
   When the plug-in is enabled, the plug-in is not selected by default



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r984202540


##########
web/cypress/e2e/plugin/plugin-schema.cy.js:
##########
@@ -75,10 +75,6 @@ describe('Plugin Schema Test', () => {
             } else {
               cy.log(`${name} not a global plugin, skipping`);
             }
-
-            if (cases.length === i + 1) {
-              cy.reload(true);
-            }

Review Comment:
   Frequent refreshing is the root cause of plugin-schema.cy.js' error. In fact, the logic of the test case is completely correct. It is the constant aspiration of **umi.js**



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r964587256


##########
web/cypress/e2e/rest/service-edit-service-with-upstream.cy.js:
##########
@@ -88,19 +87,16 @@ context('Edit Service with Upstream', () => {
     cy.contains('Search').click();
     cy.contains(data.serviceName).siblings().contains('Configure').click();
 
-    cy.wait(500);
-    cy.get(selector.nodes_0_host)
-      .click({
-        force: true,
-      })
-      .should('value', data.ip1);
-    cy.get(selector.input).should('be.disabled');
-
     cy.get(selector.upstreamSelector).click();
-    cy.contains('.ant-select-item-option-content', 'Custom').click();
-    cy.get(selector.nodes_0_host).should('not.be.disabled').clear().type(data.ip2);
-    cy.get(selector.nodes_0_port).type(data.port);
-    cy.get(selector.nodes_0_weight).type(data.weight);
+    cy.wait(500);
+    cy.contains('.ant-select-item-option-content', 'Custom').should('be.visible').click();
+    cy.wait(300);
+    cy.get$(selector.nodes_0_host).should('not.be.disabled').clear().type(data.ip2);

Review Comment:
   I use jQuery to wrap some elements, which can make the positioning of more accurate



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r964573627


##########
web/cypress/e2e/rest/service-edit-service-with-upstream.cy.js:
##########
@@ -73,7 +73,6 @@ context('Edit Service with Upstream', () => {
     cy.get(selector.description).type(data.description);
     cy.get(selector.upstreamSelector).click();
     cy.contains(data.upstreamName).click();
-    cy.get(selector.input).should('be.disabled');

Review Comment:
   If you don't click next, some will be banned and some will not. Its positioning of elements is not accurate. It may refer to all input boxes, but there are forbidden and good input boxes. No matter whether it is '.not ' or '.be', it will make mistakes. If it refers to the box just entered, there is something wrong with its writing. It's better to delete it.
   
   **In a word**, name has just been written. It will not be abandoned until I click ‘next’.



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r965706833


##########
web/cypress/e2e/rest/upstream-create_and_edit_upstream_with_no_nodes.cy.js:
##########
@@ -64,7 +64,6 @@ context('Create and Delete Upstream', () => {
 
     cy.get(selector.upstreamNodeMinus0).should('not.exist');
     cy.contains('button', 'Next').should('not.be.disabled').click();
-    cy.contains('button', 'Next').should('not.be.disabled').click();

Review Comment:
   In fact, it only needs a 'next'



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r984202540


##########
web/cypress/e2e/plugin/plugin-schema.cy.js:
##########
@@ -75,10 +75,6 @@ describe('Plugin Schema Test', () => {
             } else {
               cy.log(`${name} not a global plugin, skipping`);
             }
-
-            if (cases.length === i + 1) {
-              cy.reload(true);
-            }

Review Comment:
   Frequent refreshing is the **root cause** of plugin-schema.cy.js' error. In fact, the logic of the test case is completely correct. It is the constant aspiration of **umi.js**



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r984202540


##########
web/cypress/e2e/plugin/plugin-schema.cy.js:
##########
@@ -75,10 +75,6 @@ describe('Plugin Schema Test', () => {
             } else {
               cy.log(`${name} not a global plugin, skipping`);
             }
-
-            if (cases.length === i + 1) {
-              cy.reload(true);
-            }

Review Comment:
   Frequent refreshing is the **root cause** of plugin-schema.cy.js' error. In fact, the logic of the test case is completely correct. which is the problem of **umi.js** itself



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] guoqqqi merged pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
guoqqqi merged PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963473542


##########
web/cypress/e2e/rest/upstream-create_and_edit_upstream_with_no_nodes.cy.js:
##########
@@ -64,7 +64,6 @@ context('Create and Delete Upstream', () => {
 
     cy.get(selector.upstreamNodeMinus0).should('not.exist');
     cy.contains('button', 'Next').should('not.be.disabled').click();
-    cy.contains('button', 'Next').should('not.be.disabled').click();

Review Comment:
   There is an extra next added here. In fact, only one next is needed



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on pull request #2581: Feat: add tip for plugin editor

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#issuecomment-1210949938

   @guoqqqi @Baoyuantop @bzp2010 @SkyeYoung 
   This work has been completed. I think the degree of completion is very high. All the pages that need plug-ins have examples. Because it is non functional, there is no need for new test cases.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r964573627


##########
web/cypress/e2e/rest/service-edit-service-with-upstream.cy.js:
##########
@@ -73,7 +73,6 @@ context('Edit Service with Upstream', () => {
     cy.get(selector.description).type(data.description);
     cy.get(selector.upstreamSelector).click();
     cy.contains(data.upstreamName).click();
-    cy.get(selector.input).should('be.disabled');

Review Comment:
   If you don't click next, some will be banned and some will not. Its positioning of elements is not accurate. It may refer to all input boxes, but there are forbidden and good input boxes. No matter whether it is '.not ' or '.be', it will make mistakes. If it refers to the box just entered, there is something wrong with its writing. It's better to delete it.



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip for plugin editor (Finished)

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963474405


##########
web/cypress/e2e/rest/service-edit-service-with-upstream.cy.js:
##########
@@ -94,7 +93,6 @@ context('Edit Service with Upstream', () => {
         force: true,
       })
       .should('value', data.ip1);
-    cy.get(selector.input).should('be.disabled');

Review Comment:
   This is a relatively old test case. In any case, there will be no input box abandoned. It is meaningless to judge whether it is abandoned



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963474405


##########
web/cypress/e2e/rest/service-edit-service-with-upstream.cy.js:
##########
@@ -94,7 +93,6 @@ context('Edit Service with Upstream', () => {
         force: true,
       })
       .should('value', data.ip1);
-    cy.get(selector.input).should('be.disabled');

Review Comment:
   1. If the IP disappears, the following Test Cy will remind us that this is **unnecessary**. I feel that I just want to appear professional, so I wrote this.
   2. Clicking on a disabled input box is strange. It's better to use contain or something else. According to attempts, this writing will lead to element conflicts in an assertion. This place often occurs, and the element is separated from the DOM, which is the reason.



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #2581: Feat: add tip for plugin editor

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#issuecomment-1210888887

   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2581?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2581](https://codecov.io/gh/apache/apisix-dashboard/pull/2581?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6ee12cc) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/0273865d54eb60a5812c403a887398fe74d30a65?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0273865) will **decrease** coverage by `8.21%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2581      +/-   ##
   ==========================================
   - Coverage   76.02%   67.81%   -8.22%     
   ==========================================
     Files         136      136              
     Lines        3583     3585       +2     
     Branches      864      864              
   ==========================================
   - Hits         2724     2431     -293     
   - Misses        859     1154     +295     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | frontend-e2e-test | `67.81% <100.00%> (-8.22%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2581?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [web/src/components/Plugin/PluginDetail.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9QbHVnaW5EZXRhaWwudHN4) | `75.13% <100.00%> (+0.27%)` | :arrow_up: |
   | [web/src/components/LabelsfDrawer/LabelsDrawer.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL0xhYmVsc2ZEcmF3ZXIvTGFiZWxzRHJhd2VyLnRzeA==) | `4.16% <0.00%> (-79.17%)` | :arrow_down: |
   | [...b/src/pages/Route/components/DataLoader/Import.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL0RhdGFMb2FkZXIvSW1wb3J0LnRzeA==) | `4.91% <0.00%> (-78.69%)` | :arrow_down: |
   | [...es/Route/components/DataLoader/loader/OpenAPI3.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL0RhdGFMb2FkZXIvbG9hZGVyL09wZW5BUEkzLnRzeA==) | `33.33% <0.00%> (-66.67%)` | :arrow_down: |
   | [...pages/Route/components/Step1/MatchingRulesView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAxL01hdGNoaW5nUnVsZXNWaWV3LnRzeA==) | `25.00% <0.00%> (-54.17%)` | :arrow_down: |
   | [web/src/pages/Route/transform.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS90cmFuc2Zvcm0udHM=) | `52.91% <0.00%> (-27.52%)` | :arrow_down: |
   | [.../src/pages/Route/components/Step1/ProxyRewrite.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAxL1Byb3h5UmV3cml0ZS50c3g=) | `70.68% <0.00%> (-24.14%)` | :arrow_down: |
   | [...b/src/components/Plugin/UI/referer-restriction.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9yZWZlcmVyLXJlc3RyaWN0aW9uLnRzeA==) | `69.69% <0.00%> (-21.22%)` | :arrow_down: |
   | [web/src/pages/Route/components/Step1/MetaView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAxL01ldGFWaWV3LnRzeA==) | `78.87% <0.00%> (-21.13%)` | :arrow_down: |
   | [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==) | `60.65% <0.00%> (-19.68%)` | :arrow_down: |
   | ... and [9 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2581/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip for plugin editor (Finished)

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963473542


##########
web/cypress/e2e/rest/upstream-create_and_edit_upstream_with_no_nodes.cy.js:
##########
@@ -64,7 +64,6 @@ context('Create and Delete Upstream', () => {
 
     cy.get(selector.upstreamNodeMinus0).should('not.exist');
     cy.contains('button', 'Next').should('not.be.disabled').click();
-    cy.contains('button', 'Next').should('not.be.disabled').click();

Review Comment:
   There is an extra next added here. In fact, only one next is needed



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963485439


##########
web/package.json:
##########
@@ -6,7 +6,7 @@
   "scripts": {
     "prepare": "cd .. && husky install web/.husky",
     "analyze": "cross-env ANALYZE=1 yarn run build",
-    "build": "cp -R ./node_modules/monaco-editor ./public/ && umi build",
+    "build": "cp -R ./node_modules/monaco-editor ./public/ && NODE_OPTIONS=--max_old_space_size=4096 umi build",

Review Comment:
   Node.js uses the old V8 kernel. The default package size is only 1.6g, which is not suitable for the current version. Allocating more memory will reduce some problems



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] butterfly1924 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
butterfly1924 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r968244444


##########
web/cypress/e2e/plugin/create-delete-in-drawer-plugin.cy.js:
##########
@@ -292,12 +292,12 @@ context('Delete Plugin List with the Drawer', () => {
       cy.contains(item)
         .parents(selector.pluginCardBordered)
         .within(() => {
-          cy.get('button').click();
+          cy.get('button', 'Enable').click();

Review Comment:
   ![image](https://user-images.githubusercontent.com/90364136/189631465-844f9116-45f2-4a59-bd2e-bd1c04dcb6fa.png)
   



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] SkyeYoung commented on pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#issuecomment-1263123277

   cc @Baoyuantop @bzp2010 


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963474405


##########
web/cypress/e2e/rest/service-edit-service-with-upstream.cy.js:
##########
@@ -94,7 +93,6 @@ context('Edit Service with Upstream', () => {
         force: true,
       })
       .should('value', data.ip1);
-    cy.get(selector.input).should('be.disabled');

Review Comment:
   1. If the IP disappears, the following Test Cy will remind us that this is **unnecessary**. I feel that I just want to appear professional, so I wrote this.
   2. Clicking on a disabled input box is strange. It's better to use contain or something else. According to attempts, this writing will lead to element conflicts in an assertion. This place often occurs, and the element is separated from the DOM, which is the reason.



##########
web/cypress/e2e/rest/service-edit-service-with-upstream.cy.js:
##########
@@ -73,7 +73,6 @@ context('Edit Service with Upstream', () => {
     cy.get(selector.description).type(data.description);
     cy.get(selector.upstreamSelector).click();
     cy.contains(data.upstreamName).click();
-    cy.get(selector.input).should('be.disabled');

Review Comment:
   If you don't click next, some will be banned and some will not. Its positioning of elements is not accurate. It may refer to all input boxes, but there are forbidden and good input boxes. No matter whether it is '.not ' or '.be', it will make mistakes. If it refers to the box just entered, there is something wrong with its writing. It's better to delete it.
   
   **In a word**, name has just been written. It will not be abandoned until I click ‘next’.



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on a diff in pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on code in PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#discussion_r963486955


##########
web/cypress/e2e/plugin/create-route-with-plugin-orchestration.cy.js:
##########
@@ -59,6 +59,7 @@ context('Create and delete route with plugin orchestration', () => {
     cy.contains('Next').click();
 
     cy.get(selector.groupButton).contains('Orchestration').click();
+    cy.wait(1000);

Review Comment:
   This can reduce the retry time of cypress by about 2 times.



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] FangSen9000 commented on pull request #2581: Feat: add tip and preset model for plugin editor, improve e2e stability

Posted by GitBox <gi...@apache.org>.
FangSen9000 commented on PR #2581:
URL: https://github.com/apache/apisix-dashboard/pull/2581#issuecomment-1240299363

   @guoqqqi, you said before that you would consider merging only if E2E is completely correct, but recently you should have found that the current test is problematic, but it is completely correct and needs to be fixed. Among them, five test cases are problematic, and they are difficult to pass. (this is not my problem, but the new E2E test case error that occurred after ten days ago) are: 
   1. _Create delete in drawer plugin.cy.js_ 
   2. _Upstream create_ and_ edit_ upstream_ with_ no_ Nodes.cy.js_ 
   3. _Service-edit-service-with-upstream.cy.js_ (this mainly occurs in the cloud) 
   4. _Plugin-schema.cy.js_.
   
   Fortunately, I solved the first and second. The fourth one is the most serious one. It can not pass at all. It is a loop test. There is a problem with a judgment in the middle. There is no problem in the test logic, but somehow the judgment fails and the loop jumps out midway. You can see this https://github.com/apache/apisix-dashboard/pull/2612/checks. If there is no change, there will be 100% errors. I tried to spend three days, but I didn't find the root cause. (the third and fourth should find a more professional tester to have a look. The pass rate of the third is only 10% in a certain environment. The elements are either separated, lost or missing, and only appear in the cloud. It is normal locally, as shown in the video below:)
   
   https://user-images.githubusercontent.com/72308243/189047162-0da14fc5-a3fa-47ee-8ab4-821647624c8f.mp4
   
   > @Baoyuantop @bzp2010 If you have time, you can give some suggestions. And, If anyone can try to fix the test cases of 3 and 4, you can find them. Many people have these two problems in PR. 
   
   To sum up, the **effect** of this PR is: add tip and preset model for plugin editor, improve E2E stability
   All my work on improving test stability can be seen in this pr. This should reduce the error rate of the test.
   For the explanation of model, please see the text at the top of this pr. It helps users to use the plug-in by presetting the plug-in template. There is a video. 
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org