You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/04/07 17:01:31 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new pull request #5720: Convert Traffic Portal integration tests data to be type-safe

ocket8888 opened a new pull request #5720:
URL: https://github.com/apache/trafficcontrol/pull/5720


   ## What does this PR (Pull Request) do?
   - [x] This PR is not related to any Issue
   
   This PR, fundamentally, adds the `noImplicitAny` Typescript compiler option, and makes the code compliant with that. What that entails is mostly rewriting all of the JSON test data as Typescript. With the exception of a few case changes and collapsing directories into files per tested object, there should be no structural changes to the testing data.
   
   There were also some untyped function parameters (which default to an implicit `any`) that necessitated adding interface types to page objects, and occasionally some of these required logic changes to handle strict `null` and `undefined` checking.
   
   Also, two of the dependencies imported were untyped and do not have `@types` type definitions, so `.d.ts` files declaring their typing were added. Specifically:
   
   * `random-ipv6` - This library is relatively small, and the typing provided is expected to be complete.
   * `protractor-beautiful-reporter` - This library is massive, and the typing provided is only enough to cover current usage. If currently unused options are added the typing definition *will* need to be updated.
   
   Finally, this PR replaces usages of the `jasmine-data-provider` module with a simple loop over array contents, which not only provides type safety (as `jasmine-data-provider` is untyped) but eliminates the need for that dependency, which has therefore been removed from the package files.
   
   ## Which Traffic Control components are affected by this PR?
   - Traffic Portal - tests
   
   ## What is the best way to verify this PR?
   Ensure the integration tests compile and pass, and that no test cases have become unused or have been removed.
   
   ## The following criteria are ALL met by this PR
   - [x] This PR includes tests
   - [x] Documentation is unnecessary
   - [x] An update to CHANGELOG.md is not necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


-- 
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] [trafficcontrol] dpham692 commented on pull request #5720: Convert Traffic Portal integration tests data to be type-safe

Posted by GitBox <gi...@apache.org>.
dpham692 commented on pull request #5720:
URL: https://github.com/apache/trafficcontrol/pull/5720#issuecomment-818892258


   Test pass. This PR also fix the webdriver problem. More abstract for the config file.  Save time by just run the npm test so user doesn't have to type down tsc command down and just run the test.
   Everything work fine for me.


-- 
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] [trafficcontrol] rawlinp merged pull request #5720: Convert Traffic Portal integration tests data to be type-safe

Posted by GitBox <gi...@apache.org>.
rawlinp merged pull request #5720:
URL: https://github.com/apache/trafficcontrol/pull/5720


   


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