2dbfda1285
Adds webdriver tests for testing from a users perspective via browser actions. We currently support local test runners for a bunch of actions on desktop `chrome`/`firefox`/`edge`/`safari` on macos. We also have a browserstack runner which we'll enable in another PR. ### Release Note - Adds initial webdriver tests
27 lines
714 B
TypeScript
27 lines
714 B
TypeScript
import { DefaultErrorFallback, ErrorBoundary } from '@tldraw/tldraw'
|
|
import { StrictMode } from 'react'
|
|
import { createRoot } from 'react-dom/client'
|
|
import { RouterProvider, createBrowserRouter } from 'react-router-dom'
|
|
import ExampleBasic from './1-basic/BasicExampleWebdriver'
|
|
import './index.css'
|
|
|
|
const router = createBrowserRouter([
|
|
{
|
|
path: '/',
|
|
element: <ExampleBasic />,
|
|
},
|
|
])
|
|
|
|
const rootElement = document.getElementById('root')
|
|
const root = createRoot(rootElement!)
|
|
|
|
root.render(
|
|
<StrictMode>
|
|
<ErrorBoundary
|
|
fallback={(error) => <DefaultErrorFallback error={error} />}
|
|
onError={(error) => console.error(error)}
|
|
>
|
|
<RouterProvider router={router} />
|
|
</ErrorBoundary>
|
|
</StrictMode>
|
|
)
|