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/03/09 06:32:57 UTC

[GitHub] [apisix-dashboard] oil-oil opened a new pull request #2370: feat: add page reload judgment

oil-oil opened a new pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370


   Please answer these questions before submitting a pull request, **or your PR will get closed**.
   
   - [x] Bugfix
   - [x] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   **What changes will this PR take into?**
   
   When the table needs to be reloaded after operation, judge whether there is no data on the current page. If there is no data, move the page number to the previous page.
   
   **Related issues**
   
   resolve: #2129
   
   **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] Baoyuantop commented on a change in pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on a change in pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#discussion_r825545942



##########
File path: web/cypress/integration/consumer/batch-create-and-delete-consumer.spec.js
##########
@@ -0,0 +1,118 @@
+/*
+ * 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('Batch Create And Delete Consumer', () => {
+  const selector = {
+    username: '#username',
+    page_item: '.ant-pagination-item-2',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+    pluginCard: '.ant-card',
+    drawer: '.ant-drawer-content',
+    monacoScroll: '.monaco-scrollable-element',
+    monacoViewZones: '.view-zones',
+    disabledSwitcher: '#disable',
+    popoper: '.ant-popover',
+    popoprerHiden: '.ant-popover-hidden',
+  };
+
+  const data = {
+    consumerName: 'test_consumer',
+    createConsumerSuccess: 'Create Consumer Successfully',
+    deleteConsumerSuccess: 'Delete Consumer Successfully',
+  };
+
+  const deleteConsumer = (consumerName) => {
+    cy.contains(consumerName).siblings().contains('Delete').click({ force: true });
+    cy.get(selector.popoper)
+      .not(selector.popoprerHiden)
+      .contains('Confirm')
+      .should('be.visible')
+      .click({ force: true });
+    cy.get(selector.notification).should('contain', data.deleteConsumerSuccess);
+    cy.get(selector.notificationCloseIcon).click();
+  };
+
+  beforeEach(() => {
+    cy.login();
+  });
+
+  it('should batch create eleven consumer', () => {
+    cy.visit('/');
+    cy.contains('Consumer').click();
+
+    Array.from({ length: 11 }).forEach((value, key) => {

Review comment:
       For this case, we can use the API to create resources in bulk. This loop tends to lead to unstable tests.




-- 
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 edited a comment on pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#issuecomment-1062618024


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?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 [#2370](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d8fd44b) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/561ed377ec2237707bb8c78623e336360c6c6463?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (561ed37) will **increase** coverage by `0.21%`.
   > The diff coverage is `92.85%`.
   
   > :exclamation: Current head d8fd44b differs from pull request most recent head 2bfb532. Consider uploading reports for the commit 2bfb532 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2370      +/-   ##
   ==========================================
   + Coverage   68.52%   68.73%   +0.21%     
   ==========================================
     Files         131      131              
     Lines        3419     3426       +7     
     Branches      826      829       +3     
   ==========================================
   + Hits         2343     2355      +12     
   + Misses       1076     1071       -5     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | frontend-e2e-test | `68.73% <92.85%> (+0.21%)` | :arrow_up: |
   
   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/2370?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/pages/Consumer/components/Step1.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9jb21wb25lbnRzL1N0ZXAxLnRzeA==) | `100.00% <ø> (ø)` | |
   | [web/src/pages/Consumer/Create.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9DcmVhdGUudHN4) | `82.69% <50.00%> (ø)` | |
   | [web/src/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==) | `83.63% <85.71%> (+0.60%)` | :arrow_up: |
   | [web/src/hooks/usePagination.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9ob29rcy91c2VQYWdpbmF0aW9uLnRz) | `100.00% <100.00%> (ø)` | |
   | [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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==) | `91.66% <100.00%> (+3.09%)` | :arrow_up: |
   | [web/src/pages/Proto/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Qcm90by9MaXN0LnRzeA==) | `100.00% <100.00%> (+3.84%)` | :arrow_up: |
   | [...pages/Route/components/Step1/MatchingRulesView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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==) | `75.00% <100.00%> (+0.26%)` | :arrow_up: |
   | [web/src/pages/Route/transform.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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=) | `78.30% <100.00%> (+0.52%)` | :arrow_up: |
   | [web/src/pages/SSL/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9TU0wvTGlzdC50c3g=) | `85.00% <100.00%> (ø)` | |
   | [web/src/pages/Service/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0xpc3QudHN4) | `94.11% <100.00%> (ø)` | |
   | ... and [5 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [561ed37...2bfb532](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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 change in pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on a change in pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#discussion_r829646092



##########
File path: web/cypress/integration/consumer/table-auto-jump-when-no-data.spec.js
##########
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+context('Table Auto Jump When No Data', () => {
+  const selector = {
+    username: '#username',
+    page_item: '.ant-pagination-item-2',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+    pluginCard: '.ant-card',
+    drawer: '.ant-drawer-content',
+    monacoScroll: '.monaco-scrollable-element',
+    monacoViewZones: '.view-zones',
+    disabledSwitcher: '#disable',
+    popoper: '.ant-popover',
+    popoprerHiden: '.ant-popover-hidden',
+  };
+
+  const data = {
+    consumerName: 'test_consumer',
+    createConsumerSuccess: 'Create Consumer Successfully',
+    deleteConsumerSuccess: 'Delete Consumer Successfully',
+  };
+
+  beforeEach(() => {
+    cy.login();
+    Array.from({ length: 11 }).forEach((value, key) => {
+      const payload = {
+        username: data.consumerName + key,
+        plugins: {
+          'key-auth': {
+            key: 'test',
+            disable: false,
+          },
+        },
+      };
+      cy.requestWithToken({ method: 'PUT', payload, url: '/apisix/admin/consumers' });
+    });
+  });
+
+  it('should delete last data and jump to first page', () => {
+    cy.visit('/');
+    cy.contains('Consumer').click();
+    cy.get(selector.page_item).click();
+    cy.wait(1000);
+    cy.contains('Delete').click({ force: true });

Review comment:
       the `force: true` will not ensure that the click on delete will be successful, so why use force here?

##########
File path: web/cypress/integration/consumer/table-auto-jump-when-no-data.spec.js
##########
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+context('Table Auto Jump When No Data', () => {
+  const selector = {
+    username: '#username',
+    page_item: '.ant-pagination-item-2',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+    pluginCard: '.ant-card',
+    drawer: '.ant-drawer-content',
+    monacoScroll: '.monaco-scrollable-element',
+    monacoViewZones: '.view-zones',
+    disabledSwitcher: '#disable',
+    popoper: '.ant-popover',
+    popoprerHiden: '.ant-popover-hidden',
+  };
+
+  const data = {
+    consumerName: 'test_consumer',
+    createConsumerSuccess: 'Create Consumer Successfully',
+    deleteConsumerSuccess: 'Delete Consumer Successfully',
+  };
+
+  beforeEach(() => {
+    cy.login();
+    Array.from({ length: 11 }).forEach((value, key) => {
+      const payload = {
+        username: data.consumerName + key,
+        plugins: {
+          'key-auth': {
+            key: 'test',
+            disable: false,
+          },
+        },
+      };
+      cy.requestWithToken({ method: 'PUT', payload, url: '/apisix/admin/consumers' });
+    });
+  });
+
+  it('should delete last data and jump to first page', () => {
+    cy.visit('/');
+    cy.contains('Consumer').click();
+    cy.get(selector.page_item).click();
+    cy.wait(1000);

Review comment:
       Why wait for 1 s?

##########
File path: web/cypress/integration/proto/table-auto-jump-when-no-data.spec.js
##########
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+context('Batch Create Proto And Delete Proto', () => {
+  const selector = {
+    id: '#id',
+    content: '.view-lines',
+    page_item: '.ant-pagination-item-2',
+    draw: '.ant-drawer-content',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+  };
+
+  const data = {
+    createProtoSuccess: 'Create proto Successfully',
+    deleteProtoSuccess: 'Delete proto Successfully',
+  };
+
+  beforeEach(() => {
+    cy.login();
+    Array.from({ length: 11 }).forEach(async (value, key) => {
+      const payload = {
+        content: 'test',
+        desc: '',
+        id: `protoId${key}`,
+      };
+      cy.requestWithToken({ method: 'POST', payload, url: '/apisix/admin/proto' });
+    });
+  });

Review comment:
       Note that using an array loop in `beforeEach` will cause the loop to be run once for each test case run

##########
File path: web/cypress/integration/proto/table-auto-jump-when-no-data.spec.js
##########
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+context('Batch Create Proto And Delete Proto', () => {
+  const selector = {
+    id: '#id',
+    content: '.view-lines',
+    page_item: '.ant-pagination-item-2',
+    draw: '.ant-drawer-content',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+  };
+
+  const data = {
+    createProtoSuccess: 'Create proto Successfully',
+    deleteProtoSuccess: 'Delete proto Successfully',
+  };
+
+  beforeEach(() => {
+    cy.login();
+    Array.from({ length: 11 }).forEach(async (value, key) => {
+      const payload = {
+        content: 'test',
+        desc: '',
+        id: `protoId${key}`,
+      };
+      cy.requestWithToken({ method: 'POST', payload, url: '/apisix/admin/proto' });
+    });
+  });
+
+  it('should delete last data and jump to first page', () => {
+    cy.visit('/');
+    cy.contains('Protocol Buffers').click();
+    cy.get(selector.page_item).click();
+    cy.wait(1000);

Review comment:
       ditto




-- 
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] oil-oil commented on pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
oil-oil commented on pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#issuecomment-1068652413


   @Baoyuantop @guoqqqi  I have updated the test case, and now I can pass the test successfully. Please review it for me again.🤓


-- 
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] Baoyuantop commented on a change in pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on a change in pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#discussion_r828583755



##########
File path: web/cypress/integration/consumer/table-auto-jump-when-no-data.spec.js
##########
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+context('Table Auto Jump When No Data', () => {
+  const selector = {
+    username: '#username',
+    page_item: '.ant-pagination-item-2',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+    pluginCard: '.ant-card',
+    drawer: '.ant-drawer-content',
+    monacoScroll: '.monaco-scrollable-element',
+    monacoViewZones: '.view-zones',
+    disabledSwitcher: '#disable',
+    popoper: '.ant-popover',
+    popoprerHiden: '.ant-popover-hidden',
+  };
+
+  const data = {
+    consumerName: 'test_consumer',
+    createConsumerSuccess: 'Create Consumer Successfully',
+    deleteConsumerSuccess: 'Delete Consumer Successfully',
+  };
+
+  beforeEach(() => {

Review comment:
       beforeEach or before?




-- 
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] Baoyuantop commented on pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#issuecomment-1071944993


   cc @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] SkyeYoung commented on a change in pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on a change in pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#discussion_r837016920



##########
File path: web/src/hooks/usePagination.ts
##########
@@ -30,5 +33,14 @@ export default function usePagination() {
     history.replace(`${location.pathname}?page=${page}&pageSize=${pageSize}`);
   };
 
-  return { paginationConfig, savePageList };
+  const checkPageList = (ref: MutableRefObject<ActionType | undefined>) => {
+    const { current, pageSize, total } = ref.current!.pageInfo as PageInfo;

Review comment:
       ```suggestion
       const { current, pageSize, total } = ref.current?.pageInfo as PageInfo;
   ```
   
   `!.` will just remove `undefined` and `null` from the `current`'s type. Maybe `?.` is better?




-- 
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 #2370: feat: add page reload judgment

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?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 [#2370](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ddb64f0) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/561ed377ec2237707bb8c78623e336360c6c6463?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (561ed37) will **decrease** coverage by `0.04%`.
   > The diff coverage is `90.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2370      +/-   ##
   ==========================================
   - Coverage   68.52%   68.48%   -0.05%     
   ==========================================
     Files         131      131              
     Lines        3419     3424       +5     
     Branches      826      827       +1     
   ==========================================
   + Hits         2343     2345       +2     
   - Misses       1076     1079       +3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | frontend-e2e-test | `68.48% <90.00%> (-0.05%)` | :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/2370?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/hooks/usePagination.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9ob29rcy91c2VQYWdpbmF0aW9uLnRz) | `92.85% <83.33%> (-7.15%)` | :arrow_down: |
   | [web/src/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==) | `83.03% <85.71%> (ø)` | |
   | [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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==) | `88.57% <100.00%> (ø)` | |
   | [web/src/pages/Proto/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Qcm90by9MaXN0LnRzeA==) | `96.15% <100.00%> (ø)` | |
   | [web/src/pages/SSL/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9TU0wvTGlzdC50c3g=) | `85.00% <100.00%> (ø)` | |
   | [web/src/pages/Service/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0xpc3QudHN4) | `94.11% <100.00%> (ø)` | |
   | [web/src/pages/Upstream/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9MaXN0LnRzeA==) | `91.42% <100.00%> (ø)` | |
   | [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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==) | `70.49% <0.00%> (-3.28%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [561ed37...ddb64f0](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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 change in pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on a change in pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#discussion_r831704962



##########
File path: web/cypress/integration/upstream/table-auto-jump-when-no-data.spec.js
##########
@@ -50,6 +50,7 @@ context('Table Auto Jump When No Data', () => {
           size: 320,
           idle_timeout: 60,
           requests: 1000,
+          ß,

Review comment:
       What is 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 commented on a change in pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on a change in pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#discussion_r827741522



##########
File path: web/cypress/integration/consumer/table-auto-jump-when-no-data.js.js
##########
@@ -0,0 +1,92 @@
+/*
+ * 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('Table Auto Jump When No Data', () => {
+  const selector = {
+    username: '#username',
+    page_item: '.ant-pagination-item-2',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+    pluginCard: '.ant-card',
+    drawer: '.ant-drawer-content',
+    monacoScroll: '.monaco-scrollable-element',
+    monacoViewZones: '.view-zones',
+    disabledSwitcher: '#disable',
+    popoper: '.ant-popover',
+    popoprerHiden: '.ant-popover-hidden',
+  };
+
+  const data = {
+    consumerName: 'test_consumer',
+    createConsumerSuccess: 'Create Consumer Successfully',
+    deleteConsumerSuccess: 'Delete Consumer Successfully',
+  };
+
+  const deleteConsumer = () => {
+    cy.contains('Delete').click({ force: true });
+    cy.get(selector.popoper)
+      .not(selector.popoprerHiden)
+      .contains('Confirm')
+      .should('be.visible')
+      .click({ force: true });
+    cy.get(selector.notification).should('contain', data.deleteConsumerSuccess);
+    cy.get(selector.notificationCloseIcon).click();
+  };
+
+  beforeEach(() => {
+    cy.login();
+    Array.from({ length: 11 }).forEach((value, key) => {
+      const payload = {
+        username: data.consumerName + key,
+        plugins: {
+          'key-auth': {
+            key: 'test',
+            disable: false,
+          },
+        },
+      };
+      cy.requestWithToken({ method: 'PUT', payload, url: '/apisix/admin/consumers' });
+    });
+  });
+
+  afterEach(() => {
+    cy.visit('/');
+    cy.contains('Consumer').click();
+    cy.get(`.ant-table-cell:contains(${data.consumerName})`).each((elem) => {
+      cy.requestWithToken({
+        method: 'DELETE',
+        url: `/apisix/admin/consumers/${elem.text()}`,
+      });
+    });
+  });
+
+  it('should delete last data and jump to first page', () => {
+    cy.visit('/');
+    cy.contains('Consumer').click();
+    cy.wait(500);

Review comment:
       Do we really need to wait for this?

##########
File path: web/cypress/integration/proto/table-auto-jump-when-no-data.js
##########
@@ -0,0 +1,78 @@
+/*
+ * 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('Batch Create Proto And Delete Proto', () => {
+  const selector = {
+    id: '#id',
+    content: '.view-lines',
+    page_item: '.ant-pagination-item-2',
+    draw: '.ant-drawer-content',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+  };
+
+  const data = {
+    createProtoSuccess: 'Create proto Successfully',
+    deleteProtoSuccess: 'Delete proto Successfully',
+  };
+
+  const deleteProto = () => {
+    cy.wait(500);
+    cy.contains('Delete').click();
+    cy.contains('button', 'Confirm').click();
+    cy.get(selector.notification).should('contain', data.deleteProtoSuccess);
+    cy.get(selector.notificationCloseIcon).click();
+  };

Review comment:
       We can use the custom command from the official documentation, By the way, we do not recommend using wait
   https://docs.cypress.io/api/cypress-api/custom-commands 
   https://docs.cypress.io/api/commands/wait#Wait-for-an-arbitrary-period-of-milliseconds

##########
File path: web/src/hooks/usePagination.ts
##########
@@ -30,5 +33,14 @@ export default function usePagination() {
     history.replace(`${location.pathname}?page=${page}&pageSize=${pageSize}`);
   };
 
-  return { paginationConfig, savePageList };
+  const checkPageList = (ref: MutableRefObject<ActionType | undefined>) => {
+    const { current, pageSize, total } = ref.current!.pageInfo as PageInfo;
+    if (current > pageSize / total && current > 1) {
+      savePageList(paginationConfig.current - 1, paginationConfig.pageSize);
+    } else {
+      ref.current?.reload();
+    }
+  };
+
+  return { paginationConfig, savePageList, checkPageList };

Review comment:
       Since we have abstracted the pager into a hook, is it enough for us to write a test for the pagination

##########
File path: web/cypress/integration/proto/table-auto-jump-when-no-data.js
##########
@@ -0,0 +1,78 @@
+/*
+ * 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('Batch Create Proto And Delete Proto', () => {
+  const selector = {
+    id: '#id',
+    content: '.view-lines',
+    page_item: '.ant-pagination-item-2',
+    draw: '.ant-drawer-content',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+  };
+
+  const data = {
+    createProtoSuccess: 'Create proto Successfully',
+    deleteProtoSuccess: 'Delete proto Successfully',
+  };
+
+  const deleteProto = () => {
+    cy.wait(500);
+    cy.contains('Delete').click();
+    cy.contains('button', 'Confirm').click();
+    cy.get(selector.notification).should('contain', data.deleteProtoSuccess);
+    cy.get(selector.notificationCloseIcon).click();
+  };
+
+  beforeEach(() => {
+    cy.login();
+    Array.from({ length: 11 }).forEach(async (value, key) => {
+      const payload = {
+        content: 'test',
+        desc: '',
+        id: `protoId${key}`,
+      };
+      cy.requestWithToken({ method: 'POST', payload, url: '/apisix/admin/proto' });
+    });
+  });
+
+  afterEach(() => {
+    cy.visit('/');
+    cy.contains('Proto').click();
+    cy.get('.ant-table-cell:contains(protoId)').each((elem) => {
+      cy.requestWithToken({
+        method: 'DELETE',
+        url: `/apisix/admin/proto/${elem.text()}`,
+      });
+    });
+  });
+
+  it('should delete last data and jump to first page', () => {
+    cy.visit('/');
+    cy.contains('Proto').click();
+    cy.wait(500);
+    cy.get(selector.page_item).click();
+    cy.wait(500);
+    deleteProto();

Review comment:
       ```suggestion
       deleteProto();
   ```
   IMO, I think it looks strange the way it's written.




-- 
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] Baoyuantop commented on pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#issuecomment-1071944993


   cc @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] codecov-commenter edited a comment on pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#issuecomment-1062618024


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?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 [#2370](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ca5b007) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/561ed377ec2237707bb8c78623e336360c6c6463?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (561ed37) will **increase** coverage by `0.15%`.
   > The diff coverage is `93.33%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2370      +/-   ##
   ==========================================
   + Coverage   68.52%   68.68%   +0.15%     
   ==========================================
     Files         131      131              
     Lines        3419     3426       +7     
     Branches      826      829       +3     
   ==========================================
   + Hits         2343     2353      +10     
   + Misses       1076     1073       -3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | frontend-e2e-test | `68.68% <93.33%> (+0.15%)` | :arrow_up: |
   
   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/2370?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/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==) | `83.63% <85.71%> (+0.60%)` | :arrow_up: |
   | [web/src/hooks/usePagination.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9ob29rcy91c2VQYWdpbmF0aW9uLnRz) | `100.00% <100.00%> (ø)` | |
   | [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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==) | `91.66% <100.00%> (+3.09%)` | :arrow_up: |
   | [web/src/pages/Proto/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Qcm90by9MaXN0LnRzeA==) | `100.00% <100.00%> (+3.84%)` | :arrow_up: |
   | [web/src/pages/SSL/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9TU0wvTGlzdC50c3g=) | `85.00% <100.00%> (ø)` | |
   | [web/src/pages/Service/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0xpc3QudHN4) | `94.11% <100.00%> (ø)` | |
   | [web/src/pages/Upstream/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9MaXN0LnRzeA==) | `94.28% <100.00%> (+2.85%)` | :arrow_up: |
   | [web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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==) | `70.49% <0.00%> (-3.28%)` | :arrow_down: |
   | [web/src/pages/Consumer/Create.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9DcmVhdGUudHN4) | `82.69% <0.00%> (ø)` | |
   | [web/src/pages/Consumer/components/Step1.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9jb21wb25lbnRzL1N0ZXAxLnRzeA==) | `100.00% <0.00%> (ø)` | |
   | ... and [6 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [561ed37...ca5b007](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] codecov-commenter edited a comment on pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#issuecomment-1062618024


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?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 [#2370](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b23afeb) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/561ed377ec2237707bb8c78623e336360c6c6463?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (561ed37) will **increase** coverage by `0.23%`.
   > The diff coverage is `93.33%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2370      +/-   ##
   ==========================================
   + Coverage   68.52%   68.76%   +0.23%     
   ==========================================
     Files         131      131              
     Lines        3419     3426       +7     
     Branches      826      829       +3     
   ==========================================
   + Hits         2343     2356      +13     
   + Misses       1076     1070       -6     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | frontend-e2e-test | `68.76% <93.33%> (+0.23%)` | :arrow_up: |
   
   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/2370?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/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==) | `83.63% <85.71%> (+0.60%)` | :arrow_up: |
   | [web/src/hooks/usePagination.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9ob29rcy91c2VQYWdpbmF0aW9uLnRz) | `100.00% <100.00%> (ø)` | |
   | [web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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==) | `91.66% <100.00%> (+3.09%)` | :arrow_up: |
   | [web/src/pages/Proto/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Qcm90by9MaXN0LnRzeA==) | `100.00% <100.00%> (+3.84%)` | :arrow_up: |
   | [web/src/pages/SSL/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9TU0wvTGlzdC50c3g=) | `85.00% <100.00%> (ø)` | |
   | [web/src/pages/Service/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0xpc3QudHN4) | `94.11% <100.00%> (ø)` | |
   | [web/src/pages/Upstream/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9MaXN0LnRzeA==) | `94.28% <100.00%> (+2.85%)` | :arrow_up: |
   | [web/src/pages/Consumer/Create.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9DcmVhdGUudHN4) | `82.69% <0.00%> (ø)` | |
   | [web/src/pages/Consumer/components/Step1.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9jb21wb25lbnRzL1N0ZXAxLnRzeA==) | `100.00% <0.00%> (ø)` | |
   | [...pages/Route/components/Step1/MatchingRulesView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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==) | `75.00% <0.00%> (+0.26%)` | :arrow_up: |
   | ... and [6 more](https://codecov.io/gh/apache/apisix-dashboard/pull/2370/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) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [561ed37...b23afeb](https://codecov.io/gh/apache/apisix-dashboard/pull/2370?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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 change in pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
guoqqqi commented on a change in pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#discussion_r829646092



##########
File path: web/cypress/integration/consumer/table-auto-jump-when-no-data.spec.js
##########
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+context('Table Auto Jump When No Data', () => {
+  const selector = {
+    username: '#username',
+    page_item: '.ant-pagination-item-2',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+    pluginCard: '.ant-card',
+    drawer: '.ant-drawer-content',
+    monacoScroll: '.monaco-scrollable-element',
+    monacoViewZones: '.view-zones',
+    disabledSwitcher: '#disable',
+    popoper: '.ant-popover',
+    popoprerHiden: '.ant-popover-hidden',
+  };
+
+  const data = {
+    consumerName: 'test_consumer',
+    createConsumerSuccess: 'Create Consumer Successfully',
+    deleteConsumerSuccess: 'Delete Consumer Successfully',
+  };
+
+  beforeEach(() => {
+    cy.login();
+    Array.from({ length: 11 }).forEach((value, key) => {
+      const payload = {
+        username: data.consumerName + key,
+        plugins: {
+          'key-auth': {
+            key: 'test',
+            disable: false,
+          },
+        },
+      };
+      cy.requestWithToken({ method: 'PUT', payload, url: '/apisix/admin/consumers' });
+    });
+  });
+
+  it('should delete last data and jump to first page', () => {
+    cy.visit('/');
+    cy.contains('Consumer').click();
+    cy.get(selector.page_item).click();
+    cy.wait(1000);
+    cy.contains('Delete').click({ force: true });

Review comment:
       the `force: true` will not ensure that the click on delete will be successful, so why use force here?

##########
File path: web/cypress/integration/consumer/table-auto-jump-when-no-data.spec.js
##########
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+context('Table Auto Jump When No Data', () => {
+  const selector = {
+    username: '#username',
+    page_item: '.ant-pagination-item-2',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+    pluginCard: '.ant-card',
+    drawer: '.ant-drawer-content',
+    monacoScroll: '.monaco-scrollable-element',
+    monacoViewZones: '.view-zones',
+    disabledSwitcher: '#disable',
+    popoper: '.ant-popover',
+    popoprerHiden: '.ant-popover-hidden',
+  };
+
+  const data = {
+    consumerName: 'test_consumer',
+    createConsumerSuccess: 'Create Consumer Successfully',
+    deleteConsumerSuccess: 'Delete Consumer Successfully',
+  };
+
+  beforeEach(() => {
+    cy.login();
+    Array.from({ length: 11 }).forEach((value, key) => {
+      const payload = {
+        username: data.consumerName + key,
+        plugins: {
+          'key-auth': {
+            key: 'test',
+            disable: false,
+          },
+        },
+      };
+      cy.requestWithToken({ method: 'PUT', payload, url: '/apisix/admin/consumers' });
+    });
+  });
+
+  it('should delete last data and jump to first page', () => {
+    cy.visit('/');
+    cy.contains('Consumer').click();
+    cy.get(selector.page_item).click();
+    cy.wait(1000);

Review comment:
       Why wait for 1 s?

##########
File path: web/cypress/integration/proto/table-auto-jump-when-no-data.spec.js
##########
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+context('Batch Create Proto And Delete Proto', () => {
+  const selector = {
+    id: '#id',
+    content: '.view-lines',
+    page_item: '.ant-pagination-item-2',
+    draw: '.ant-drawer-content',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+  };
+
+  const data = {
+    createProtoSuccess: 'Create proto Successfully',
+    deleteProtoSuccess: 'Delete proto Successfully',
+  };
+
+  beforeEach(() => {
+    cy.login();
+    Array.from({ length: 11 }).forEach(async (value, key) => {
+      const payload = {
+        content: 'test',
+        desc: '',
+        id: `protoId${key}`,
+      };
+      cy.requestWithToken({ method: 'POST', payload, url: '/apisix/admin/proto' });
+    });
+  });

Review comment:
       Note that using an array loop in `beforeEach` will cause the loop to be run once for each test case run

##########
File path: web/cypress/integration/proto/table-auto-jump-when-no-data.spec.js
##########
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+context('Batch Create Proto And Delete Proto', () => {
+  const selector = {
+    id: '#id',
+    content: '.view-lines',
+    page_item: '.ant-pagination-item-2',
+    draw: '.ant-drawer-content',
+    deleteAlert: '.ant-modal-body',
+    notificationCloseIcon: '.ant-notification-close-icon',
+    notification: '.ant-notification-notice-message',
+    table_row: '.ant-table-row',
+  };
+
+  const data = {
+    createProtoSuccess: 'Create proto Successfully',
+    deleteProtoSuccess: 'Delete proto Successfully',
+  };
+
+  beforeEach(() => {
+    cy.login();
+    Array.from({ length: 11 }).forEach(async (value, key) => {
+      const payload = {
+        content: 'test',
+        desc: '',
+        id: `protoId${key}`,
+      };
+      cy.requestWithToken({ method: 'POST', payload, url: '/apisix/admin/proto' });
+    });
+  });
+
+  it('should delete last data and jump to first page', () => {
+    cy.visit('/');
+    cy.contains('Protocol Buffers').click();
+    cy.get(selector.page_item).click();
+    cy.wait(1000);

Review comment:
       ditto




-- 
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] Baoyuantop commented on pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#issuecomment-1068684932


   The structure of the test needs to be more rationalized.


-- 
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] oil-oil commented on pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
oil-oil commented on pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#issuecomment-1066433219


   I will modify the simulation operation to send a request to ensure the stability of the test.


-- 
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] Baoyuantop commented on a change in pull request #2370: feat: add page reload judgment

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on a change in pull request #2370:
URL: https://github.com/apache/apisix-dashboard/pull/2370#discussion_r823256287



##########
File path: web/src/pages/Consumer/List.tsx
##########
@@ -92,7 +92,7 @@ const Page: React.FC = () => {
                   })} ${formatMessage({ id: 'component.status.success' })}`,
                 });
                 /* eslint-disable no-unused-expressions */

Review comment:
       this line can remove now?




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