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

ci: add WDIO reporter to the pipeline #660

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
max-parallel: 5
matrix:
node-version: [ '16', '18' ]
prefix: [ "qaseio", "qase-javascript-commons", "qase-cypress", "qase-cucumberjs", "qase-newman", "qase-testcafe", "qase-jest", "qase-playwright", "qase-mocha" ]
prefix: [ "qaseio", "qase-javascript-commons", "qase-cypress", "qase-cucumberjs", "qase-newman", "qase-testcafe", "qase-jest", "qase-playwright", "qase-mocha", "qase-wdio" ]
name: Project ${{ matrix.prefix }} - Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2
Expand All @@ -27,7 +27,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
prefix: [ "qaseio", "qase-javascript-commons", "qase-cypress", "qase-cucumberjs", "qase-newman", "qase-testcafe", "qase-jest", "qase-playwright", "qase-mocha" ]
prefix: [ "qaseio", "qase-javascript-commons", "qase-cypress", "qase-cucumberjs", "qase-newman", "qase-testcafe", "qase-jest", "qase-playwright", "qase-mocha", "qase-wdio" ]
if: startsWith(github.event.ref, 'refs/tags')
name: Publish ${{ matrix.prefix }}
steps:
Expand Down
1 change: 1 addition & 0 deletions qase-wdio/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@
private _options: QaseReporterOptions;
private _isMultiremote?: boolean;

constructor(options: any) {

Check warning on line 68 in qase-wdio/src/reporter.ts

View workflow job for this annotation

GitHub Actions / Project qase-wdio - Node 16

Unexpected any. Specify a different type

Check warning on line 68 in qase-wdio/src/reporter.ts

View workflow job for this annotation

GitHub Actions / Project qase-wdio - Node 18

Unexpected any. Specify a different type
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
super(options);
const configLoader = new ConfigLoader();
const config = configLoader.load();

// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
this.reporter = QaseReporter.getInstance({
...composeOptions(options, config),
frameworkPackage: 'wdio',
Expand Down Expand Up @@ -198,7 +199,7 @@
this.storage.clear();
}

override async onRunnerEnd(_: RunnerStats) {

Check warning on line 202 in qase-wdio/src/reporter.ts

View workflow job for this annotation

GitHub Actions / Project qase-wdio - Node 16

'_' is defined but never used

Check warning on line 202 in qase-wdio/src/reporter.ts

View workflow job for this annotation

GitHub Actions / Project qase-wdio - Node 18

'_' is defined but never used
await this.reporter.publish();
this.isSync = true;
}
Expand All @@ -221,7 +222,7 @@
private static transformError(testErrors: Error[]): CompoundError {
const err = new CompoundError();
for (const error of testErrors) {
if (error.message == undefined) {

Check warning on line 225 in qase-wdio/src/reporter.ts

View workflow job for this annotation

GitHub Actions / Project qase-wdio - Node 16

Unnecessary conditional, the types have no overlap

Check warning on line 225 in qase-wdio/src/reporter.ts

View workflow job for this annotation

GitHub Actions / Project qase-wdio - Node 18

Unnecessary conditional, the types have no overlap
continue;
}
err.addMessage(error.message);
Expand Down Expand Up @@ -498,7 +499,7 @@
this.storage.push(step);
}

private attachJSON(name: string, json: any) {

Check warning on line 502 in qase-wdio/src/reporter.ts

View workflow job for this annotation

GitHub Actions / Project qase-wdio - Node 16

Unexpected any. Specify a different type

Check warning on line 502 in qase-wdio/src/reporter.ts

View workflow job for this annotation

GitHub Actions / Project qase-wdio - Node 18

Unexpected any. Specify a different type
const isStr = typeof json === 'string';
const content = isStr ? json : JSON.stringify(json, null, 2);

Expand Down
Loading