Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Playwright 1.33 & 1.34 #1717

Closed
jan-molak opened this issue May 23, 2023 · 1 comment
Closed

Support Playwright 1.33 & 1.34 #1717

jan-molak opened this issue May 23, 2023 · 1 comment
Labels
@serenity-js/playwright @serenity-js/playwright-test Serenity/JS reporter and test APIs for Playwright Test

Comments

@jan-molak
Copy link
Member

jan-molak commented May 23, 2023

Playwright 1.33 introduced significant changes to the inner workings of its native reporters.

As reported by @yaffol on the Serenity/JS Community Chat, this means that using the Playwrigt HTML reporter version 1.33 and above with @serenity-js/playwright-test 3.2.1 and below results in the following error:

Error in reporter RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at RawReporter._serializeStep (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:184:33)
    at /Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:176:56
    at Array.map (<anonymous>)
    at RawReporter._serializeResult (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:176:39)
    at /Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:164:43
    at Array.map (<anonymous>)
    at RawReporter._serializeTest (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:164:29)
    at /Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:149:40
    at Array.map (<anonymous>)
    at RawReporter._serializeSuite (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:149:26)
    at /Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:148:42
    at Array.map (<anonymous>)
    at RawReporter._serializeSuite (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:148:28)
    at /Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:148:42
    at Array.map (<anonymous>)
    at RawReporter._serializeSuite (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:148:28)
    at /Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:104:21
    at Array.map (<anonymous>)
    at RawReporter.generateProjectReport (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/raw.js:103:28)
    at /Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/html.js:98:34
    at Array.map (<anonymous>)
    at HtmlReporter.onEnd (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/html.js:96:35)
    at /Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/multiplexer.js:104:115
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Multiplexer.onExit (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/reporters/multiplexer.js:102:45)
    at Runner.runAllTests (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/runner/runner.js:75:5)
    at runTests (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/cli.js:135:138)
    at ji.<anonymous> (/Users/pvale/sc/mycrossref/node_modules/@playwright/test/lib/cli.js:48:7)

Playwright 1.33 has also introduced test step reporting in UI mode and the trace viewer that Serenity/JS could leverage:

https://www.youtube.com/watch?v=JeFD6rqDbBo

@jan-molak jan-molak added @serenity-js/playwright @serenity-js/playwright-test Serenity/JS reporter and test APIs for Playwright Test labels May 23, 2023
@jan-molak jan-molak changed the title Support Playwright HTML reporter Support native Playwright 1.33 HTML reporter May 23, 2023
jan-molak added a commit that referenced this issue May 23, 2023
…aywright Test reporter issue

and prevent running into it again in the future

Related tickets: #1717
jan-molak added a commit that referenced this issue May 23, 2023
so that native reporter test files don't get confused with others

Related tickets: #1717
jan-molak added a commit that referenced this issue May 23, 2023
…actor.answer APIs

With this change, Actor.perform and Actor.answer are now modelled as two new Abilities. This enables
for the default behaviour of the actor to be modified and Serenity/JS to be integrated more closely
with other test automation tools.

Related tickets: #1717
jan-molak added a commit that referenced this issue May 23, 2023
new (internal) ability to PerformActivitiesAsPlaywrightSteps dynamically wraps every Serenity/JS
Interaction and Task in Playwright `test.step` and improves how Serenity/JS interactions are
rendered in Playwright Test native HTML reports.

Related tickets: #1717
jan-molak added a commit that referenced this issue May 25, 2023
use Playwright Locator instead of ElementHandle APIs to support auto-waiting and improve reporting

Related tickets: #1717
jan-molak added a commit that referenced this issue May 31, 2023
…ture

also removed package-private ability to AnswerQuestionsWithPlaywright as it's no longer needed

Related tickets: #1717
jan-molak added a commit that referenced this issue May 31, 2023
…reporting

reimplemented the ability to ScheduleWork, the Scheduler and Clock so that any scheduled async
operations retain their full stack trace. This will help to improve test reporting capabilities with
Playwright Test.

Related tickets: re #1717
jan-molak added a commit that referenced this issue May 31, 2023
Playwright Test reports now contain details of any Serenity/JS Screenplay activities and their
parameters

Related tickets: #1717
@jan-molak jan-molak changed the title Support native Playwright 1.33 HTML reporter Support Playwright 1.33 & 1.34 May 31, 2023
@jan-molak
Copy link
Member Author

Closed by #1716, released in Serenity/JS 3.3.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@serenity-js/playwright @serenity-js/playwright-test Serenity/JS reporter and test APIs for Playwright Test
Projects
None yet
Development

No branches or pull requests

1 participant