Skip to content

Instantly share code, notes, and snippets.

View valentin-radulescu-hs's full-sized avatar

Valentin Radulescu valentin-radulescu-hs

View GitHub Profile
@valentin-radulescu-hs
valentin-radulescu-hs / launch.json
Last active June 19, 2017 15:22
Debug Jest with VSCode
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Jest",
@valentin-radulescu-hs
valentin-radulescu-hs / npm-link-react.md
Last active March 27, 2017 11:53
How to use the same React instance in your App and Shared Components repo
@valentin-radulescu-hs
valentin-radulescu-hs / looks-same.js
Created October 1, 2016 20:36
Mugshot diffing adapter
LooksSameAdapter.prototype = objectAssign({}, Differ, {
isEqual: function(img1, img2, callback) {
var options = objectAssign({}, this._options);
looksSame(img1, img2, options, callback);
},
createDiff: function(img1, img2, callback) {
var options = objectAssign({}, this._options, {
reference: img1,
@valentin-radulescu-hs
valentin-radulescu-hs / get-bounding-client-rect.js
Created October 1, 2016 20:33
Element coords method for Mugshot adapter
getBoundingClientRect: function(selector, callback) {
var webdriverio = this._webdriverio;
webdriverio.getElementSize(selector)
.then(function(size) {
webdriverio.getLocation(selector)
.then(function(location) {
var rect = {
@valentin-radulescu-hs
valentin-radulescu-hs / take-screenshot.js
Created October 1, 2016 20:31
Screenshot method for Mugshot adapter
takeScreenshot: function(callback) {
this._webdriverio.saveScreenshot()
.then(function(screenshot) {
callback(null, screenshot);
})
.catch(function(error) {
callback(error);
});
}
@valentin-radulescu-hs
valentin-radulescu-hs / visual-test.js
Created October 1, 2016 20:04
Writing a visual test for Mugshot
var expect = require('chai').expect;
var Mugshot = require('mugshot');
var WebdriverIOAdapter = require('mugshot-webdriverio');
var webdriverio = require('webdriverio');
describe('Buttons', function() {
var mugshot, webdriverioInstance;
before(function(done) {
var options = {
@valentin-radulescu-hs
valentin-radulescu-hs / lfs-install-commit.sh
Created October 1, 2016 19:50
Install GIT LFS, track a file and commit
brew install git-lfs
git lfs install
git lfs track "*.png"
git add baseline.png
git commit -m "Add baseline file"
git push origin master
@valentin-radulescu-hs
valentin-radulescu-hs / test.js
Created October 1, 2016 19:12
Example of a test written for Mocha
var expect = require('chai').expect;
describe('Dummy tests', function() {
it('should include number 2', function() {
expect([1, 2, 3]).to.include(2);
});
it('should include the string "foo"', function() {
expect('foobar').to.contain('foo');
});
@valentin-radulescu-hs
valentin-radulescu-hs / prefixer.js
Created October 1, 2015 12:36
PostCSS Selector Prefixer
var postcss = require('postcss');
module.exports = postcss.plugin('postcss-namespace-selectors',
namespaceSelectors);
function namespaceSelectors(options) {
var options = options || {};
return function(root) {
root.walkRules(function transformRule(rule) {

Available:

  • Ace Combat Assault Horizon - Enhanced Edition
  • Beware Planet Earth!
  • DeadCore
  • PAC-MAN™ Championship Edition DX+ All You Can Eat Edition Bundle
  • Platformines
  • Ridge Racer™ Unbounded Bundle
  • Star Trek
  • Coin Crypt