ZupIT/beagle-web-components

feat: refactor Cypress tests

Opened this issue · 0 comments

The project located at automated-tests/common/ needs some refactoring such as:

  • reduce code repetition
  • remove generic operations from specific classes, so these operations could be used globally, avoiding code repetition
  • remove explicit sleep methods (ex cy.wait), using fluent wait approaches
  • remove PageObjects and elements file that could be substituted by the already mentioned refactorings
  • add an element validation at the init() method of class BeaglePage to enforce the page is really loaded. To achieve this, consider an abstract method that would be called inside init(). The subclasses would have to implement this abstract method with the elements of the corresponding page

The first draft of the refactoring was described here: https://github.com/ZupIT/beagle-web-components/blob/85366ae4cbd83598a749d9184e04c0a7442e9775/automated-tests/common/cypress/support/steps/generic-step.ts