Skip to content

Commit

Permalink
EPMRPP-80662 || Code review fixes - 3
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1ble committed Nov 10, 2022
1 parent bc23c2a commit 97d2e2f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Added
- Reporting API method `addParameters`
- Default browser parameters to steps

## [5.0.3] - 2022-10-05
### Added
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,22 @@ describe('test item', () => {
});
```

```javascript
// Cucumber - adding parameter to the `step`
Given('I do something awesome', () => {
ReportingApi.addParameters([
{
key: 'stepParamKey',
value: 'stepParamValue',
},
{
value: 'stepParamValue_2',
},
]);
//...
});
```

### setDescription
`ReportingApi.setDescription(description: string, suite?: string);`
**required**: `description`
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/reportingApi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ describe('ReportingApi', () => {
describe('ReportingApi.addParameters', () => {
const spyOnAddParameters = jest.spyOn(ClientPublicReportingAPI, 'addParameters');

it('should call clientPublicReportingApi.addParameters method with text and undefined as parameter', () => {
it('should call clientPublicReportingApi.addParameters method with parameters', () => {
ReportingApi.addParameters(parameters);

expect(spyOnAddParameters).toBeCalledWith(parameters);
Expand Down

0 comments on commit 97d2e2f

Please sign in to comment.