Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
Add new test case to verify if angularjs is being loaded correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
  • Loading branch information
Bruno Bottazzini committed Sep 18, 2015
1 parent ff7f614 commit eb81a3a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test_case/02_angularjs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var expect = require('expect.js');

describe('Index Page', function(){
it('should be able to get angularjs scopped variable', function() {
// Get Index
browser.get('/');
browser.waitForAngular(); //Wait angularjs to load
/*
* This function will test if a repoUrl is NULL. (That means it is empty)
* This variable is scopped by angularjs and it is loaded null by default.
* If this scopped var is not found then we got an error on angularjs and the
* test will fail
*/
element(by.model('repoUrl')).evaluate('repoUrl').then(function(value) {
if (!value) {
return true;
} else {
return false;
}
});
});
});

0 comments on commit eb81a3a

Please sign in to comment.