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 2021/02/04 18:11:10 UTC

[GitHub] [apisix-dashboard] guoqqqi opened a new pull request #1432: Global files

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


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [ ] Bugfix
   - [x] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   - Related issues
   resolve #1126 
   ___
   ### New feature or improvement
   - Describe the details and related test reports.
   Add Public Selector
   ___


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #1432: test: add global files to contain selector mappers and public data

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



##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",

Review comment:
       `switcher` -> `language siwtcher`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #1432: test: add global files to contain selector mappers and public data

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



##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",

Review comment:
       `switcher` -> `languageSwitcher`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] guoqqqi commented on pull request #1432: test: add global files to contain selector mappers and public data

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


   Public data has not been updated 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.

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



[GitHub] [apisix-dashboard] codecov-io commented on pull request #1432: chore: added global files to contain test selector mappers and public data

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=h1) Report
   > Merging [#1432](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=desc) (3cfc01f) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/45777402d8320c1fda2116eb798b42e80331147a?el=desc) (4577740) will **decrease** coverage by `21.37%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1432       +/-   ##
   ===========================================
   - Coverage   68.08%   46.71%   -21.38%     
   ===========================================
     Files          47       38        -9     
     Lines        3002     2573      -429     
   ===========================================
   - Hits         2044     1202      -842     
   - Misses        720     1209      +489     
   + Partials      238      162       -76     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-70.41%)` | :arrow_down: |
   | [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `28.81% <0.00%> (-54.24%)` | :arrow_down: |
   | [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | `57.14% <0.00%> (-33.34%)` | :arrow_down: |
   | ... and [32 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=footer). Last update [4577740...bb58f3c](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] guoqqqi commented on pull request #1432: chore: added global files to contain test selector mappers and public data

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


   All right.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1432: test: add global files to contain selector mappers and public data

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






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] guoqqqi commented on a change in pull request #1432: chore: added global files to contain test selector mappers and public data

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



##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,49 +1,46 @@
 {
-  "switcher": ".ant-space-align-center",
+  "languageSwitcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
   "notificationDesc": ".ant-notification-notice-description",
 
-  "pluginsCard": ".ant-card",
+  "pluginCard": ".ant-card",
   "pageContent": ".ant-pro-page-container",
 
   "tableCell": ".ant-table-cell",
   "empty": ".ant-empty-normal",
   "refresh": ".anticon-reload",
   "codemirror": ".CodeMirror",
-  "switch": "#disable",
-  "deleteBtn": ".ant-btn-dangerous",
+  "disabledSwitcher": "#disable",
+  "deleteButton": ".ant-btn-dangerous",
 
   "name": "#name",
   "nodes_0_host": "#nodes_0_host",
   "upstream_id": "#upstream_id",
   "input": ":input",
-  "custom_upstream": "[title=Custom]",
-  "title_name": "[title=Name]",
-  "test_service": "[title=test_service]",
+  "nameSelector": "[title=Name]",
+  "serviceSelector": "[title=test_service]",
 
   "description": "#desc",
-  "search_name": "[title=Name]",
-  "upstream_selector": "[data-cy=upstream_selector]",
+  "upstreamSelector": "[data-cy=upstream_selector]",
 
-  "file": "[type=file]",
+  "fileSelector": "[type=file]",
   "fileTypeRadio": "[type=radio]",
 
-  "uriInput": "#debugUri",
+  "debugUri": "#debugUri",

Review comment:
       ![image](https://user-images.githubusercontent.com/72343596/106999419-1f839c00-67c1-11eb-8b77-16efe907d5f7.png)
   ...emm, or just ues `uriInput`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] LiteSun commented on a change in pull request #1432: chore: added global files to contain test selector mappers and public data

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



##########
File path: web/cypress/integration/metrics/metrics-smoketest.spec.js
##########
@@ -17,20 +17,17 @@
 /* eslint-disable no-undef */
 
 context('metrics page smoke test', () => {
-  const domSelectors = {
-    pageContent: '.ant-pro-page-container',
-  };
-
   beforeEach(() => {
     cy.login();
+
+    cy.fixture('selector.json').as('domSelector');
   });
 
-  it('visit metrics page', () => {
-    // go to metrics page
+  it('visit metrics page', function () {

Review comment:
       ```suggestion
     it('should visit metrics page', function () {
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1432: test: add global files to contain selector mappers and public data

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


   Hi @liuxiran, how about putting public(repeated) selectors/data to `fixtures` and others to every test case file? 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] juzhiyuan merged pull request #1432: chore: added global files to contain test selector mappers and public data

Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #1432:
URL: https://github.com/apache/apisix-dashboard/pull/1432


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] codecov-io commented on pull request #1432: chore: added global files to contain test selector mappers and public data

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=h1) Report
   > Merging [#1432](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=desc) (3cfc01f) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/45777402d8320c1fda2116eb798b42e80331147a?el=desc) (4577740) will **decrease** coverage by `21.37%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #1432       +/-   ##
   ===========================================
   - Coverage   68.08%   46.71%   -21.38%     
   ===========================================
     Files          47       38        -9     
     Lines        3002     2573      -429     
   ===========================================
   - Hits         2044     1202      -842     
   - Misses        720     1209      +489     
   + Partials      238      162       -76     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=) | `0.00% <0.00%> (-70.41%)` | :arrow_down: |
   | [api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `28.81% <0.00%> (-54.24%)` | :arrow_down: |
   | [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv) | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | [api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=) | `57.14% <0.00%> (-33.34%)` | :arrow_down: |
   | ... and [32 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1432/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=footer). Last update [4577740...bb58f3c](https://codecov.io/gh/apache/apisix-dashboard/pull/1432?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] LiteSun commented on a change in pull request #1432: chore: added global files to contain test selector mappers and public data

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



##########
File path: web/cypress/integration/metrics/metrics-smoketest.spec.js
##########
@@ -17,20 +17,17 @@
 /* eslint-disable no-undef */
 
 context('metrics page smoke test', () => {
-  const domSelectors = {
-    pageContent: '.ant-pro-page-container',
-  };
-
   beforeEach(() => {
     cy.login();
+
+    cy.fixture('selector.json').as('domSelector');
   });
 
-  it('visit metrics page', () => {
-    // go to metrics page
+  it('visit metrics page', function () {

Review comment:
       ```suggestion
     it('should visit metrics page', function () {
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] LiteSun commented on pull request #1432: chore: added global files to contain test selector mappers and public data

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


   This PR looks good to me, but I have a question to confirm, if a selector is not public, should we extract a variable in that case? @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.

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



[GitHub] [apisix-dashboard] juzhiyuan merged pull request #1432: chore: added global files to contain test selector mappers and public data

Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #1432:
URL: https://github.com/apache/apisix-dashboard/pull/1432


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1432: chore: added global files to contain test selector mappers and public data

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



##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,49 +1,46 @@
 {
-  "switcher": ".ant-space-align-center",
+  "languageSwitcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
   "notificationDesc": ".ant-notification-notice-description",
 
-  "pluginsCard": ".ant-card",
+  "pluginCard": ".ant-card",
   "pageContent": ".ant-pro-page-container",
 
   "tableCell": ".ant-table-cell",
   "empty": ".ant-empty-normal",
   "refresh": ".anticon-reload",
   "codemirror": ".CodeMirror",
-  "switch": "#disable",
-  "deleteBtn": ".ant-btn-dangerous",
+  "disabledSwitcher": "#disable",
+  "deleteButton": ".ant-btn-dangerous",
 
   "name": "#name",
   "nodes_0_host": "#nodes_0_host",
   "upstream_id": "#upstream_id",
   "input": ":input",
-  "custom_upstream": "[title=Custom]",
-  "title_name": "[title=Name]",
-  "test_service": "[title=test_service]",
+  "nameSelector": "[title=Name]",
+  "serviceSelector": "[title=test_service]",
 
   "description": "#desc",
-  "search_name": "[title=Name]",
-  "upstream_selector": "[data-cy=upstream_selector]",
+  "upstreamSelector": "[data-cy=upstream_selector]",
 
-  "file": "[type=file]",
+  "fileSelector": "[type=file]",
   "fileTypeRadio": "[type=radio]",
 
-  "uriInput": "#debugUri",
+  "debugUri": "#debugUri",

Review comment:
       selector? input box? or something else?

##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -77,21 +77,21 @@ context('Create and Search Route', () => {
     cy.visit('/');
     cy.contains('Route').click();
     // full match
-    cy.get(this.domSelector.searchName).type(data.test1);
+    cy.get(this.domSelector.nameSelector).type(data.test1);
     cy.contains('Search').click();
     cy.contains(data.test1).siblings().should('contain', data.desc1);
     cy.contains(data.test0).should('not.exist');
     cy.contains(data.test2).should('not.exist');
     // partial match
     cy.reload();
-    cy.get(this.domSelector.searchName).type(data.test);
+    cy.get(this.domSelector.nameSelector).type(data.test);
     cy.contains('Search').click();
     cy.contains(data.test0).siblings().should('contain', data.desc0);
     cy.contains(data.test1).siblings().should('contain', data.desc1);
     cy.contains(data.test2).siblings().should('contain', data.desc2);
     // no match
     cy.reload();
-    cy.get(this.domSelector.searchName).type(data.testx);
+    cy.get(this.domSelector.nameSelector).type(data.testx);

Review comment:
       what's name selector? it seems like a `nameInput` here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] guoqqqi commented on pull request #1432: test: add global files to contain selector mappers and public data

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






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] LiteSun commented on pull request #1432: chore: added global files to contain test selector mappers and public data

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


   This PR looks good to me, but I have a question to confirm, if a selector is not public, should we extract a variable in that case? @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.

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



[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1432: chore: added global files to contain test selector mappers and public data

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



##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",

Review comment:
       Do you mean `disabledSwitcher`?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",

Review comment:
       Do you mean `upstreamSelector?`

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",

Review comment:
       Do you mean `serviceSelector`?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",

Review comment:
       ```suggestion
     "deleteButton": ".ant-btn-dangerous",
   ```

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",

Review comment:
       Do you mean `nameSelector`?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",

Review comment:
       ```suggestion
     "pluginCard": ".ant-card",
   ```

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",
+
+  "hosts_0": "#hosts_0",
+  "labels_0_labelKey": "#labels_0_labelKey",
+  "labels_0_labelValue": "#labels_0_labelValue",
+  "searchName": "[title=Name]",
+  "searchLabels": "[title=Labels]",
+
+  "pageContainer": ".ant-pro-page-container",
+  "notificationMsg": ".ant-notification-notice-message",

Review comment:
       `notificationMessage`

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",
+
+  "hosts_0": "#hosts_0",
+  "labels_0_labelKey": "#labels_0_labelKey",
+  "labels_0_labelValue": "#labels_0_labelValue",
+  "searchName": "[title=Name]",
+  "searchLabels": "[title=Labels]",
+
+  "pageContainer": ".ant-pro-page-container",
+  "notificationMsg": ".ant-notification-notice-message",
+  "setting": ".ant-space-align-center",
+  "grafanaURL": "#grafanaURL",
+  "explain": ".ant-form-item-explain",
+
+  "selectItem": ".ant-select-item-option-content"

Review comment:
       have a better name?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",

Review comment:
       should have a good name

##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -22,8 +22,9 @@ context('Create and Delete Route', () => {
   const sleepTime = 100;
 
   beforeEach(() => {
-    // init login
     cy.login();
+
+    cy.fixture('selector.json').as('domSelector');

Review comment:
       Not done?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",
+
+  "hosts_0": "#hosts_0",
+  "labels_0_labelKey": "#labels_0_labelKey",
+  "labels_0_labelValue": "#labels_0_labelValue",
+  "searchName": "[title=Name]",
+  "searchLabels": "[title=Labels]",

Review comment:
       ditto

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",
+
+  "hosts_0": "#hosts_0",
+  "labels_0_labelKey": "#labels_0_labelKey",
+  "labels_0_labelValue": "#labels_0_labelValue",
+  "searchName": "[title=Name]",
+  "searchLabels": "[title=Labels]",
+
+  "pageContainer": ".ant-pro-page-container",
+  "notificationMsg": ".ant-notification-notice-message",
+  "setting": ".ant-space-align-center",

Review comment:
       Name & Value don't have a relation IMO

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",

Review comment:
       Should be the same as other `upstreamSelector`

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",

Review comment:
       Do you mean `nameSelector`?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",
+
+  "hosts_0": "#hosts_0",
+  "labels_0_labelKey": "#labels_0_labelKey",
+  "labels_0_labelValue": "#labels_0_labelValue",
+  "searchName": "[title=Name]",

Review comment:
       ditto

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",

Review comment:
       should be more detailed

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,49 +1,46 @@
 {
-  "switcher": ".ant-space-align-center",
+  "languageSwitcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
   "notificationDesc": ".ant-notification-notice-description",
 
-  "pluginsCard": ".ant-card",
+  "pluginCard": ".ant-card",
   "pageContent": ".ant-pro-page-container",
 
   "tableCell": ".ant-table-cell",
   "empty": ".ant-empty-normal",
   "refresh": ".anticon-reload",
   "codemirror": ".CodeMirror",
-  "switch": "#disable",
-  "deleteBtn": ".ant-btn-dangerous",
+  "disabledSwitcher": "#disable",
+  "deleteButton": ".ant-btn-dangerous",
 
   "name": "#name",
   "nodes_0_host": "#nodes_0_host",
   "upstream_id": "#upstream_id",
   "input": ":input",
-  "custom_upstream": "[title=Custom]",
-  "title_name": "[title=Name]",
-  "test_service": "[title=test_service]",
+  "nameSelector": "[title=Name]",
+  "serviceSelector": "[title=test_service]",
 
   "description": "#desc",
-  "search_name": "[title=Name]",
-  "upstream_selector": "[data-cy=upstream_selector]",
+  "upstreamSelector": "[data-cy=upstream_selector]",
 
-  "file": "[type=file]",
+  "fileSelector": "[type=file]",
   "fileTypeRadio": "[type=radio]",
 
-  "uriInput": "#debugUri",
+  "debugUri": "#debugUri",

Review comment:
       selector? input box? or something else?

##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -77,21 +77,21 @@ context('Create and Search Route', () => {
     cy.visit('/');
     cy.contains('Route').click();
     // full match
-    cy.get(this.domSelector.searchName).type(data.test1);
+    cy.get(this.domSelector.nameSelector).type(data.test1);
     cy.contains('Search').click();
     cy.contains(data.test1).siblings().should('contain', data.desc1);
     cy.contains(data.test0).should('not.exist');
     cy.contains(data.test2).should('not.exist');
     // partial match
     cy.reload();
-    cy.get(this.domSelector.searchName).type(data.test);
+    cy.get(this.domSelector.nameSelector).type(data.test);
     cy.contains('Search').click();
     cy.contains(data.test0).siblings().should('contain', data.desc0);
     cy.contains(data.test1).siblings().should('contain', data.desc1);
     cy.contains(data.test2).siblings().should('contain', data.desc2);
     // no match
     cy.reload();
-    cy.get(this.domSelector.searchName).type(data.testx);
+    cy.get(this.domSelector.nameSelector).type(data.testx);

Review comment:
       what's name selector? it seems like a `nameInput` here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1432: chore: added global files to contain test selector mappers and public data

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


   don't forget to sync codes from the master branch.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] guoqqqi commented on a change in pull request #1432: chore: added global files to contain test selector mappers and public data

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



##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,49 +1,46 @@
 {
-  "switcher": ".ant-space-align-center",
+  "languageSwitcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
   "notificationDesc": ".ant-notification-notice-description",
 
-  "pluginsCard": ".ant-card",
+  "pluginCard": ".ant-card",
   "pageContent": ".ant-pro-page-container",
 
   "tableCell": ".ant-table-cell",
   "empty": ".ant-empty-normal",
   "refresh": ".anticon-reload",
   "codemirror": ".CodeMirror",
-  "switch": "#disable",
-  "deleteBtn": ".ant-btn-dangerous",
+  "disabledSwitcher": "#disable",
+  "deleteButton": ".ant-btn-dangerous",
 
   "name": "#name",
   "nodes_0_host": "#nodes_0_host",
   "upstream_id": "#upstream_id",
   "input": ":input",
-  "custom_upstream": "[title=Custom]",
-  "title_name": "[title=Name]",
-  "test_service": "[title=test_service]",
+  "nameSelector": "[title=Name]",
+  "serviceSelector": "[title=test_service]",
 
   "description": "#desc",
-  "search_name": "[title=Name]",
-  "upstream_selector": "[data-cy=upstream_selector]",
+  "upstreamSelector": "[data-cy=upstream_selector]",
 
-  "file": "[type=file]",
+  "fileSelector": "[type=file]",
   "fileTypeRadio": "[type=radio]",
 
-  "uriInput": "#debugUri",
+  "debugUri": "#debugUri",

Review comment:
       ![image](https://user-images.githubusercontent.com/72343596/106999419-1f839c00-67c1-11eb-8b77-16efe907d5f7.png)
   ...emm, or just ues `uriInput`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #1432: test: add global files to contain selector mappers and public data

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



##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",

Review comment:
       `switcher` -> `language siwtcher`

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",

Review comment:
       `switcher` -> `languageSwitcher`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1432: chore: added global files to contain test selector mappers and public data

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


   NOT: all reusable variables、selectors


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] guoqqqi commented on pull request #1432: chore: added global files to contain test selector mappers and public data

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


   > This PR looks good to me, but I have a question to confirm, if a selector is not public, should we extract a variable in that case? @guoqqqi
   
   I think we'd better put all the variables in the public file, not only to keep the formatting consistent, but we may use any of them later, what do you think?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] liuxiran commented on pull request #1432: test: add global files to contain selector mappers and public data

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






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] liuxiran commented on pull request #1432: test: add global files to contain selector mappers and public data

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


   > Hi @liuxiran, how about putting public(repeated) selectors/data to `fixtures` and others to every test case file?
   
   agree 💯 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1432: chore: added global files to contain test selector mappers and public data

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



##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",

Review comment:
       Do you mean `disabledSwitcher`?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",

Review comment:
       Do you mean `upstreamSelector?`

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",

Review comment:
       Do you mean `serviceSelector`?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",

Review comment:
       ```suggestion
     "deleteButton": ".ant-btn-dangerous",
   ```

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",

Review comment:
       Do you mean `nameSelector`?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",

Review comment:
       ```suggestion
     "pluginCard": ".ant-card",
   ```

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",
+
+  "hosts_0": "#hosts_0",
+  "labels_0_labelKey": "#labels_0_labelKey",
+  "labels_0_labelValue": "#labels_0_labelValue",
+  "searchName": "[title=Name]",
+  "searchLabels": "[title=Labels]",
+
+  "pageContainer": ".ant-pro-page-container",
+  "notificationMsg": ".ant-notification-notice-message",

Review comment:
       `notificationMessage`

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",
+
+  "hosts_0": "#hosts_0",
+  "labels_0_labelKey": "#labels_0_labelKey",
+  "labels_0_labelValue": "#labels_0_labelValue",
+  "searchName": "[title=Name]",
+  "searchLabels": "[title=Labels]",
+
+  "pageContainer": ".ant-pro-page-container",
+  "notificationMsg": ".ant-notification-notice-message",
+  "setting": ".ant-space-align-center",
+  "grafanaURL": "#grafanaURL",
+  "explain": ".ant-form-item-explain",
+
+  "selectItem": ".ant-select-item-option-content"

Review comment:
       have a better name?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",

Review comment:
       should have a good name

##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -22,8 +22,9 @@ context('Create and Delete Route', () => {
   const sleepTime = 100;
 
   beforeEach(() => {
-    // init login
     cy.login();
+
+    cy.fixture('selector.json').as('domSelector');

Review comment:
       Not done?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",
+
+  "hosts_0": "#hosts_0",
+  "labels_0_labelKey": "#labels_0_labelKey",
+  "labels_0_labelValue": "#labels_0_labelValue",
+  "searchName": "[title=Name]",
+  "searchLabels": "[title=Labels]",

Review comment:
       ditto

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",
+
+  "hosts_0": "#hosts_0",
+  "labels_0_labelKey": "#labels_0_labelKey",
+  "labels_0_labelValue": "#labels_0_labelValue",
+  "searchName": "[title=Name]",
+  "searchLabels": "[title=Labels]",
+
+  "pageContainer": ".ant-pro-page-container",
+  "notificationMsg": ".ant-notification-notice-message",
+  "setting": ".ant-space-align-center",

Review comment:
       Name & Value don't have a relation IMO

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",

Review comment:
       Should be the same as other `upstreamSelector`

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",

Review comment:
       Do you mean `nameSelector`?

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",
+  "fileTypeRadio": "[type=radio]",
+
+  "uriInput": "#debugUri",
+
+  "hosts_0": "#hosts_0",
+  "labels_0_labelKey": "#labels_0_labelKey",
+  "labels_0_labelValue": "#labels_0_labelValue",
+  "searchName": "[title=Name]",

Review comment:
       ditto

##########
File path: web/cypress/fixtures/selector.json
##########
@@ -1,7 +1,49 @@
 {
+  "switcher": ".ant-space-align-center",
   "dropdown": ".rc-virtual-list",
   "notification": ".ant-notification-notice-message",
   "drawerBody": ".ant-drawer-wrapper-body",
   "notificationCloseIcon": ".ant-notification-close-icon",
-  "notificationDesc": ".ant-notification-notice-description"
+  "notificationDesc": ".ant-notification-notice-description",
+
+  "pluginsCard": ".ant-card",
+  "pageContent": ".ant-pro-page-container",
+
+  "tableCell": ".ant-table-cell",
+  "empty": ".ant-empty-normal",
+  "refresh": ".anticon-reload",
+  "codemirror": ".CodeMirror",
+  "switch": "#disable",
+  "deleteBtn": ".ant-btn-dangerous",
+
+  "name": "#name",
+  "nodes_0_host": "#nodes_0_host",
+  "upstream_id": "#upstream_id",
+  "input": ":input",
+  "custom_upstream": "[title=Custom]",
+  "title_name": "[title=Name]",
+  "test_service": "[title=test_service]",
+
+  "description": "#desc",
+  "search_name": "[title=Name]",
+  "upstream_selector": "[data-cy=upstream_selector]",
+
+  "file": "[type=file]",

Review comment:
       should be more detailed




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



[GitHub] [apisix-dashboard] liuxiran commented on pull request #1432: test: add global files to contain selector mappers and public data

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


   It would be better to keep the selectors only for individual cases in the case files


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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