Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

you can move lines in a fresh sketch from Start Sketch and it updates the code (more than once) #1112

Closed
Tracked by #983 ...
Irev-Dev opened this issue Nov 22, 2023 · 1 comment
Assignees
Labels
dev Issues related to development of the app. e2e tests Pull requests that update or improve our test suite

Comments

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented Nov 22, 2023

I would probably resolve this issue and the task you can move lines in edit sketch and it updates the code (more than once) also in #833 in the same test, but could also be separate,

Read through the playwright section of the readme to cover the basics.

The start of the test should probably look like:

test('Basic sketch', async ({ page }) => {
  const u = getUtils(page)
  page.setViewportSize({ width: 1200, height: 500 })
  await page.goto('localhost:3000')
  await u.waitForAuthSkipAppStart()
  await u.waitForDefaultPlanesVisibilityChange()
  // ...
})

This one is probably challenging because it involves interacting with the stream quiet a bit, but you can probably draw a fair bit of inspiration from Basic sketch in e2e/playwright/flow-tests.spec.ts because it also interacts with the stream.

But also here's a snippet from change camera, show planes in e2e/playwright/snapshot-tests.spec.ts

  await u.closeDebugPanel()
  await page.mouse.move(700, 200)
  await page.mouse.down({ button: 'right' })
  await page.mouse.move(600, 300)
  await page.mouse.up({ button: 'right' })

  await u.openDebugPanel()
  await u.waitForCmdReceive('camera_drag_end')

Which might be useful since it's a click and drag event which you'll have to do for move, though I think camera_drag_end is likely to be different (it is I've since checked 👇).

Screenshare.-.2023-11-22.6_43_10.PM.mp4
@Irev-Dev Irev-Dev added the e2e label Nov 22, 2023
@jessfraz jessfraz added dev Issues related to development of the app. tests Pull requests that update or improve our test suite labels May 21, 2024
@jessfraz
Copy link
Contributor

im pretty sure we've covered this by now we have lots of similar tests ive seen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Issues related to development of the app. e2e tests Pull requests that update or improve our test suite
Projects
None yet
Development

No branches or pull requests

3 participants