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/16 14:13:08 UTC

[GitHub] [apisix-dashboard] Morakes opened a new pull request, #2593: fix: page refresh causes deletion exception

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

   Please answer these questions before submitting a pull request, **or your PR will get closed**.
   
   **Why submit this pull request?**
   
   - [x] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   **What changes will this PR take into?**
   
   Please update this section with detailed description.
   
   **Related issues**
   
   fix/resolve #0001
   
   **Checklist:**
   
   - [X] Did you explain what problem does this PR solve? Or what new features have been added?
   - [ ] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [ ] 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] codecov-commenter commented on pull request #2593: fix: page refresh causes deletion exception

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

   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2593?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 [#2593](https://codecov.io/gh/apache/apisix-dashboard/pull/2593?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f6051aa) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/80029c649400dc22cbec437ae8329acec36cc0cb?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (80029c6) will **decrease** coverage by `9.58%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2593      +/-   ##
   ==========================================
   - Coverage   76.00%   66.41%   -9.59%     
   ==========================================
     Files         136       36     -100     
     Lines        3588      944    -2644     
     Branches      865      262     -603     
   ==========================================
   - Hits         2727      627    -2100     
   + Misses        861      317     -544     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | frontend-e2e-test | `66.41% <100.00%> (-9.59%)` | :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/2593?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/PluginPage.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2593/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9QbHVnaW5QYWdlLnRzeA==) | `81.81% <100.00%> (-17.04%)` | :arrow_down: |
   | [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2593/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==) | `29.50% <0.00%> (-47.55%)` | :arrow_down: |
   | [web/src/components/RightContent/AvatarDropdown.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2593/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-d2ViL3NyYy9jb21wb25lbnRzL1JpZ2h0Q29udGVudC9BdmF0YXJEcm9wZG93bi50c3g=) | `50.00% <0.00%> (-32.15%)` | :arrow_down: |
   | [web/src/components/PanelSection/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2593/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-d2ViL3NyYy9jb21wb25lbnRzL1BhbmVsU2VjdGlvbi9pbmRleC50c3g=) | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
   | [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2593/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-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==) | `69.44% <0.00%> (-22.23%)` | :arrow_down: |
   | [...b/src/components/Plugin/UI/referer-restriction.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2593/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/components/ActionBar/ActionBar.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2593/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-d2ViL3NyYy9jb21wb25lbnRzL0FjdGlvbkJhci9BY3Rpb25CYXIudHN4) | `69.23% <0.00%> (-15.39%)` | :arrow_down: |
   | [web/src/components/Plugin/PluginDetail.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2593/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) | `63.68% <0.00%> (-11.18%)` | :arrow_down: |
   | [web/src/components/Plugin/UI/cors.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2593/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-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9jb3JzLnRzeA==) | `71.11% <0.00%> (-11.12%)` | :arrow_down: |
   | ... and [107 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2593/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] guoqqqi commented on a diff in pull request #2593: fix: page refresh causes deletion exception

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


##########
web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js:
##########
@@ -211,6 +225,93 @@ context('Delete Plugin List with the Drawer', () => {
       });
     });
     cy.contains(data.basicAuthPlugin).should('exist');
+
+    cy.visit('/plugin/list');
+    cy.get(selector.empty).should('be.visible');
+  });
+
+  it('should be deleted one of the plugins instead of all', function () {
+    cy.visit('/plugin/list');
+    cy.get(selector.refresh).click();
+    cy.contains('Enable').click();
+
+    const pluginList = [data.jwtAuthPlugin, data.basicAuthPlugin, data.keyAuthPlugin];
+    pluginList.forEach((item) => {

Review Comment:
   why not use `Object.values(data)`



-- 
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 commented on pull request #2593: fix: page refresh causes deletion exception

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

   hello, @Morakes Can you help to add the relevant E2E tests? We can update an existing test case to cover 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] guoqqqi merged pull request #2593: fix: page refresh causes deletion exception

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


-- 
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] Morakes commented on a diff in pull request #2593: fix: page refresh causes deletion exception

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


##########
web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js:
##########
@@ -211,6 +225,93 @@ context('Delete Plugin List with the Drawer', () => {
       });
     });
     cy.contains(data.basicAuthPlugin).should('exist');
+
+    cy.visit('/plugin/list');
+    cy.get(selector.empty).should('be.visible');
+  });
+
+  it('should be deleted one of the plugins instead of all', function () {
+    cy.visit('/plugin/list');
+    cy.get(selector.refresh).click();
+    cy.contains('Enable').click();
+
+    const pluginList = [data.jwtAuthPlugin, data.basicAuthPlugin, data.keyAuthPlugin];
+    pluginList.forEach((item) => {

Review Comment:
   If someone add the new plugins to the data object, it may affect this test case,so I added it manually.



-- 
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