Cypress

cy.visit(url);
cy.get(selector)
  .click({ force: true });
  .contains(string);

Times

Cypress.Commands.add('times', (n, callback) => {
  for (let i = 0; i < n; i += 1) {
    callback();
  }
});

Reliability

Force click

Cypress.Commands.add('forceClick', { prevSubject: true }, $subject => {
  cy.wrap($subject).click({ force: true });
});

Waiting for loading to complete

Controlling time

Cypress.Commands.add('setCurrentTime', currentTime => {
  cy.window().then($window => {
    if (!$window.cfaWebOrdering) {
      $window.cfaWebOrdering = {};
    }
    $window.cfaWebOrdering.currentTime = currentTime;
  });
});

Uploading screenshots/recordings to GitHub Actions

- uses: actions/upload-artifact@v1
  if: failure()
  with:
    name: cypress-screenshots
    path: cypress/screenshots
- uses: actions/upload-artifact@v1
  if: always()
  with:
    name: cypress-videos
    path: cypress/videos