commit | author | age
|
0bd33d
|
1 |
module.exports = { |
JK |
2 |
'Stop name autocompletion': function(browser) { |
|
3 |
browser.url('http://127.0.0.1:8080/'); |
|
4 |
browser.getTitle(function(title) { |
|
5 |
this.assert.ok(title.includes('TTSS')); |
|
6 |
}); |
|
7 |
|
|
8 |
var autocomplete_pairs = [ |
|
9 |
['baga', 'Teatr Bagatela'], |
|
10 |
['d g', 'Dworzec Główny'], |
|
11 |
['świę', 'Plac Wszystkich Świętych'], |
|
12 |
['św g', 'Św. Gertrudy'], |
|
13 |
['św.g', 'Św. Gertrudy'], |
|
14 |
]; |
|
15 |
autocomplete_pairs.forEach(function(value) { |
|
16 |
browser.clearValue('#stop-name'); |
|
17 |
browser.setValue('#stop-name', value[0]); |
|
18 |
browser.pause(200); |
|
19 |
browser.expect.element('#stop-name-autocomplete > option:first-child').to.be.present.before(1000); |
|
20 |
browser.expect.element('#stop-name-autocomplete > option:first-child').text.to.include(value[1]).before(1000); |
|
21 |
}); |
|
22 |
}, |
|
23 |
'Translation engine': function(browser) { |
|
24 |
browser.url('http://127.0.0.1:8080/#!en'); |
|
25 |
browser.pause(200); |
|
26 |
browser.getTitle(function(title) { |
|
27 |
this.assert.ok(title.includes('departures')); |
|
28 |
}); |
|
29 |
browser.expect.element('[data-translate=header_line]').text.to.include('Line'); |
|
30 |
}, |
|
31 |
}; |