This is a demo to show how simple it is to create UI tests with SeleniumHQ based on Zalenium.
To try it out you need Python3 and virtualenv and Docker. Download/clone this repo and run run-tests.sh
.
# requirements | |
sudo apt-get install -qyy dconf-tools | |
# careful, if you already have custom hotkeys this commands will overwrite the first 7 ... | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name "'SouthWest(7)0,1080'" | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding "'<Primary><Super>a'" | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command "'wmctrl -r :ACTIVE: -e 7,0,1080,-1,-1'" | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/name "'SouthEast(9)1920,1080'" | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/binding "'<Primary><Super>d'" | |
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/command "'wmctrl -r :ACTIVE: -e 9,1920,1080,-1,-1'" |
# -*- mode: python -*- | |
# | |
# policy for modules to build, options are: | |
# - all: build everything requested | |
# - updated: build only modules that have changed | |
# - updated-deps: build modules that have changed, or their dependencies | |
# have changed. | |
build_policy = 'updated' | |
# moduleset settings: |
/** | |
* Actively wait for an element to disappear either by becoming | |
* invisible or by not being present. Wait up to specTimeoutMs | |
* ignoring useless webdriver errors like StaleElementError. | |
* | |
* Usage: | |
* Add `require('./waitAbsent.js');` in your onPrepare block or file. | |
* | |
* @example | |
* expect($('.some-html-class').waitAbsent()).toBeTruthy(); |
require 'rspec' | |
require 'stringio' | |
# Custom matcher to test text written to standard output and standard error | |
# | |
# @example | |
# expect { $stderr.puts "Some random error" }.to write(/Some.* error/).to(:stderr) | |
# | |
# @example | |
# expect { $stderr.puts "Some specific error" }.to write('Some specific error').to(:stderr) |
- Returns? | |
module Module | |
def const_missing(name) | |
"sorry i don't have #{name} yet" | |
end | |
end | |
Untitled #=> ? | |
Monkeys #=> ? | |
=> | |
You get `TypeError: Module is not a module` before reaching Untitled code |
# Ubuntu 18:04 | |
FROM registry.opensource.zalan.do/stups/ubuntu:latest | |
#============================== | |
# Locale and encoding settings | |
#============================== | |
# Note: LANGUAGE="${LANG_WHICH}_${LANG_WHERE}.${ENCODING}" | |
ENV LANG_WHICH="en" \ | |
LANG_WHERE="US" \ | |
LOCALE_TAG="en_US" \ |
require 'clipboard' #gem install clipboard | |
def cbcopy(value) | |
Clipboard.copy value unless value.empty? | |
flash_message = value.empty? ? "Sorry, nothing to copy" : "Copied to clipboard" | |
print "# #{flash_message}: " | |
puts %Q("#{value}") | |
end | |
# Copy last result to the Clipboard |
////////////////////////// | |
// Some Custom Matchers // | |
////////////////////////// | |
"use strict"; | |
// Usage: | |
// Add `require('./customMatchers.js');` in your onPrepare block or file | |
// Config | |
var specTimeoutMs = 10000; // 10 secs |
This is a demo to show how simple it is to create UI tests with SeleniumHQ based on Zalenium.
To try it out you need Python3 and virtualenv and Docker. Download/clone this repo and run run-tests.sh
.
$ ./gradlew fullAcceptanceTest | |
:fullAcceptanceTest | |
:nakadi:clean | |
:nakadi:compileJava | |
Note: /home/user/forks/nakadi/src/main/java/org/zalando/nakadi/config/JsonConfig.java uses or overrides a deprecated API. | |
Note: Recompile with -Xlint:deprecation for details. | |
Note: Some input files use unchecked or unsafe operations. | |
Note: Recompile with -Xlint:unchecked for details. | |
:nakadi:compileGroovy UP-TO-DATE | |
:nakadi:processResources |