Skip to content

Commit

Permalink
Merge pull request #21 from reportportal/develop
Browse files Browse the repository at this point in the history
Release 5.0.1
  • Loading branch information
AmsterGet authored Jan 17, 2022
2 parents 3ad3582 + 3f754cf commit 7d94b24
Show file tree
Hide file tree
Showing 25 changed files with 1,977 additions and 797 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
"project": "./tsconfig.eslint.json"
},
"rules": {
"no-plusplus": 0,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CI-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ jobs:
run: npm run build
- name: Run lint
run: npm run lint
- name: Run tests and check coverage
run: npm run test:coverage
# - name: Run tests and check coverage
# run: npm run test:coverage
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
run: npm run build
- name: Run lint
run: npm run lint
- name: Run tests and check coverage
run: npm run test:coverage

publish-to-npm-and-gpr:
needs: build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: '12'
- name: Configure git
run: |
git config --global user.email "reportportal.io"
Expand Down
14 changes: 0 additions & 14 deletions .npmignore

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### Added
- Ability to attach screenshots and other files via [test info attachments](https://playwright.dev/docs/1.17/api/class-testinfo#test-info-attachments)
- TypeScript definitions provided
### Fixed
- Error when reporting tests without describe blocks
- Escape codes removed from error messages and stacktrace
### Changed
- Package size reduced

## [5.0.0] - 2021-12-16
### Added
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,27 @@ npm install --save-dev @reportportal/agent-js-playwright
```
## Reporting

### Attachments

Attachments can be easily added during test run via `testInfo.attachments` according to the Playwright [docs](https://playwright.dev/docs/1.17/api/class-testinfo#test-info-attachments).

```typescript
import { test, expect } from '@playwright/test';

test('basic test', async ({ page }, testInfo) => {
await page.goto('https://playwright.dev');

// Capture a screenshot and attach it.
const path = testInfo.outputPath('screenshot.png');
await page.screenshot({ path });
testInfo.attachments.push({ name: 'screenshot', path, contentType: 'image/png' });
});
```

*Note:* attachment body can be provided instead of path.

### Reporting API

This reporter provides Reporting API to use it directly in tests to send some additional data to the report.

To start using the `ReportingApi` in tests, just import it from `'@reportportal/agent-js-playwright'`:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.0
5.0.1-SNAPSHOT
Loading

0 comments on commit 7d94b24

Please sign in to comment.