openedx / cypress-e2e-tests

Cypress E2E Tests for Open edX applications
GNU Affero General Public License v3.0
15 stars 25 forks source link

fix: mitigated usage of this keyword to cypress best practices #89

Closed ansabgillani closed 2 years ago

ansabgillani commented 2 years ago

As per investigations in the usage of cypress as an e2e test, it was found that a majority of the current test code was. using this keyword to create variables, which, according to cypress's documentation, was not the best practice. A follow-up ticket was created to mitigate the use of the this keyword according to cypress's best practices. Here, I have addressed the following issues:

  1. Mitigate the use of the this keyword in the cypress test.
  2. Improving code quality, including indentations, etc. using JS standards.

PROD-2529

For reference, the best practices for cypress variables and aliases can be accessed here.

ansabgillani commented 2 years ago

Seems fine to me. But just a question here, should not this include other parts of repository like helper methods and stuff. Also, there are some test files under authn_mfe folder. Just confirming with you?

@aghaawais01 All other tests/files were checked and verified except the one test mentioned on top. All other tests were fine in regards of the scope of this keyword.