createPostDraft = async (page, {title = 'Hello world', body = 'This is my post body.'} = {}) => {
    await page.locator('.gh-nav a[href="#/posts/"]').click();

    // Create a new post
    await page.locator('[data-test-new-post-button]').click();

    // Fill in the post title
    await page.locator('[data-test-editor-title-input]').click();
    await page.locator('[data-test-editor-title-input]').fill(title);

    // wait for editor to be ready
    await expect(page.locator('[data-lexical-editor="true"]').first()).toBeVisible();

    // Continue to the body by pressing enter
    await page.keyboard.press('Enter');

    const postStatus = await page.locator('[data-test-editor-post-status]');
    await expect(postStatus).toHaveText('Draft - Saved');
    await page.keyboard.type(body);
}
Start a post draft with a filled in title and body.
@param {import('@playwright/test').Page} page
@param {Object} options
@param {String} [options.title]
@param {String} [options.body]