1.0.11 • Published 3 years ago

cy-view v1.0.11

Weekly downloads
1,949
License
MIT
Repository
-
Last release
3 years ago

cy-view

Run tests suite across multiple viewports

Installation

$ npm i --save-dev cy-view

Usage - CYPRESS MUST BE INSTALLED

ParameterType
devicesArray
urlsArray
const cyView = require("cy-view");

const devices = [
	{
		model: "macbook-15",
		width: 1440,
		height: 900
	},
	{
		model: "ipad-2",
		width: 768,
		height: 1024
	},
	{
		model: "iphone-6+",
		width: 414,
		height: 736
	}
];

// Add urls to test against
const urls = [
	"https://ao.com/product/idc8t3b-indesit-eco-time-condenser-tumble-dryer-white-38191-18.aspx",
	"https://ao.com/product/zwf01483wr-zanussi-lindo300-washing-machine-white-29672-1.aspx"
];

// Pass cy-view an array of devices structured like the devices constant above
const washingMachinePageTests = cyView(devices);

// Pass your urls constant in and your good to go!
washingMachinePageTests(urls, () => {
	describe("My tests running on all viewports across various URLs", () => {
		it("should test something...", () => {
			//...do yo' thang
		});
	});
});
1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

5 years ago

1.1.0

5 years ago

1.0.6

5 years ago

1.0.4

5 years ago

1.0.5

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago