1
1
describe ( "Favorites Tests" , function ( ) {
2
2
3
3
var page = require ( './Favorites' ) ;
4
+ var util = require ( 'util' ) ;
4
5
browser . get ( '/duckietv' ) ;
5
6
7
+ browser . manage ( ) . logs ( ) . get ( 'browser' ) . then ( function ( browserLog ) {
8
+ console . log ( 'browser log: ' + util . inspect ( browserLog ) ) ;
9
+ } ) ;
10
+
6
11
it ( "Should be showing the favorites page with the search box" , function ( ) {
7
12
browser . wait ( function ( ) {
8
13
if ( ! browser . isElementPresent ( page . getSeriesList ( ) ) ) {
@@ -20,38 +25,22 @@ describe("Favorites Tests", function() {
20
25
} ) ) . toEqual ( 11 ) ;
21
26
} ) ;
22
27
28
+ it ( "Should start adding 'Doctor Who 2005' when clicking it" , function ( ) {
29
+ page . getSearchResults ( ) . then ( function ( elements ) {
30
+ elements [ 1 ] . click ( ) ;
31
+ expect ( page . getDoctorWhoAddingEarmark ( ) . isDisplayed ( ) ) . toBeTruthy ( ) ;
23
32
24
- /*
25
- it("Should wipe the existing form when clicking 'wis formulier'", function() {
26
- page.wipeForm();
27
- expect(element.all(by.css("form fieldset table tbody tr td input[name=number]")).count()).toEqual(1);
28
-
29
- page.getSamples().then(function(samples) {
30
- element.all(by.binding('data.project.samples')).then(function(res) {
31
- expect(res.length).toEqual(0);
32
- });
33
- })
33
+ } ) ;
34
34
} ) ;
35
35
36
+ it ( "Should result in an 'added' check mark on 'Doctor Who 2005' has finished" , function ( ) {
37
+ page . getSearchResults ( ) . then ( function ( elements ) {
38
+ browser . wait ( function ( ) {
39
+ expect ( page . getDoctorWhoAddedEarmark ( ) . isDisplayed ( ) ) . toBeTruthy ( ) ;
40
+ } , 60000 ) ;
41
+ } ) ;
42
+ } ) ;
36
43
37
- var randomAmount = 5;
38
- it("should be able to add a random amount (" + randomAmount + ") of samples", function() {
39
-
40
- page.getClientReference().sendKeys('Automated ' + new Date().toDateString());
41
- page.getLocation().sendKeys('Samson-IT Rijswijk');
42
- page.getNote().sendKeys("Automated test project " + new Date().toString());
43
-
44
- for (var i = 0; i < randomAmount; i++) {
45
- page.addSample(i, page.getRandomSampleType());
46
- if (i < randomAmount - 1) {
47
- page.getAddSampleButton().click();
48
- }
49
- }
50
-
51
-
52
- })
53
-
54
- */
55
44
56
45
57
46
} ) ;
0 commit comments