Puppeteer: NodeJS browser automation

Puppeteer is a Node library which provides a high-level API to control headless Chrome over the DevTools Protocol. It can also be configured to use full non-headless Chrome. Its demo is worth thousand words. API Documentation covers all the aspects of browser emulation/handling I could think of. Whether it will be a replacement of NightwatchJS or a sub-component in the current end-to-end stack - fun times of trials & errors will tell....

November 28, 2017 · 1 min · anvyst

Some useful links for JS coding

Few nice things to use in close future: Hoodie A fast, simple backend as a service for your web apps, Open Source and free. No need to write server-side code or database schemas. Makes building offline-capable software a breeze. GREENKEEPER.IO Get safety & consistency with real-time monitoring and automatic upates for npm dependencies.

September 21, 2017 · 1 min · anvyst

Reduce CSS bundle size by cutting class names

This is pure awesomeness! Gajus Kuizinas went beyond asset minifiers which resulted from 140KB to 53KB CSS size decrease. There is one thing a minifier cannot do – change the selector names. This is because a CSS minifier does not control the HTML output. Meanwhile, CSS names can get long. All the details are in the post worth reading, if still think that webpack can only merge JS files in a bundle....

September 5, 2017 · 1 min · anvyst

JSData as ember-data alternative

Weekends are normally for RnD time, so this weekend’s topic - standardisation of front/backend communication. Considering backend as API-only and fully offloading the rendering part to JavaScript frameworks, EmberJS had a really nice concept of ember-data that acted in between rendering components and backend objects received via API. JSData can be an alternative to this: SData is a framework-agnostic, datastore-agnostic ORM (Object-Relational Mapper) for Node.js and the Browser. Adapters allow JSData to connect to various data sources such as Firebase, MySql, MongoDB, REST API, etc....

September 3, 2017 · 1 min · anvyst

CakePHP with NightwatchJS on Travis CI

After the release of Headless Chrome browser (v59+) most of the automation tools slowly started reducing the usage of Selenium, by replacing it with the combination of chromedriver + chrome/chromium pre-installed browser (like Travis CI does on their images). As a replacement, I’ve tried playing around with the combination of Karma/Chai to test JavaScript functionality of certain projects we have in Qobo. It only introduced the unit test approach towards the code base....

August 31, 2017 · 3 min · anvyst

ES2015: Refresher on modern JavaScript

A quick lookup on modern JavaScript and whole Babel thing. This will be a start of a small research on splitting frontend and backend implementation for CakePHP framework and its plugin. Babel JS: ES2015 ES6: Features Webpack - Confusing Parts Babel JS: Loaders & Plugins Jest for Webpack * “Getting started with Babel” from John Arstingstall CakePHP and Webpack plugin

June 22, 2017 · 1 min · anvyst

JavaScript function call vs arrow functions

Greate quote from Agile Software Craftmanship describing some of the short-cuts in programming languages. Classical example - function call versus arrow functions. “…the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code.Because this ratio is so high, we want the reading of code to be easy even if it makes the writing harder....

August 24, 2016 · 1 min · anvyst

JavaScript Regexp 101.

Great article on JavaScript Regular expressions from 2014.

August 18, 2014 · 1 min · anvyst