Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

feat: chai screenshot plugin#306

Merged
stoffeastrom merged 20 commits intoqlik-oss:masterfrom
cbt1:feat/chai-screenshot-plugin
Aug 9, 2018
Merged

feat: chai screenshot plugin#306
stoffeastrom merged 20 commits intoqlik-oss:masterfrom
cbt1:feat/chai-screenshot-plugin

Conversation

@cbt1
Copy link
Copy Markdown
Contributor

@cbt1 cbt1 commented Aug 6, 2018

This PR makes the chai assertionmatchImageOf available for all test runners.

  • The assert plugin and all the dependent methods are moved from the protractor command to a separate plugins folder.
  • The tight integration with takeImageOf should work as before. But is on a TODO to remove at some point.
  • matchImageOf still takes 3 parameters, but the second param can now be an object or a string to allow the artifact path to be set.

Status

  • Under development
  • Waiting for code review
  • Waiting for merge

Information

  • Contains breaking changes
  • Contains new API(s)
  • Contains documentation
  • Contains test

To-do list

  • Currently only applicable when using preset-env
  • Remove the dependency to the takeImageOf method in the protractor runner
  • Make the plugin a public package
  • Find a better way to configure the artifacts directory (currently via a method param)

@cbt1 cbt1 requested a review from stoffeastrom August 6, 2018 11:46
@qlik-oss qlik-oss deleted a comment from qlikossbuild Aug 6, 2018
Comment thread docs/node.md Outdated

## Screenshot testing

When using the preset-env option. A screenshot assertion plugin is added to Chai. This allows comperisons of images.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo comperisons

"author": "QlikTech International AB",
"dependencies": {
"@after-work.js/utils": "^5.0.0-beta.2",
"jimp": "0.2.28",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to latest 0.3.2

Comment thread docs/node.md
When using the preset-env option. A screenshot assertion plugin is added to Chai. This allows comparisons of images.

```javascript
describe('screenshot', () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixup the example

@stoffeastrom stoffeastrom merged commit 8b6cb15 into qlik-oss:master Aug 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants