wm-widget-components
v1.0.1
Published
Quickly create integration tests for your WaveMaker application by importing this component library. Inspired by page-object pattern this library exposes a way to program cypress testcases easily by relying on the component objects.
Downloads
1
Readme
wm-widget-components
Quickly create integration tests for your WaveMaker application by importing this component library. Inspired by page-object pattern this library exposes a way to program cypress testcases easily by relying on the component objects.
Couple this with GitHub Copilot and you can create integration tests for your WaveMaker application in minutes.
This framework comes packaged as an npm
module, which contains the default methods exposed for the wm-widgets
.
After installing you'll be able to:
- Access the methods exposed on individual widgets
- require specific class
import
added for the widget.
Install
Install the plugin by running:
npm install --save-dev wm-widget-components
How to organize tests using this plugin
This requires cypress integration to write tests using this plugin.
Example:
- Create any directory.
- Create
package.json
file to your directory using:npm init -y
- Install cypress by running:
npm install --save-dev cypress
- Install wm-widget-components plugin using:
npm install --save-dev wm-widget-components
- Run cypress project using below:
npx cypress open
- Configure cypress config file for testing and launch the browser from cypress window.
- Create sample spec file from the cypress window. (This will add cypress directory with spec.cy.js file)
- Now all set for using this plugin.
import
the required classes and use the methods exposed.
import { WMNumber } from 'wm-widget-components';
new WMNumber().setValue("numberWidget1",1234);
The above will enter "test sample" value into text widget named "text1".