Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: danigonzser <[email protected]>
  • Loading branch information
danigonzser committed Oct 30, 2024
1 parent d525b44 commit 4382c9e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions cypress/e2e/editor.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ describe('Editor E2E Testing', () => {
cy.get('.upper-canvas').trigger('mousemove', 100, 100)
cy.get('.upper-canvas').trigger('mouseup')

cy.compareSnapshot('rect', 0.1)
cy.compareSnapshot('rect', 0.5)
//cy.screenshot('rect')

const arrows = '{rightarrow}'.repeat(30)

cy.get('[style="transform: var(--radix-slider-thumb-transform); position: absolute; left: calc(2% + 9.6px);"] > .block').click().type(arrows)

cy.compareSnapshot('rect+slider', 0.1)
cy.compareSnapshot('rect+slider', 0.5)
//cy.screenshot('rect+slider')

cy.get('[data-cy="rectcolor_paint"]').click()
Expand All @@ -64,7 +64,7 @@ describe('Editor E2E Testing', () => {

cy.get('[data-cy="rectstroke_color_button"]').click()

cy.compareSnapshot('rect+slider+color', 0.1)
cy.compareSnapshot('rect+slider+color', 0.5)
//cy.screenshot('rect+slider+color')

cy.get('[data-cy="freedraw_tool"]').click()
Expand All @@ -79,7 +79,7 @@ describe('Editor E2E Testing', () => {
cy.get('.upper-canvas').trigger('mousemove', 550, 600, { force: true })
cy.get('.upper-canvas').trigger('mouseup')

cy.compareSnapshot('rect+slider+color+freedraw', 0.1)
cy.compareSnapshot('rect+slider+color+freedraw', 0.5)
//cy.screenshot('rect+slider+color+freedraw')

cy.get('[data-cy="type_tool"]').click()
Expand All @@ -101,18 +101,18 @@ describe('Editor E2E Testing', () => {
cy.get('.upper-canvas').trigger('mousemove', 750, 700, { force: true })
cy.get('.upper-canvas').trigger('mouseup')

cy.compareSnapshot('rect+slider+color+freedraw+beforeundo', 0.1)
cy.compareSnapshot('rect+slider+color+freedraw+beforeundo', 0.5)
//cy.screenshot('rect+slider+color+freedraw+beforeundo')

cy.get('[data-cy="redo_button"]').should('be.disabled')
cy.get('[data-cy="undo_button"]').click() // UNDO

cy.compareSnapshot('rect+slider+color+freedraw+aftereundo', 0.1)
cy.compareSnapshot('rect+slider+color+freedraw+aftereundo', 0.5)
//cy.screenshot('rect+slider+color+freedraw+aftereundo')

cy.get('[data-cy="redo_button"]').click() // REDO

cy.compareSnapshot('finish', 0.1)
cy.compareSnapshot('finish', 0.5)
//cy.screenshot('finish')

cy.get('.flex-none > :nth-child(1) > .hover\\:bg-primary\\/90 > .lucide').click()
Expand Down Expand Up @@ -151,7 +151,7 @@ describe('Editor E2E Testing', () => {
cy.get('.grid > :nth-child(1) > .block').click()
cy.get('a > .inline-flex > .lucide').click().wait(2000)

cy.compareSnapshot('edit', 0.1)
cy.compareSnapshot('edit', 0.5)
//cy.screenshot('edit')

cy.get('.upper-canvas').click()
Expand Down
14 changes: 7 additions & 7 deletions cypress/e2e/mobile/editor.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ describe('Editor E2E Testing', () => {
cy.get('.upper-canvas').trigger('mousemove', 1, 1)
cy.get('.upper-canvas').trigger('mouseup')

cy.compareSnapshot('rect', 0.1)
cy.compareSnapshot('rect', 0.5)
//cy.screenshot('rect')

const arrows = '{rightarrow}'.repeat(30)

cy.get('[style="transform: var(--radix-slider-thumb-transform); position: absolute; left: calc(2% + 9.6px);"] > .block').click().type(arrows)

cy.compareSnapshot('rect+slider', 0.1)
cy.compareSnapshot('rect+slider', 0.5)
//cy.screenshot('rect+slider')

cy.get('[data-cy="rectcolor_paint_mobile"]').click()
Expand All @@ -62,7 +62,7 @@ describe('Editor E2E Testing', () => {
cy.get('[data-cy="rectstroke-#FFEA00-mobile"]').click()
cy.get('[data-cy="rectstroke_color_button_mobile"]').click()

cy.compareSnapshot('rect+slider+color', 0.1)
cy.compareSnapshot('rect+slider+color', 0.5)
//cy.screenshot('rect+slider+color')

cy.get('[data-cy="freedraw_tool_mobile"]').click()
Expand All @@ -77,7 +77,7 @@ describe('Editor E2E Testing', () => {
cy.get('.upper-canvas').trigger('mousemove', 550, 600, { force: true })
cy.get('.upper-canvas').trigger('mouseup')

cy.compareSnapshot('rect+slider+color+freedraw', 0.1)
cy.compareSnapshot('rect+slider+color+freedraw', 0.5)
//cy.screenshot('rect+slider+color+freedraw')

cy.get('[data-cy="type_tool_mobile"]').click()
Expand All @@ -93,12 +93,12 @@ describe('Editor E2E Testing', () => {
cy.get('[data-cy="redo_button_mobile"]').should('be.disabled')
cy.get('[data-cy="undo_button_mobile"]').click() // UNDO

cy.compareSnapshot('rect+slider+color+freedraw+aftereundo', 0.1)
cy.compareSnapshot('rect+slider+color+freedraw+aftereundo', 0.5)
//cy.screenshot('rect+slider+color+freedraw+aftereundo')

cy.get('[data-cy="redo_button_mobile"]').click() // REDO

cy.compareSnapshot('finish', 0.1)
cy.compareSnapshot('finish', 0.5)
//cy.screenshot('finish')

cy.get('.space-x-1 > #save_as_drawer').click()
Expand Down Expand Up @@ -138,7 +138,7 @@ describe('Editor E2E Testing', () => {
cy.get('.grid > :nth-child(1) > .block').click()
cy.get('a > .inline-flex > .lucide').click().wait(2000)

cy.compareSnapshot('edit', 0.1)
cy.compareSnapshot('edit', 0.5)
//cy.screenshot('edit')

cy.get('.upper-canvas').click(200, 200)
Expand Down

0 comments on commit 4382c9e

Please sign in to comment.