From 926bb5420a3513204c8f15fd8b79f2d86d21aecd Mon Sep 17 00:00:00 2001 From: Connor Vidlock Date: Mon, 29 Jan 2024 15:42:01 -0600 Subject: [PATCH] add playwright-report file to test skipped --- dist/index.js | 8 +- playwright-report.xml | 472 +++++++++++++++++++++++++++++++++++++++ src/report/get-report.ts | 2 +- 3 files changed, 480 insertions(+), 2 deletions(-) create mode 100644 playwright-report.xml diff --git a/dist/index.js b/dist/index.js index aac5b52..50bc832 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1688,7 +1688,13 @@ function getSuitesReport(tr, runIndex, options) { const tsNameLink = skipLink ? tsName : (0, markdown_utils_1.link)(tsName, tsAddr); const passed = s.passed > 0 ? `${s.passed}${markdown_utils_1.Icon.success}` : ''; const failed = s.failed > 0 ? `${s.failed}${markdown_utils_1.Icon.fail}` : ''; - const skipped = s.skipped > 0 ? `${s.skipped}${markdown_utils_1.Icon.skip}` : ''; + let skipped; + if (options.listSuites === 'non-skipped') { + return [tsNameLink, passed, failed, tsTime]; + } + else { + skipped = s.skipped > 0 ? `${s.skipped}${markdown_utils_1.Icon.skip}` : ''; + } return [tsNameLink, passed, failed, skipped, tsTime]; })); sections.push(suitesTable); diff --git a/playwright-report.xml b/playwright-report.xml new file mode 100644 index 0000000..5ade47c --- /dev/null +++ b/playwright-report.xml @@ -0,0 +1,472 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 12 | await this.locator.click(); + | ^ + 13 | } while (!expectedColumnSort.isVisible()); + 14 | } + 15 | } + + at TableLocator.sortColumnBy (/Users/connor.vidlock/Documents/GitHub/hudl-frontends/packages/playwright-shared/src/models/locators/table.locator.ts:12:26) + at /Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/models/actions/grid.actions.ts:30:52 + at GridActions.sortColumn (/Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/models/actions/grid.actions.ts:28:16) + at /Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/grid.spec.ts:205:27 + + Pending operations: + - locator.click at ../../packages/playwright-shared/src/models/locators/table.locator.ts:12:26 + + + attachment #1: screenshot (image/png) ────────────────────────────────────────────────────────── + playwright/test-results/tests-grid-Grid-Column-Sorting-AmFb-Column-Set-8f487-ay-correct-data-when-sorting-by-OFF-FORM-column-chrome/test-failed-1.png + ──────────────────────────────────────────────────────────────────────────────────────────────── + + attachment #2: trace (application/zip) ───────────────────────────────────────────────────────── + playwright/test-results/tests-grid-Grid-Column-Sorting-AmFb-Column-Set-8f487-ay-correct-data-when-sorting-by-OFF-FORM-column-chrome/trace.zip + Usage: + + npx playwright show-trace playwright/test-results/tests-grid-Grid-Column-Sorting-AmFb-Column-Set-8f487-ay-correct-data-when-sorting-by-OFF-FORM-column-chrome/trace.zip + + ──────────────────────────────────────────────────────────────────────────────────────────────── +]]> + + + + + + + + + + + + + + + + + + + + + + + + 17 | await this.locator.dblclick(); + | ^ + 18 | } + 19 | + 20 | async getText() { + + at TextInputLocator.doubleClick (/Users/connor.vidlock/Documents/GitHub/hudl-frontends/packages/playwright-shared/src/models/locators/base/base.locator.ts:17:24) + at /Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/models/actions/grid.actions.ts:48:63 + at GridActions.doubleClickIntoGridColumn (/Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/models/actions/grid.actions.ts:47:16) + at /Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/grid.spec.ts:256:25 + + Pending operations: + - locator.dblclick at ../../packages/playwright-shared/src/models/locators/base/base.locator.ts:17:24 + + + attachment #1: screenshot (image/png) ────────────────────────────────────────────────────────── + playwright/test-results/tests-grid-Grid-Data-Entry-should-open-select-dropdown-options-when-pressing-Spacebar-in-grid-cell-chrome/test-failed-1.png + ──────────────────────────────────────────────────────────────────────────────────────────────── + + attachment #2: trace (application/zip) ───────────────────────────────────────────────────────── + playwright/test-results/tests-grid-Grid-Data-Entry-should-open-select-dropdown-options-when-pressing-Spacebar-in-grid-cell-chrome/trace.zip + Usage: + + npx playwright show-trace playwright/test-results/tests-grid-Grid-Data-Entry-should-open-select-dropdown-options-when-pressing-Spacebar-in-grid-cell-chrome/trace.zip + + ──────────────────────────────────────────────────────────────────────────────────────────────── +]]> + + + + + + + + 17 | await this.locator.dblclick(); + | ^ + 18 | } + 19 | + 20 | async getText() { + + at TextInputLocator.doubleClick (/Users/connor.vidlock/Documents/GitHub/hudl-frontends/packages/playwright-shared/src/models/locators/base/base.locator.ts:17:24) + at /Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/models/actions/grid.actions.ts:48:63 + at GridActions.doubleClickIntoGridColumn (/Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/models/actions/grid.actions.ts:47:16) + at /Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/grid.spec.ts:263:25 + + Pending operations: + - locator.dblclick at ../../packages/playwright-shared/src/models/locators/base/base.locator.ts:17:24 + + + attachment #1: screenshot (image/png) ────────────────────────────────────────────────────────── + playwright/test-results/tests-grid-Grid-Data-Entry-should-be-able-to-use-keyboard-to-navigate-horizontal-grid-and-enter-data-chrome/test-failed-1.png + ──────────────────────────────────────────────────────────────────────────────────────────────── + + attachment #2: trace (application/zip) ───────────────────────────────────────────────────────── + playwright/test-results/tests-grid-Grid-Data-Entry-should-be-able-to-use-keyboard-to-navigate-horizontal-grid-and-enter-data-chrome/trace.zip + Usage: + + npx playwright show-trace playwright/test-results/tests-grid-Grid-Data-Entry-should-be-able-to-use-keyboard-to-navigate-horizontal-grid-and-enter-data-chrome/trace.zip + + ──────────────────────────────────────────────────────────────────────────────────────────────── +]]> + + + + + + + + 13 | await this.locator.click({ force }); + | ^ + 14 | } + 15 | + 16 | async doubleClick() { + + at SelectLocator.click (/Users/connor.vidlock/Documents/GitHub/hudl-frontends/packages/playwright-shared/src/models/locators/base/base.locator.ts:13:24) + at /Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/models/actions/grid.actions.ts:93:58 + at GridActions.enterGridSelectValue (/Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/models/actions/grid.actions.ts:92:16) + at /Users/connor.vidlock/Documents/GitHub/hudl-frontends/apps/watch/playwright/tests/grid.spec.ts:279:25 + + Pending operations: + - locator.click at ../../packages/playwright-shared/src/models/locators/base/base.locator.ts:13:24 + + + attachment #1: screenshot (image/png) ────────────────────────────────────────────────────────── + playwright/test-results/tests-grid-Grid-Data-Entry-should-be-able-to-use-keyboard-to-navigate-vertical-grid-and-enter-data-chrome/test-failed-1.png + ──────────────────────────────────────────────────────────────────────────────────────────────── + + attachment #2: trace (application/zip) ───────────────────────────────────────────────────────── + playwright/test-results/tests-grid-Grid-Data-Entry-should-be-able-to-use-keyboard-to-navigate-vertical-grid-and-enter-data-chrome/trace.zip + Usage: + + npx playwright show-trace playwright/test-results/tests-grid-Grid-Data-Entry-should-be-able-to-use-keyboard-to-navigate-vertical-grid-and-enter-data-chrome/trace.zip + + ──────────────────────────────────────────────────────────────────────────────────────────────── +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/report/get-report.ts b/src/report/get-report.ts index 6491904..ba5ae1e 100644 --- a/src/report/get-report.ts +++ b/src/report/get-report.ts @@ -15,7 +15,7 @@ export interface ReportOptions { } const defaultOptions: ReportOptions = { - listSuites: 'non-skipped', + listSuites: 'all', listTests: 'all', baseUrl: '', onlySummary: false