Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcho committed Nov 14, 2024
1 parent 5254727 commit d2a9078
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
command: npx playwright install --with-deps
- run:
name: Run Playwright snapshot tests # refer to https://circleci.com/docs/collect-test-data/#playwright
command: PLAYWRIGHT_JUNIT_OUTPUT_NAME=results.xml yarn playwright test --reporter=junit
command: PLAYWRIGHT_JUNIT_OUTPUT_NAME=results.xml yarn playwright test --config=playwright.config.ts
- store_test_results:
path: results.xml
- store_artifacts:
Expand Down
4 changes: 2 additions & 2 deletions __visual_tests__/workflow-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test('101', async ({ page, browserName }) => {
test('102', async ({ page, browserName }) => {
await loadWidget(page);
// 1
await sendTextMessage(page, 'Give me a travel agency poster', 5000);
await sendTextMessage(page, 'Give me a travel agency poster', 100);
await assertScreenshot(page, '102-1', browserName);
});

Expand Down Expand Up @@ -110,7 +110,7 @@ test('103', async ({ page, browserName }) => {
// 4
options = page.locator(WidgetComponentIds.SUGGESTED_REPLIES_OPTIONS);
await options.nth(1).click();
await page.waitForTimeout(4000); // Time takes long for file message to be rendered and then scrolled to bottom in CI browsers.
await page.waitForTimeout(100); // Time takes long for file message to be rendered and then scrolled to bottom in CI browsers.
await assertScreenshot(page, '103-4', browserName);

// 5
Expand Down
5 changes: 4 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: undefined, // process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [['junit', { outputFile: 'results.xml' }]],
reporter: [
['junit', { outputFile: 'results.xml' }],
['html', { open: 'never', outputFolder: 'test-results' }]
],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand Down

0 comments on commit d2a9078

Please sign in to comment.