This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bind a computed property getter&setter to Vuex state&mutation | |
// install it with `Vue.use(VuexComputed)` after `Vue.use(Vuex, ...)` line | |
const VuexComputed = { | |
install (Vue) { | |
/** | |
* computed property factory | |
* @param {String} statePropName state property name in Vuex store | |
* @param {String} mutationType name of mutation updating state property | |
* @param {Number} [debounce=false] wait time argument passed to lodash debounce function | |
* @return {Object} the new computed property to inject |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cookies({ token: '42' , guestHash: 'sdjskdljskdjlkjsdUHYIUYHKJH', accountType: 'BUYER'}) | |
var encapsulatedData = val => ({ value: val, lastAccess: new Date()}) | |
var target = { 'token': null , 'guestHash': null, 'accountType': null } | |
//var authorizedKeys = Object.keys(target) | |
for (key in target) { | |
//we encapsulate the data with Date of its last access | |
target[key] = encapsulatedData(cookies(key)) | |
} | |
var handler = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Components used to build the final URL | |
* @type {Object} | |
*/ | |
const urlComponents = { | |
url: "http://myapi.mycompany.com/", | |
prefix: "api", | |
cart_uri: "/carts", | |
cart_active_uri: "/active", | |
cart_clean_uri: "/clean", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wdio | |
======================================================================================= | |
Selenium 2.0/webdriver protocol bindings implementation with helper commands in nodejs. | |
For a complete list of commands, visit http://webdriver.io/docs.html. | |
======================================================================================= | |
[16:02:56]: COMMAND POST "/wd/hub/session" | |
[16:02:56]: DATA {"desiredCapabilities":{"browserName":"chrome","version":"","javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"platform":"ANY","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"3.4.0","name":"webdriverio"}}} |