Gathering detailed insights and metrics for wdio-cucumber-viewport-logger-service
Gathering detailed insights and metrics for wdio-cucumber-viewport-logger-service
Syngrisi - Visual Testing Tool
npm install wdio-cucumber-viewport-logger-service
Typescript
Module System
Node Version
NPM Version
73.1
Supply Chain
96.5
Quality
75.5
Maintenance
100
Vulnerability
100
License
TypeScript (58.7%)
Gherkin (20.17%)
JavaScript (20.12%)
HTML (0.88%)
CSS (0.12%)
Shell (0.01%)
Dockerfile (0.01%)
Total Downloads
36,148
Last Day
79
Last Week
479
Last Month
1,846
Last Year
26,533
2 Stars
326 Commits
3 Branches
2 Contributors
Minified
Minified + Gzipped
Latest Version
2.1.36-alpha.0
Package Id
wdio-cucumber-viewport-logger-service@2.1.36-alpha.0
Unpacked Size
199.35 kB
Size
177.29 kB
File Count
11
NPM Version
lerna/7.4.2/node@v20.9.0+x64 (darwin)
Node Version
20.9.0
Publised On
16 Nov 2023
Cumulative downloads
Total Downloads
Last day
0%
79
Compared to previous day
Last week
6%
479
Compared to previous week
Last month
33.6%
1,846
Compared to previous month
Last year
202.3%
26,533
Compared to previous year
1
This service adds the possibility to log your Cucumber steps and other debug info directly to your browser window in your WebriverIO-based solution. Especially useful it can be in cases using devices or virtual machines without direct physical access to them and the possibility to set up an interactive session for deep debugging your e2e tests.
Install the package:
1npm install wdio-cucumber-viewport-logger-service --save-dev
Add service to your services
config section, e.g.:
1 services: [ 2 //... 3 'cucumber-viewport-logger', 4 //... 5]
Option | Description | Type | Default value |
---|---|---|---|
numberOfSteps | the number of steps that will be present on the viewport | number | 3 |
enabled | enable/disable the service | boolean | true |
styles | CSS styles for logger wrapper, step keyword and step text, see the example below | object | {} |
1// wdio.conf.js 2exports.config = { 3 // ... 4 services: [ 5 ['cucumber-viewport-logger', { 6 numberOfSteps: 5, 7 enabled: process.env.VP_LOGGER === '1', // service will be enabled only when you set `VP_LOGGER` enviroment variable to `1` 8 // set CSS custom styles for particular elements 9 styles: { 10 wrapper: { backgroundColor: 'white' }, 11 keyword: { color: 'red' }, 12 text: { 13 fontSize: '30px', 14 color: 'green', 15 }, 16 closeButton: { 17 color: 'red', 18 }, 19 }, 20 },] 21 ] 22 // ... 23};
logToViewport(message, styles)
- render custom message with custom CSS style (not mandatory), you can use this in your step definitions e.g.:1When(/^I render message: "([^"]*)"$/, { timeout: 120000 }, function (message) { 2 browser.logToViewport(message, { text: { color: 'green' } }); 3});
removeViewportLogMessage()
- remove viewport messages section, can be useful for example to do a visual assertion
By default, all mouse events (clicking, hovering, etc.) go through the message section, for example: instead of clicking on the message section your click "pass" to the element next to the message (your app element), if you wish to change this behavior set wrapper style 'pointerEvents' option to 'auto', eq:
1 2/ wdio.conf.js 3exports.config = { 4 // ... 5 services: [ 6 ['cucumber-viewport-logger', { 7 8 styles: { 9 wrapper: { pointerEvents: 'auto' }, 10 }, 11 },] 12 ] 13 // ... 14};
No vulnerabilities found.
No security vulnerabilities found.