Skip to content

Commit d51a42b

Browse files
committed
fix: cypress test cases
1 parent e58db54 commit d51a42b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cypress/support/commands.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import '@testing-library/cypress/add-commands';
22

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

77
Cypress.Commands.add(
@@ -12,7 +12,7 @@ Cypress.Commands.add(
1212
originY: number = 0,
1313
pointerType: Cypress.PointerEventType = 'pen'
1414
) {
15-
cy.findByRole('presentation', { name: /react\-sketch\-canvas/i }).then(
15+
cy.findByRole('presentation').then(
1616
($canvas) => {
1717
const x = $canvas.offset().left + originX;
1818
const y = $canvas.offset().top + originY;
@@ -70,7 +70,7 @@ Cypress.Commands.add(
7070
originY: number = 0,
7171
pointerType: Cypress.PointerEventType = 'pen'
7272
) {
73-
cy.findByRole('presentation', { name: /react\-sketch\-canvas/i }).then(
73+
cy.findByRole('presentation').then(
7474
($canvas) => {
7575
const x = $canvas.offset().left + originX;
7676
const y = $canvas.offset().top + originY;
@@ -107,7 +107,7 @@ Cypress.Commands.add(
107107
originY: number = 0,
108108
pointerType: Cypress.PointerEventType = 'pen'
109109
) {
110-
cy.findByRole('presentation', { name: /react\-sketch\-canvas/i }).then(
110+
cy.findByRole('presentation').then(
111111
($canvas) => {
112112
const x = $canvas.offset().left + originX;
113113
const y = $canvas.offset().top + originY;

0 commit comments

Comments
 (0)