Skip to content

Update dependencies to enable Greenkeeper 🌴 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/smart-number-inputs.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4,540 changes: 3,072 additions & 1,468 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@
"url": "https://github.com/codeclown/smart-number-inputs.git"
},
"devDependencies": {
"@wdio/cli": "^5.15.1",
"@wdio/local-runner": "^5.15.1",
"@wdio/mocha-framework": "^5.15.1",
"@wdio/sauce-service": "^5.14.0",
"@wdio/selenium-standalone-service": "^5.15.0",
"@wdio/spec-reporter": "^5.15.1",
"babel-core": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"eslint": "^4.17.0",
"eslint": "^6.5.1",
"eslint-plugin-webdriverio": "^1.0.1",
"express": "^4.16.2",
"tape": "^4.8.0",
"uglify-js": "^2.8.29",
"wdio-mocha-framework": "^0.5.12",
"wdio-sauce-service": "^0.4.8",
"wdio-selenium-standalone-service": "0.0.9",
"wdio-spec-reporter": "^0.1.3",
"webdriverio": "^4.10.2"
"uglify-js": "^3.6.2",
"webdriverio": "^5.15.1"
},
"scripts": {
"lint": "eslint 'src/**/*.js' 'test/**/*.js' 'scripts/**/*.js'",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ npm run build

## Browser support

[![Sauce Test Status](https://saucelabs.com/browser-matrix/smart-number-inputs.svg)](https://saucelabs.com/u/smart-number-inputs)
[![Sauce Test Status](https://saucelabs.com/browser-matrix/smart-number-inputs.svg)](https://saucelabs.com/u/smart-number-inputs) [![Greenkeeper badge](https://badges.greenkeeper.io/codeclown/smart-number-inputs.svg)](https://greenkeeper.io/)

Modern browsers.

Expand Down
2 changes: 1 addition & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ const minified = path.join(__dirname, '../build/smart-number-inputs.min.js');
const oldSchool = babel.transformFileSync(source, { presets: ['es2015'] });
fs.writeFileSync(destination, header + oldSchool.code);

const uglified = uglify.minify(oldSchool.code, { fromString: true });
const uglified = uglify.minify(oldSchool.code);
fs.writeFileSync(minified, header + uglified.code);
7 changes: 4 additions & 3 deletions test/browser/specs/jQuery.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ const assert = require('assert');
describe('jQuery', () => {
it('should work with jQuery', async () => {
await browser.url('/html/jQuery.html');
const input = await browser.$('#input');

assert.equal(await browser.getValue('#input'), '10');
assert.equal(await input.getValue(), '10');

await browser.click('#input');
await input.click();
await browser.keys(['Up arrow']);

assert.equal(await browser.getValue('#input'), '11');
assert.equal(await input.getValue(), '11');
});
});
67 changes: 39 additions & 28 deletions test/browser/specs/vanilla.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,72 +3,83 @@ const assert = require('assert');
describe('vanilla', () => {
it('should work with a single element', async () => {
await browser.url('/html/vanilla.html');
const input = await browser.$('#input');

assert.equal(await browser.getValue('#input'), '10');
assert.equal(await input.getValue(), '10');

await browser.click('#input');
await input.click();
await browser.keys(['Up arrow']);

assert.equal(await browser.getValue('#input'), '11');
assert.equal(await input.getValue(), '11');
});

it('should work with an array of elements', async () => {
await browser.url('/html/vanilla-array.html');
const input1 = await browser.$('#input1');
const input2 = await browser.$('#input2');

assert.equal(await browser.getValue('#input1'), '10');
assert.equal(await browser.getValue('#input2'), '20');
assert.equal(await input1.getValue(), '10');
assert.equal(await input2.getValue(), '20');

await browser.click('#input1');
await input1.click();
await browser.keys(['Up arrow']);
await browser.click('#input2');
await input2.click();
await browser.keys(['Up arrow']);

assert.equal(await browser.getValue('#input1'), '11');
assert.equal(await browser.getValue('#input2'), '21');
assert.equal(await input1.getValue(), '11');
assert.equal(await input2.getValue(), '21');
});

it('should work with a NodeList', async () => {
await browser.url('/html/vanilla-NodeList.html');
const input1 = await browser.$('#input1');
const input2 = await browser.$('#input2');

assert.equal(await browser.getValue('#input1'), '10');
assert.equal(await browser.getValue('#input2'), '20');
assert.equal(await input1.getValue(), '10');
assert.equal(await input2.getValue(), '20');

await browser.click('#input1');
await input1.click();
await browser.keys(['Up arrow']);
await browser.click('#input2');
await input2.click();
await browser.keys(['Up arrow']);

assert.equal(await browser.getValue('#input1'), '11');
assert.equal(await browser.getValue('#input2'), '21');
assert.equal(await input1.getValue(), '11');
assert.equal(await input2.getValue(), '21');
});

it('should work with a HTMLCollection', async () => {
await browser.url('/html/vanilla-HTMLCollection.html');
const input1 = await browser.$('#input1');
const input2 = await browser.$('#input2');

assert.equal(await browser.getValue('#input1'), '10');
assert.equal(await browser.getValue('#input2'), '20');
assert.equal(await input1.getValue(), '10');
assert.equal(await input2.getValue(), '20');

await browser.click('#input1');
await input1.click();
await browser.keys(['Up arrow']);
await browser.click('#input2');
await input2.click();
await browser.keys(['Up arrow']);

assert.equal(await browser.getValue('#input1'), '11');
assert.equal(await browser.getValue('#input2'), '21');
assert.equal(await input1.getValue(), '11');
assert.equal(await input2.getValue(), '21');
});

it('should not block event listeners', async () => {
await browser.url('/html/vanilla-events.html');
const keydownBefore = await browser.$('div=keydown-before');
const onkeydown = await browser.$('div=onkeydown');
const keydownAfter = await browser.$('div=keydown-after');
const input = await browser.$('#input');

assert.equal(await browser.isVisible('div=keydown-before'), false);
assert.equal(await browser.isVisible('div=onkeydown'), false);
assert.equal(await browser.isVisible('div=keydown-after'), false);
assert.equal(await keydownBefore.isDisplayed(), false);
assert.equal(await onkeydown.isDisplayed(), false);
assert.equal(await keydownAfter.isDisplayed(), false);

await browser.click('#input');
await input.click();
await browser.keys(['Up arrow']);

assert.equal(await browser.isVisible('div=keydown-before'), true);
assert.equal(await browser.isVisible('div=onkeydown'), true);
assert.equal(await browser.isVisible('div=keydown-after'), true);
assert.equal(await keydownBefore.isDisplayed(), true);
assert.equal(await onkeydown.isDisplayed(), true);
assert.equal(await keydownAfter.isDisplayed(), true);
});
});
17 changes: 10 additions & 7 deletions test/browser/wdio.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,33 @@ if (process.env.TRAVIS) {
exports.config.sauceConnect = true;

const commonCapabilities = {
platform: 'Windows 10',
build: process.env.TRAVIS_BUILD_NUMBER
build: process.env.TRAVIS_BUILD_NUMBER,
public: true
};
exports.config.capabilities = [
{
browserName: 'chrome',
version: '64.0'
platform: 'Windows 7',
version: '61'
},
{
browserName: 'firefox',
version: '58.0'
version: '52'
},
{
browserName: 'internet explorer',
version: '11.103'
platform: 'Windows 7',
version: '10.0'
},
{
browserName: 'MicrosoftEdge',
version: '15.15063'
platform: 'Windows 10',
version: '16.16299'
},
{
browserName: 'safari',
platform: 'macOS 10.13',
version: '11.0'
version: '11.1'
}
].map(specs => Object.assign({}, commonCapabilities, specs));
}