sliw
Not done. Full toolkit to make sure your electron application is working as expected.
Last updated 3 years ago by matheusmr00 .
Original npm · Tarball · package.json
$ cnpm install sliw 
SYNC missed versions from official npm registry.

sliw

Not done. Full toolkit to make sure your electron application is working as expected.

How to use it

Install it:

npm install sliw

Add this to your index.js:

const { WebClient, ElectronClient } = require('sliw');

new WebClient({ window }).interactive();
new ElectronClient({ electron }).register();

Create a folder with your tests (let's name it sliw-tests) and inside it create your first test login.spec.js:

module.exports = sliw => sliw
	.open()
	.input('[name="username"]', 'myusername')
	.input('[name="password"]', 'mypassword')
	.shouldMatchSnapshot()
	.click('.submit-login')
	.wait('.logged-page')
	.shouldMatchSnapshot();

Create a file named sliw.config.js in root of your project and define options:

const login = require('./sliw-tests/login.spec');

module.exports = {
	pipelines: {
		login
	},
	snapshotsFolder: `${__dirname}/sliw-tests`,
	resolutions: [
		[1000, 600],
		[1200, 800],
		[800, 600]
	]
};

Add script to your package.json:

"e2e": "NOT_WATCH=true sliw"

And you are ready to go:

npm run e2e

CLI

sliw

Executes test pipelines described on config sliw.config.js.

-p <pathToPipeline>

Execute single pipeline default config specifiec on sliw.config.js.

Current Tags

  • 0.2.0                                ...           latest (3 years ago)

6 Versions

  • 0.2.0                                ...           3 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |