gemini-testing / testplane

Testplane (ex-hermione) browser test runner based on mocha and wdio
https://testplane.io
MIT License
678 stars 62 forks source link

Add a handy way to screenshot the viewport #932

Open sipayRT opened 1 month ago

sipayRT commented 1 month ago

Contribution

Describe the user story

for now for testing viewport view you need to composite options for assertView command:

await browser.assertView('check-viewport', 'body', {
    allowViewportOverflow: true,
    compositeImage: false
});

Describe the solution you'd like

There must be a more convenient way. For example, a new command with a preset from the example above

await browser.assertViewViewport('check-viewport'); // the command name is discussable

Describe the drawbacks of your solution

No response

Describe alternatives you've considered

No response