Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Improve the log message about the old and new test annotation syntax.

Resolve #628
  • Loading branch information
NickVolynkin committed Jul 1, 2024
1 parent 228b7a1 commit f07cfa0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
16 changes: 16 additions & 0 deletions qase-playwright/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# [email protected]

## What's new

The log message about the `qase(id, 'title')` annotation syntax got improved.
Earlier it was saying that this syntax is deprecated, which could be understood as that it's not working anymore,
or will be removed any time.
In fact, it's still working and will be supported further on.
However, there's a more powerful and flexible syntax which we propose to try in new tests.

The updated log message will, hopefully, explain it better:

> Some tests are using qase(id, 'Title') syntax.
> Consider using the new syntax: qase.id().title() in the test body. See the docs for reference:
> https://github.com/qase-tms/qase-javascript/tree/main/qase-playwright#readme
# [email protected]

## What's new
Expand Down
2 changes: 1 addition & 1 deletion qase-playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "playwright-qase-reporter",
"version": "2.0.4",
"version": "2.0.5",
"description": "Qase TMS Playwright Reporter",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
8 changes: 3 additions & 5 deletions qase-playwright/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,9 @@ export class PlaywrightQaseReporter implements Reporter {
await this.reporter.publish();

if (this.qaseTestWithOldAnnotation.size > 0) {
console.log(chalk`{yellow qase: qase(caseId) is deprecated. Use qase.id() and qase.title() inside the test body}`);
console.log(chalk`{yellow The following tests are using the old annotation:}`);
for (const [key] of this.qaseTestWithOldAnnotation) {
console.log(`at ${key}`);
}
console.log(chalk`{yellow qase: Some tests are using qase(id, 'Title') syntax.}`);
console.log(chalk`{yellow qase: Consider using the new syntax: qase.id().title() in the test body. See the docs for reference:}`);
console.log(chalk`{yellow qase: https://github.com/qase-tms/qase-javascript/tree/main/qase-playwright#readme}`);
}
}

Expand Down

0 comments on commit f07cfa0

Please sign in to comment.