Skip to content

feat(codegen): allow generating tests#7049

Merged
pavelfeldman merged 1 commit into
microsoft:masterfrom
pavelfeldman:cli_test
Jun 10, 2021
Merged

feat(codegen): allow generating tests#7049
pavelfeldman merged 1 commit into
microsoft:masterfrom
pavelfeldman:cli_test

Conversation

@pavelfeldman
Copy link
Copy Markdown
Member

@pavelfeldman pavelfeldman commented Jun 10, 2021

Comment thread src/server/supplements/recorder/codeGenerator.ts
if (this._isTest)
formatter.add(` expect(${pageAlias}.url()).toBe(${quote(signals.assertNavigation.url)});`);
else
formatter.add(` // assert.equal(${pageAlias}.url(), ${quote(signals.assertNavigation.url)});`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove the asserts? We have tests with expect for people now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I did it and then test started failing and i don't want to fix it for merge. Will follow up.

@pavelfeldman pavelfeldman merged commit 3b1bae8 into microsoft:master Jun 10, 2021
pavelfeldman added a commit to pavelfeldman/playwright that referenced this pull request Jun 11, 2021
@mxschmitt mxschmitt linked an issue Jun 11, 2021 that may be closed by this pull request
aslushnikov pushed a commit to aslushnikov/playwright that referenced this pull request Jun 11, 2021
aslushnikov added a commit that referenced this pull request Jun 11, 2021
- Cherry-Pick PR #7049 SHA 3b1bae8
- Cherry-Pick PR #7069 SHA afa9d69

Fixes #7020

Co-authored-by: Pavel Feldman <pavel.feldman@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Codegen should be able to emit @playwright/test syntax

2 participants