Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Sebastian Golasch asciidisco

🏠
Working from home
View GitHub Profile
@asciidisco
asciidisco / gist:8731237
Last active Aug 29, 2015
Check existence of attributes with Dalek
View gist:8731237
test.execute(function () {
var nl = document.querySelectorAll(".menubar a[href]");
var as = Array.prototype.slice.call(nl);
as.foreach(function (el) {
var attr = el.getAttribute('data-tracking-id');
this.assert.ok((attr !== null), 'Attribute exists for:' + el.outerHTML);
}.bind(this))
})
View dalek_require_args.js
// given that the Logout function looks something like this:
// contents of functions.js
module.exports = {
Logout: function (aVar, bVar, test) {
console.log('Im logging the 2nd argument, just for fun:', bVar);
test
.click('#logout' + aVar)
.done();
}
};
@asciidisco
asciidisco / iap.js
Created Mar 11, 2014
Integrated Appium Server
View iap.js
// using appium 0.9.something it was paossible to do this
// appium server (this file doesn't exist anymore)
var appium = require('appium/server');
// some args
var appiumArgs = {
app: null,
ipa: null,
quiet: true,
@asciidisco
asciidisco / dcu.js
Created Mar 28, 2014
Dalek/Chosen urghhh
View dcu.js
'use strict';
module.exports = {
'Can fill out form': function (test) {
test.open('http://tentoring.com/')
.type('#name', 'Sebastian Golasch')
.type('#email', 'public@asciidisco.com')
.execute(function () {
// use "in Browser" javascript to select the items
@asciidisco
asciidisco / collect_links.js
Created Mar 30, 2014
This code is not tested, but at least should give you an inspiration on how to solve your issue.
View collect_links.js
View LBH
Headline: Local Bower Registry
Description: As a developer, I want to be able to maintain & version private modules & dependencies in the frontend
Estimation: 8SP
Acceptance criteria:
∆ A local bower registry is up & running
∆ The registry can be accessed from the developer machine (onsite & from home office)
∆ The CI server can access the registry
∆ Modules can be uploaded
∆ Modules are stored in every version ever published
View dalek_kast.js
var myLoopedFn = function (test) {
test.open('http://google.de')
.click('#hugendubel')
.assert.text('#hugendubel', 'Steinlaus')
.wait(2000)
.assert.text('#hugendubel', 'Weinlaus')
.done();
};
var myObj = {};
View dalek_dom.js
// how to install/first steps http://dalekjs.com/pages/getStarted.html#install
// how to use it within grunt: https://www.npmjs.org/package/grunt-dalek
module.exports = {
'Can access the DOM': function (test) {
test.open('http://dalekjs.com/')
// the execute method executes JavaScript within a browser & also has
// full access to the DOM
.execute(function (message) {
// the "data" method is a simple wrapper around a key/value store
View keybase.md

Keybase proof

I hereby claim:

  • I am asciidisco on github.
  • I am asciidisco (https://keybase.io/asciidisco) on keybase.
  • I have a public key whose fingerprint is 6522 51A3 ED08 44B6 F854 31BE C359 803B ACA6 CFD7

To claim this, I am signing this object: