Skip to content

Commit

Permalink
upgrade dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinCK committed Jan 11, 2021
1 parent 275054e commit 610a6be
Show file tree
Hide file tree
Showing 19 changed files with 5,039 additions and 3,055 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# OS generated files #
.DS_Store
tests_output
ehthumbs.db
Icon?
Thumbs.db
61 changes: 31 additions & 30 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
module.exports = {
"root": true,
"parser": 'babel-eslint',
"parserOptions": {
"sourceType": 'module'
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
},
"env": {
"browser": true
env: {
browser: true,
},
"extends": 'airbnb-base',
"plugins": [],
"globals": {
"window": true
extends: 'airbnb-base',
plugins: [],
globals: {
window: true,
},
"rules": {
"semi-style": 0,
"no-cond-assign": 0,
"no-plusplus": 0,
"no-restricted-syntax": 0,
"global-require": 0,
"no-continue": 0,
"no-multi-assign": 0,
"no-empty": 0,
"guard-for-in": 0,
"camelcase": 0,
"consistent-return": 0,
"no-confusing-arrow": 0,
"no-extra-boolean-cast": 0,
"no-lonely-if": 0,
"no-underscore-dangle": 0,
"import/prefer-default-export": 0,
rules: {
'semi-style': 0,
'no-cond-assign': 0,
'no-plusplus': 0,
'no-restricted-syntax': 0,
'global-require': 0,
'no-continue': 0,
'no-multi-assign': 0,
'no-empty': 0,
'guard-for-in': 0,
'camelcase': 0,
'quote-props': 0,
'consistent-return': 0,
'no-confusing-arrow': 0,
'no-extra-boolean-cast': 0,
'no-lonely-if': 0,
'no-underscore-dangle': 0,
'import/prefer-default-export': 0,
'import/extensions': ['error', 'always', {
"js": "never"
}]
}
js: 'never',
}],
},
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ selenium-debug.log
selenium-server.log
local.log
sauce_connect.log
tests_output
6 changes: 0 additions & 6 deletions .jshintignore

This file was deleted.

3 changes: 0 additions & 3 deletions .jshintrc

This file was deleted.

2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.idea
.git
.bowerrc
.gitignore
Expand All @@ -25,3 +26,4 @@ docker-compose.yml
.gitattributes
.dockerignore
build
tests_output
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## 3.2.2
- Upgrade dev dependencies
- Fix tests

## 3.0.0
- Rename class and global variable `VueLocalStorage` to `VueStorage`
- Rename class and global variable `VueLocalStorage` to `VueStorage`

## 2.4.0
- Added session storage
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</p>

<p align="center">
<a href="https://saucelabs.com/beta/builds/1defc2f5e76e4478817fc085438416d3"><img src="https://cdn.rawgit.com/RobinCK/65849005c282a0e59d93b7e8ce05b980/raw/72ec5d77d535103016832f4aa592e93e4b83f9ee/browsers_support.svg"></a>
<img src="https://app.saucelabs.com/browser-matrix/Robin_ck.svg">

</p>

Expand Down Expand Up @@ -168,7 +168,6 @@ Removes a listener previously attached with `Vue.ls.on(name, callback)`.
- `npm run test:browserstack:firefox`
- `npm run test:browserstack:safari`
- `npm run test:chrome` - run browser test in chrome
- `npm run test:phantomjs` - run browser test in phantomjs

Testing Supported By<br>
<img width="200" src="https://cdn.rawgit.com/RobinCK/b1435c9cae05437ad9e4c2023aec08e4/raw/4b89e95cd89827935e6e3949d28a4f6ea3e48ee4/browser-stack.svg">
Expand Down
111 changes: 28 additions & 83 deletions build/karma.sauce.config.js
Original file line number Diff line number Diff line change
@@ -1,100 +1,45 @@
const base = require('./karma.config.js');

const batches = [
{
sl_ie_9: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '9'
},
sl_ie_10: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8',
version: '10'
}
},
{
sl_ie_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
},
sl_edge_13: {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
platform: 'Windows 10',
version: '13'
}
const batches = {
sl_edge_13: {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
platform: 'Windows 10',
version: '13'
},
{
sl_edge_14: {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
platform: 'Windows 10',
version: '14'
},
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 7'
}
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 10'
},
{
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox'
},
sl_mac_safari: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.10'
}
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox'
},
{
sl_ios_safari_8: {
base: 'SauceLabs',
browserName: 'iphone',
version: '8.4'
},
sl_ios_safari_9: {
base: 'SauceLabs',
browserName: 'iphone',
version: '9.3'
}
},
{
sl_android_4_4: {
base: 'SauceLabs',
browserName: 'android',
version: '4.4'
},
sl_android_5_1: {
base: 'SauceLabs',
browserName: 'android',
version: '5.1'
}
sl_mac_safari: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.15'
}
];
};

module.exports = function(config) {
var batch = batches[process.argv[4] || 0];

config.set(Object.assign(base, {
singleRun: true,
browsers: Object.keys(batch),
customLaunchers: batch,
browsers: Object.keys(batches),
customLaunchers: batches,
reporters: process.env.CI ? ['dots', 'saucelabs'] : ['progress', 'saucelabs'],
sauceLabs: {
testName: 'vue-ls unit tests',
testName: 'vue-ls',
username: process.env.SAUCE_USERNAME,
accessKey: process.env.SAUCE_ACCESS_KEY,
recordScreenshots: false,
connectOptions: {
port: 5757,
logfile: 'sauce_connect.log'
sauceLabs: {
testName: 'Vue.js unit tests',
recordScreenshots: false,
connectOptions: {
'no-ssl-bump-domains': 'all' // Ignore SSL error on Android emulator
},
build: process.env.CIRCLE_BUILD_NUM || process.env.SAUCE_BUILD_ID || Date.now()
},
public: 'public',
build: process.env.BUILD_NUMBER || process.env.BUILD_TAG || process.env.CI_BUILD_NUMBER ||
Expand Down
53 changes: 53 additions & 0 deletions build/local.runner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env node

const Nightwatch = require('nightwatch');
const browserstack = require('browserstack-local');
const serveStatic = require('serve-static');
const connect = require('connect');
const http = require('http');
const path = require('path');
let bs_local;
let httpServer;

// eslint-disable-next-line
const logger = console.log;

try {
logger("Start server");

const app = connect().use(serveStatic(path.resolve('./')));
httpServer = http.createServer(app).listen(9000, () => {
process.mainModule.filename = "./node_modules/nightwatch/bin/nightwatch"
// Code to start browserstack local before start of test

logger("Connecting local");
Nightwatch.bs_local = bs_local = new browserstack.Local();

bs_local.start({'key': process.env.BROWSERSTACK_ACCESS_KEY }, (error) => {
if (error) {
throw error;
}

logger('Connected. Now testing...');

Nightwatch.cli((argv) => {
Nightwatch.CliRunner(argv)
.setup(null, () => {
// Code to stop browserstack local after end of parallel test
bs_local.stop(() => {});
})
.runTests(() => {
// Code to stop browserstack local after end of single test
bs_local.stop(() => {
logger("Stop Server");
httpServer.close();
});
});
});
});
});
} catch (ex) {
logger('There was an error while starting the test runner:\n\n');
process.stderr.write(ex.stack + '\n');
process.exit(2);
}
77 changes: 77 additions & 0 deletions build/nightwatch.browserstack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
const nightwatch_config = {
src_folders : [ "test/e2e" ],

selenium : {
"start_process" : false,
"host" : "hub-cloud.browserstack.com",
"port" : 80
},

test_settings: {
default: {
desiredCapabilities: {
'build': 'nightwatch-browserstack',
'browserstack.user': process.env.BROWSERSTACK_USERNAME || 'BROWSERSTACK_USERNAME',
'browserstack.key': process.env.BROWSERSTACK_ACCESS_KEY || 'BROWSERSTACK_ACCESS_KEY',
'browserstack.debug': true,
'browserstack.local': true,
'browser': 'chrome'
}
},
bstack_edge: {
'desiredCapabilities': {
'browserName': 'MicrosoftEdge',
'os': 'Windows',
'os_version': '10',
'browser': 'Edge',
'resolution': '1024x768'
}
},
bstack_chrome: {
desiredCapabilities: {
'browserName': 'Chrome',
'os': 'Windows',
'os_version': '10',
'browser': 'Chrome',
'resolution': '1024x768'
}
},
bstack_firefox: {
desiredCapabilities: {
'browserName': 'Firefox',
'os': 'Windows',
'os_version': '7',
'browser': 'Firefox',
'resolution': '1024x768'
}
},
bstack_firefox_osx: {
desiredCapabilities: {
'browserName': 'Firefox',
'os': 'OS X',
'os_version': 'El Capitan',
'browser': 'Firefox',
'resolution': '1024x768'
}
},
bstack_safari: {
desiredCapabilities: {
'browserName': 'Safari',
'os': 'OS X',
'os_version': 'Sierra',
'browser': 'Safari',
'resolution': '1024x768'
}
}
}
};

// Code to copy seleniumhost/port into test settings
for (let i in nightwatch_config.test_settings) {
const config = nightwatch_config.test_settings[i];

config['selenium_host'] = nightwatch_config.selenium.host;
config['selenium_port'] = nightwatch_config.selenium.port;
}

module.exports = nightwatch_config;
Loading

0 comments on commit 610a6be

Please sign in to comment.