This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| testcase('my-test', () => { | |
| watch(async () => { | |
| if(await _isVisible(_div('cookies'))) { | |
| await _click(_button('Agree')) | |
| } | |
| }) | |
| step('login', async () => { | |
| //... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Page("/todos") | |
| export class TodoPage { | |
| @Elements(TodoListEntryElement) | |
| todos: TodoListEntryElement; | |
| } | |
| @Element("ul.todo-list li") | |
| export class TodoListEntryElement implements PageElement { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface FormBuilder { | |
| /* ... */ | |
| group(controlsConfig: {[key: string]: any}, extra?: {[key: string]: any}) : FormGroup | |
| /* ... */ | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class Optional<T> { | |
| constructor(private value:T) {} | |
| static empty<T>():Optional<T> { | |
| return new Optional(undefined); | |
| } | |
| filter(filter:(o:T)=>boolean):Optional<T> { | |
| if(this.isPresent() && filter(this.value)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var express = require('express'), | |
| request = require('request'); | |
| var app = express(); | |
| app.use(express.static('app/static')); | |
| app.use('/service/*', function(req, res) { | |
| 'use strict'; | |
| var url = 'http://localhost:8080/viewer2/service' + req.url; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs'); | |
| var _ = require('underscore'); | |
| var Promise = require('promise'); | |
| var filepath = 'PATH_TO_JAVA_CLASS'; | |
| var readFilePromise = new Promise(function (resolve, reject) { | |
| fs.readFile(filepath, "UTF-8", function(err, data) { | |
| if(err ) { | |
| console.log(err); |