Wykres commitów

5 Commity (hotfixes)

Autor SHA1 Wiadomość Data
alex 03e57b01a8
Add sleep fn (#4454)
There are a bunch of places we do something like `await new
Promise(resolve => setTimeout(resolve, 1000))`. Most of the time, these
places have to come with an eslint disable. We have a rule enforcing
that timers come from `editor.timers`, but in those cases this won't do
what you would expect: when the editor is disposed, those timers will
never resolve, which isn't really what you want if you're using the
timers for control-flow around more expensive resources that need to be
disposed of.

For example:
```tsx
const thing = createAnExpensiveResourceThatNeedsToBeExplicitlyDestroyed()
try {
    await doSomethingWithIt(thing)
    await new Promise(r => editor.timers.setTimeout(r, 100))
} finally {
    thing.dispose()
}
```

In this example, if the editor is disposed, then the `setTimeout`
callback is never called, and the promise never resolves. The code in
the finally block never runs, and the memory for `thing` leaks.

### Change type

- [x] `other`

### Release notes

(internal-only change)
2024-09-09 10:24:34 +00:00
Mime Čuvalo aba77fd089
test: disable camera pinch test for now, too flaky (#3854)
this didn't work https://github.com/tldraw/tldraw/pull/3829
disabling this test for now

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [x] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [x] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know
2024-05-31 09:10:04 +00:00
Mime Čuvalo b56433aa79
tests: fix camera scroll flakiness (#3829)
There's been some flakiness on the camera e2e tests. I _think_ this
would help resolve it, theory being that it's not finished scrolling
when we take the reading.

example failure:
https://github.com/tldraw/tldraw/actions/runs/9222574205/job/25373998190?pr=3827

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [x] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [x] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know
2024-05-30 12:59:51 +00:00
Taha e559a7cdbb
E2E camera tests (#3747)
This PR adds E2E tests for panning and zooming using touch gestures and
zooming using the scrollwheel input.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [x] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [x] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Adds E2E tests for the camera
2024-05-19 01:02:06 +00:00
Steve Ruiz e3cf05f408
Add playwright tests (#1484)
This PR replaces our webdriver end to end tests with playwright tests.

It:
- replaces our webdriver workflow with a new e2e workflow based on
playwright
- removes the webdriver project
- adds e2e tests to our examples app
- replaces all `data-wd` attributes with `data-testid`

### Coverage

Most of the tests from our previous e2e tests are reproduced here,
though there are some related to our gestures that will need to be done
in a different way—or not at all. I've also added a handful of new
tests, too.

### Where are they

The tests are now part of our examples app rather than being in its own
different app. This should help us test our different examples too. As
far as I can tell there are no downsides here in terms of the regular
developer experience, though they might complicate any CodeSandbox
projects that are hooked into the examples app.

### Change Type

- [x] `tests` — Changes to any testing-related code only (will not
publish a new version)
2023-05-30 15:28:56 +01:00