Skip to content

Instantly share code, notes, and snippets.

View ishubin's full-sized avatar

Ivan Shubin ishubin

  • Booking.com
  • Netherlands
View GitHub Profile
<html>
<head>
<title>A Simple HTML Document</title>
</head>
<body>
<p>This is a very simple HTML document</p>
<p>It only has two paragraphs</p>
</body>
</html>
@ishubin
ishubin / galen.config
Created June 22, 2016 20:44
Galen dump with full page screenshot in chrome and firefox
# Range approximation
# ~~~~~~~~~~~~~~~~~~~~~
# Defines the approximation value for ranges when using "~" in galen page specs
# This value means how many pixels or percents should it take constructing a range
# e.g. if we define approximation as 5 then the following spec:
# height: ~ 50 px
# will actually be replaced by Galen with this:
# height: 45 to 55px
galen.range.approximation=3
@rule %{objectPatterns} should be visible on %{tagsVisible} but absent on %{tagsAbsent}
${objectPatterns}:
@on ${tagsVisible}
visible
@on ${tagsAbsent}
absent
= ProductPicture =
| productPicture should be visible on tablet-landscape, desktop but absent on tablet-portrait, tablet-small
@ishubin
ishubin / draft-v2-1.spec
Last active August 29, 2015 14:16
Draft for Galen Specs Language v2
#galen|spec|v2
# in the new spec lang v2 everything will be done based on indentation
# All sections will have their own structure
#
# Also we will get rid of '@@' symbols for importing, conditions, rules etc.
#
# Objects definition
# ~~~~~~~~~~~~~~~~~~
@@ import ../../meta/vars.spec
@@ import someSpec.js
======================================================================================
mobile-nav-item-header css .mmenu-opened .main-link.active
mobile-nav-item-header-2 css .mmenu-opened .main-link:nth-child(2).active
mobile-nav-item-header-3 css .mmenu-opened .main-link:nth-child(3).active
mobile-nav-item-header-4 css .mmenu-opened .main-link:nth-child(4).active
mobile-nav-item-list css .mmenu-opened .mmenu-super-submenu:not(.ng-hide)
======================================================================================
=================================================
incoming-message-* css .chat-incoming
outgoing-message-* css .chat-outgoing
=================================================
@ *
-------------------------------------------------
incoming-message-*
inside: parent 0px right
@ishubin
ishubin / gist:aae7827832c0c0e4f314
Last active August 29, 2015 14:07
galen issue #101 example 01
==================================================
current-chat css .mainarea
current-chat-incoming-message-* css .mainarea .chat-incoming
current-chat-outgoing-message-* css .mainarea .chat-outgoing
==================================================
@ *
current-chat-incoming-message-*
inside: current-chat 0px right
@@ if
user-profile-1
visible
@@ do
user-profile-1
component: specs/user-profile.spec
@@ end
@ishubin
ishubin / galen.JavaTestNG.concept.java
Last active August 29, 2015 14:00
A concept of using Galen together with TestNG
import net.mindengine.galen.browser.SeleniumBrowser;
import net.mindengine.galen.browser.Browser;
import net.mindengine.galen.page.Page;
import net.mindengine.galen.specs.page.PageSection;
import net.mindengine.galen.specs.reader.page.PageSpec;
import net.mindengine.galen.specs.reader.page.PageSpecReader;
import net.mindengine.galen.validation.PageValidation;
import net.mindengine.galen.validation.SectionValidation;
import net.mindengine.galen.validation.ValidationError;
import net.mindengine.galen.validation.ValidationListener;