Skip to content

Instantly share code, notes, and snippets.

View ygerasimov's full-sized avatar

Yuriy Gerasimov ygerasimov

View GitHub Profile
<?php
use Diffy\Diffy;
use Diffy\Screenshot;
use Diffy\Diff;
// https://pantheon.io/docs/guides/quicksilver/variables
$pantheon_environment = $_ENV['environment'];
// Not sure how these are build for your site.
if (window.location.hash == '#language-switcher') {
jQuery('.language-select').click();
}
if (window.location.hash == '#second-slide') {
jQuery('#slick-slide-control01').click();
}
@ygerasimov
ygerasimov / runCheck.sh
Created April 21, 2020 13:46
Diffy bitbucket compare script
#!/usr/bin/env bash
echo "==================================================="
echo "========== Run diffy compare and Bitbucket check =="
echo "==================================================="
API_KEY="$1"
PROJECT_ID=1194
DIFFY_HOST="https://app.diffy.website"
@ygerasimov
ygerasimov / bitbucket-pipelines.yml
Created April 21, 2020 13:44
Diffy Bitbucket integration pipeline
image: php:7.1.1
pipelines:
default:
- step:
name: Diffy check
max-time: 10 #minutes
caches:
- composer
script:
- apt-get update && apt-get install -y unzip
{#
/**
* @file
* Theme override for a breadcrumb trail.
*
* Available variables:
* - breadcrumb: Breadcrumb trail items.
*/
#}
@ygerasimov
ygerasimov / css_regression_testing.md
Created January 28, 2020 23:20 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@ygerasimov
ygerasimov / AuthCommand.php
Created January 15, 2020 19:19
Diffy CLI auth:login command
<?php
namespace DiffyCli\Commands;
use Diffy\Diffy;
use DiffyCli\Config;
class AuthCommand extends \Robo\Tasks
{
/**
@ygerasimov
ygerasimov / OrderAddressLabelsTest.php
Created December 3, 2019 16:32
Attempt to have a BrowserTest based on installing a profile from existing configuration
<?php
namespace Drupal\Tests\mymodule_core\Unit;
use CommerceGuys\Addressing\AddressFormat\AddressFormatRepository;
use Drupal\Core\Config\FileStorage;
use Drupal\Core\Database\Database;
use Drupal\Core\DrupalKernel;
use Drupal\Core\Installer\Form\SelectProfileForm;
use Drupal\Core\Site\Settings;
@ygerasimov
ygerasimov / .platform.app.yaml
Last active June 18, 2019 00:22
Umami Diffy Platform.sh triggering hooks.
hooks:
# The deploy hook runs after your application has been deployed and started.
deploy: |
cd web
drush si demo_umami -y --account-pass=nKraDzZq8ZUq747Bn9PaXAB83 --account-mail="[email protected]"
drush cron
drush status > sites/default/files/drush-status.txt
php ../scripts/diffy-visual-testing.php
@ygerasimov
ygerasimov / patches.json
Created June 13, 2019 23:36
Umami distro composer.json patches section.
"patches": {
"drupal/core": {
"Fix styling of Umami for layout builder": "https://www.drupal.org/files/issues/2019-04-24/ootb-layout-builder-buttons-checkbox-3044366-38.patch"
}
}