-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix DB persistence issue - we need to store an initial document state…
… update when there's nothing in the DB - Add test for crdt text sync in a new browser session without indexedDB state
- Loading branch information
1 parent
7a28055
commit f2da3e4
Showing
8 changed files
with
125 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
import { Page, selectors } from "@playwright/test" | ||
import { Browser, Page, selectors } from "@playwright/test" | ||
import { BoardPage } from "./BoardPage" | ||
|
||
export async function navigateToDashboard(page: Page) { | ||
export async function navigateToDashboard(page: Page, browser: Browser) { | ||
selectors.setTestIdAttribute("data-test") | ||
await page.goto("http://localhost:1337") | ||
return DashboardPage(page) | ||
return DashboardPage(page, browser) | ||
} | ||
|
||
export function DashboardPage(page: Page) { | ||
export function DashboardPage(page: Page, browser: Browser) { | ||
return { | ||
async createNewBoard(name: string) { | ||
await page.getByPlaceholder("Enter board name").fill(name) | ||
await page.getByText("use collaborative text editor").click() | ||
await page.getByRole("button", { name: "Create" }).click() | ||
const board = BoardPage(page) | ||
const board = BoardPage(page, browser) | ||
await board.assertBoardName(name) | ||
return board | ||
}, | ||
async goToBoard(name: string) { | ||
await page.locator(".recent-boards li").filter({ hasText: name }).first().click() | ||
return BoardPage(page) | ||
return BoardPage(page, browser) | ||
}, | ||
async goToTutorialBoard() { | ||
await page.getByText("Tutorial Board").click() | ||
return BoardPage(page) | ||
return BoardPage(page, browser) | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.