Skip to content

Commit

Permalink
fix: cypress test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothpandian committed Jun 12, 2022
1 parent e58db54 commit d51a42b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '@testing-library/cypress/add-commands';

Cypress.Commands.add('getCanvas', function () {
return cy.findByRole('presentation', { name: /react\-sketch\-canvas/i });
return cy.findByRole('presentation');
});

Cypress.Commands.add(
Expand All @@ -12,7 +12,7 @@ Cypress.Commands.add(
originY: number = 0,
pointerType: Cypress.PointerEventType = 'pen'
) {
cy.findByRole('presentation', { name: /react\-sketch\-canvas/i }).then(
cy.findByRole('presentation').then(
($canvas) => {
const x = $canvas.offset().left + originX;
const y = $canvas.offset().top + originY;
Expand Down Expand Up @@ -70,7 +70,7 @@ Cypress.Commands.add(
originY: number = 0,
pointerType: Cypress.PointerEventType = 'pen'
) {
cy.findByRole('presentation', { name: /react\-sketch\-canvas/i }).then(
cy.findByRole('presentation').then(
($canvas) => {
const x = $canvas.offset().left + originX;
const y = $canvas.offset().top + originY;
Expand Down Expand Up @@ -107,7 +107,7 @@ Cypress.Commands.add(
originY: number = 0,
pointerType: Cypress.PointerEventType = 'pen'
) {
cy.findByRole('presentation', { name: /react\-sketch\-canvas/i }).then(
cy.findByRole('presentation').then(
($canvas) => {
const x = $canvas.offset().left + originX;
const y = $canvas.offset().top + originY;
Expand Down

0 comments on commit d51a42b

Please sign in to comment.