feat(app): sheet draft editor route, modes, recovery offer and conflict dialog
This commit is contained in:
1 parent
b14509f221
commit
6aba9711f0
44 files changed
+3143
-13
No files matched your search
@@ -41,6 +41,8 @@ function mount(path = '/app') {
|
||||
<Route path="/app" element={<AppLayout />}>
|
||||
<Route index element={<p>dashboard page</p>} />
|
||||
<Route path="account" element={<p>account page</p>} />
|
||||
<Route path="admin/sheets/:sheetId/draft" element={<p>draft page</p>} />
|
||||
<Route path="admin/sheets/:sheetId" element={<p>overview page</p>} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</MemoryRouter>,
|
||||
@@ -58,6 +60,18 @@ describe('AppLayout', () => {
|
||||
expect(screen.getByText('dashboard page')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('gives the draft editor the whole width, every other page the 4xl column', () => {
|
||||
const column = (path: string) => {
|
||||
const view = mount(path)
|
||||
const wrapper = screen.getByText(/page$/).parentElement
|
||||
view.unmount()
|
||||
return wrapper
|
||||
}
|
||||
expect(column('/app/admin/sheets/s-1/draft')).not.toHaveClass('max-w-4xl')
|
||||
expect(column('/app/admin/sheets/s-1')).toHaveClass('max-w-4xl')
|
||||
expect(column('/app')).toHaveClass('max-w-4xl')
|
||||
})
|
||||
|
||||
it('links the top-bar avatar and name to the account page', async () => {
|
||||
const user = userEvent.setup()
|
||||
mount()
|
||||
|
||||
Reference in new issue
Block a user