liuxiran commented on pull request #2066:
URL: https://github.com/apache/apisix-dashboard/pull/2066#issuecomment-914921370


   Thanks for your feedback @TkClark , then let's turn to the test cases. 
[Here](https://github.com/apache/apisix-dashboard/blob/master/docs/en/latest/front-end-e2e.md)
 is our fe e2e test develop guide, hope this can help you to write and debug 
your test cases.
   
   Actually your pr contains two part of things:
   
   ### feat: supports search by name for service options when add router
   you can choose to start a new test file to add your test cases for this 
feature.
   1. create a service, you can refer this one: 
https://github.com/apache/apisix-dashboard/blob/98fe38abba1deb186a65801fc68a2e7512fb3629/web/cypress/integration/service/create-edit-delete-service.spec.js#L60
   2. create a route, you can refer this one: 
https://github.com/apache/apisix-dashboard/blob/98fe38abba1deb186a65801fc68a2e7512fb3629/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js#L88
   during create a route, you can add some test code to cover you feature:
   file in the `service` field(part of your created service name), to check if 
there is a service item listed. 
   
   ### fix: would not set  `priority` when create route
   you can add some test codes to  this file: 
https://github.com/apache/apisix-dashboard/blob/master/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js
   
   1. when create a route in 
https://github.com/apache/apisix-dashboard/blob/98fe38abba1deb186a65801fc68a2e7512fb3629/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js#L102
   try to file in the `priority` field together with other fields.
   2. when view a route in 
https://github.com/apache/apisix-dashboard/blob/98fe38abba1deb186a65801fc68a2e7512fb3629/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js#L210
   try to check if the `priority` field existed
   3. when edit a route in 
https://github.com/apache/apisix-dashboard/blob/98fe38abba1deb186a65801fc68a2e7512fb3629/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js#L230
   try to check if the `priority` has the right value, you can refer this one 
`cy.get({priority}).should('have.value', xxxx)`


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to