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 2020/10/29 16:53:09 UTC

[GitHub] [apisix-dashboard] liuxiran edited a comment on pull request #619: feat: added e2e test for Login page

liuxiran edited a comment on pull request #619:
URL: https://github.com/apache/apisix-dashboard/pull/619#issuecomment-718883982


   just a proposal:define the dom selectors and test datas separately as variables, It may be better to maintain  later.
   
   A test case for a page contains three parts, domselectors, test datas, and test steps.
   * The domselectors maybe changed as the layout of the page changed or UI frame changed;
   * Test datas are also likely to change when data source changed;
   * The test steps are relatively stable
   
   e.g:
   ```javascript
   const domSelectors = {
       inputUserName: '#control-ref_username',
       inputPassWord: '#control-ref_password',
       buttonLogin: '.ant-btn-lg',
       notificationLogin: '.ant-notification-notice-description',
       ...
   };
   const loginFailedDatas = {
       userName: 'admin',
       passWord: '123456'
   };
   const loginSuccessDatas = {
      userName: 'admin',
      passWord: 'admin'
   };
   ```
   
   


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