Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion demo/scripts/playwright-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,14 @@ fi

if [[ "$1" = "update" ]]; then
echo "Running playwright tests (update)"
EXTRA_ARGS=""
if [[ $# -ge 2 ]]; then
for arg in "${@:2}"; do
EXTRA_ARGS="$EXTRA_ARGS $(printf '%q' "$arg")"
done
fi
run_command 'COREPACK_INTEGRITY_KEYS=0 corepack pnpm --filter '@gravity-ui/*' build'
run_command 'COREPACK_INTEGRITY_KEYS=0 corepack pnpm --filter '@markdown-editor/demo' run playwright:update'
run_command "cd demo && COREPACK_INTEGRITY_KEYS=0 corepack pnpm exec playwright test --config=tests/playwright/playwright.config.ts -u $EXTRA_ARGS"
exit 0
fi

Expand Down
2 changes: 1 addition & 1 deletion demo/src/stories/markdown/Markdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const PunctuationBoundaries: StoryObj<typeof component> = {
initial: markup.punctuationBoundaries,
initialEditor: 'markup',
initialSplitModeEnabled: true,
splitModeOrientation: 'horizontal',
splitModeOrientation: 'vertical',
},
};

Expand Down
1 change: 1 addition & 0 deletions demo/tests/playwright/core/mount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const mount: PlaywrightFixture<MountFixture> = async ({mount: baseMount},
`}
</style>
)}
{options?.styles && <style>{options.styles}</style>}
{component}
</div>,
options,
Expand Down
1 change: 1 addition & 0 deletions demo/tests/playwright/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface ComponentFixtures {
width?: number | string;
rootStyle?: React.CSSProperties;
hidePlaygroundBlocks?: boolean;
styles?: string;
},
): Promise<MountResult>;
}
Expand Down
14 changes: 4 additions & 10 deletions demo/tests/visual-tests/MarkdownExtensions.visual.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,12 @@ test.describe('Extensions, Markdown', () => {
await mount(<MarkdownStories.DefinitionList />);
await expectScreenshot();
});
test('Punctuation boundaries', async ({mount, expectScreenshot, page}) => {
await page.setViewportSize({width: 1280, height: 1400});
test('Punctuation boundaries', async ({page, mount, expectScreenshot}) => {
await mount(<MarkdownStories.PunctuationBoundaries />, {
rootStyle: {height: 'auto', width: 1200},
});
await page.addStyleTag({
content:
'.cm-editor { height: auto !important; } .cm-scroller { overflow: visible !important; }',
hidePlaygroundBlocks: true,
styles: '.cm-editor { height: auto !important; } .cm-scroller { overflow: visible !important; }',
});
await page.waitForTimeout(300);
await expectScreenshot({
component: page.locator('.playwright-wrapper-test'),
});
await expectScreenshot();
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading