Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
chore(test): move altRoot and inferRoot test off of the control flow
Browse files Browse the repository at this point in the history
  • Loading branch information
cnishina committed Nov 7, 2018
1 parent 8af3be7 commit 07be0c7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ var passingTests = [
'node built/cli.js spec/basicConf.js',
// 'node built/cli.js spec/basicConf.js --useBlockingProxy',
// 'node built/cli.js spec/multiConf.js',
// 'node built/cli.js spec/altRootConf.js',
// 'node built/cli.js spec/inferRootConf.js',
'node built/cli.js spec/altRootConf.js',
'node built/cli.js spec/inferRootConf.js',
// 'node built/cli.js spec/onCleanUpAsyncReturnValueConf.js',
// 'node built/cli.js spec/onCleanUpNoReturnValueConf.js',
// 'node built/cli.js spec/onCleanUpSyncReturnValueConf.js',
Expand Down
22 changes: 11 additions & 11 deletions spec/altRoot/findelements_spec.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
describe('finding elements when ng-app is nested', function() {
beforeEach(function() {
browser.get('alt_root_index.html#/form');
describe('finding elements when ng-app is nested', () => {
beforeEach(async() => {
await browser.get('alt_root_index.html#/form');
});

it('should find an element by binding', function() {
var greeting = element(by.binding('{{greeting}}'));
it('should find an element by binding', async() => {
const greeting = element(by.binding('{{greeting}}'));

expect(greeting.getText()).toEqual('Hiya');
expect(await greeting.getText()).toEqual('Hiya');
});

it('should find elements outside of angular', function() {
var outside = element(by.id('outside-ng'));
var inside = element(by.id('inside-ng'));
it('should find elements outside of angular', async() => {
const outside = element(by.id('outside-ng'));
const inside = element(by.id('inside-ng'));

expect(outside.getText()).toEqual('{{1 + 2}}');
expect(inside.getText()).toEqual('3');
expect(await outside.getText()).toEqual('{{1 + 2}}');
expect(await inside.getText()).toEqual('3');
});
});
1 change: 1 addition & 0 deletions spec/altRootConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var env = require('./environment.js');
// Tests for an Angular app where ng-app is not on the body.
exports.config = {
seleniumAddress: env.seleniumAddress,
SELENIUM_PROMISE_MANAGER: false,

framework: 'jasmine',

Expand Down
1 change: 1 addition & 0 deletions spec/inferRootConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var env = require('./environment.js');
// Tests for an Angular app where ng-app is not on the body.
exports.config = {
seleniumAddress: env.seleniumAddress,
SELENIUM_PROMISE_MANAGER: false,

framework: 'jasmine',

Expand Down

0 comments on commit 07be0c7

Please sign in to comment.