New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rx-page-objects

Package Overview
Dependencies
Maintainers
1
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rx-page-objects - npm Package Compare versions

Comparing version 1.29.0 to 1.30.0

rx-page-objects-1.30.0.tgz

68

exercise.js

@@ -1176,2 +1176,70 @@ /*jshint node:true*/

var rxTags = require('./index').rxTags;
/**
rxTags exercises.
@exports encore.exercise.rxTags
@param {Object} [options=] - Test options. Used to build valid tests.
@param {rxTags} [options.instance=] - Component to Exercise.
@param {string} options.sampleText - A tag that can be added.
@example
```js
describe('default exercises', encore.exercise.rxTags({
instance: encore.rxTags.initialize('.demo rx-tags') // select one of many widgets on page
}));
```
*/
exports.rxTags = function (options) {
if (options === undefined) {
options = {};
}
options = _.defaults(options, {
sampleText: undefined
});
return function () {
var component, tag, numTags;
before(function () {
if (options.instance !== undefined) {
component = options.instance;
} else {
component = rxTags.main;
}
component.count().then(function (num) {
numTags = num;
});
});
if (!_.isUndefined(options.sampleText)) {
it('adds a tag', function () {
tag = component.addTag(options.sampleText);
expect(tag.text).to.eventually.equal(options.sampleText);
expect(component.count()).to.eventually.equal(numTags + 1);
});
it('removes a tag by clicking the x', function () {
tag.remove();
expect(tag.exists()).to.eventually.be.false;
expect(component.count()).to.eventually.equal(numTags);
});
it('focuses the last tag by typing backspace', function () {
tag = component.addTag(options.sampleText);
expect(tag.isFocused()).to.eventually.be.false;
component.sendBackspace();
expect(tag.isFocused()).to.eventually.be.true;
});
it('removes a focused tag by entering a backspace', function () {
tag.sendBackspace();
expect(component.byText(options.sampleText).exists()).to.eventually.be.false;
expect(component.count()).to.eventually.equal(numTags);
});
}
};
};
var rxToggleSwitch = require('./index').rxToggleSwitch;

@@ -1178,0 +1246,0 @@

5

package.json

@@ -5,3 +5,3 @@ {

"description": "Midway test page objects for all of the Encore UI components",
"version": "1.29.0",
"version": "1.30.0",
"main": "index.js",

@@ -14,3 +14,4 @@ "license": "Apache License, Version 2.0",

"moment": "2.8.2",
"lodash": "2.4.1"
"lodash": "2.4.1",
"node-timing.js": "1.1.0"
},

@@ -17,0 +18,0 @@ "repository": {

API.md

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc