Skip to content

Commit 42a6fb9

Browse files
authored
Merge pull request #222 from reportportal/develop
Release 5.3.1
2 parents 173601b + 968ccc1 commit 42a6fb9

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
### Fixed
2+
- Updated the `checkConnect` method implementation to utilize the `GET launches` API endpoint, ensuring compatibility with both old and new API versions.
13

24
## [5.3.0] - 2024-09-23
35
### Changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ReportPortal js client
22

3-
This Client is to communicate with the Report Portal on Node.js.
3+
This Client is to communicate with the ReportPortal on Node.js.
44

55
Library is used only for implementors of custom listeners for ReportPortal.
66

@@ -40,9 +40,8 @@ const rpClient = new RPClient({
4040
project: 'PROJECT_NAME'
4141
});
4242

43-
rpClient.checkConnect().then((response) => {
43+
rpClient.checkConnect().then(() => {
4444
console.log('You have successfully connected to the server.');
45-
console.log(`You are using an account: ${response.fullName}`);
4645
}, (error) => {
4746
console.log('Error connection to server');
4847
console.dir(error);
@@ -383,7 +382,8 @@ The unix Epoch time ISO string.
383382

384383
The [ReportPortal since product version 24.2]() (Service API version 5.12.0) supports the time with microsecond precision in the ISO string format (`2024-09-23T11:10:46.793546Z`).
385384
Thus, it is recommended to report time in this format to have more accurate logs and test items order on the ReportPortal UI.
386-
**Note:** Reporting the time in ISO string format with millisecond precision (`2024-09-23T11:10:46.793Z`) or as a number of milliseconds (`1727089846793`) is also acceptable with microseconds automatically added as zeros for backward compatibility.
385+
386+
**Note:** Reporting the time in ISO string format with millisecond precision (`2024-09-23T11:10:46.793Z`) or as a number of milliseconds (`1727089846793`) is also acceptable with microseconds automatically added as zeros on ReportPortal's API service for backward compatibility.
387387

388388
The client use time with microsecond precision in the ISO string format by default since [version 5.3.0]().
389389

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.3.0
1+
5.3.1-SNAPSHOT

lib/report-portal-client.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ class RPClient {
130130
}
131131

132132
checkConnect() {
133-
const url = [this.config.endpoint.replace('/v2', '/v1'), 'user'].join('/');
133+
const url = [this.config.endpoint.replace('/v2', '/v1'), this.config.project, 'launch']
134+
.join('/')
135+
.concat('?page.page=1&page.size=1');
134136
return this.restClient.request('GET', url, {});
135137
}
136138

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

version_fragment

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
minor
1+
patch

0 commit comments

Comments
 (0)