This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix a missing await on createNextTaskRunner where the recursive call should be awaited and if there are no new tasks to still resolve the promise. Things were passing previously probably because we were running tasks out of sync. - Add in errorTest portion of the test suite - Turn on the angular2 and unit tests.
- Loading branch information
Showing
23 changed files
with
157 additions
and
153 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
describe('finding an element that does not exist', function() { | ||
it('should throw an error', function() { | ||
browser.get('index.html'); | ||
describe('finding an element that does not exist', () => { | ||
it('should throw an error', async () => { | ||
await browser.get('index.html'); | ||
element(by.binding('INVALID')); // greeting | ||
}); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// Use the external Chai As Promised to deal with resolving promises in | ||
// expectations. | ||
var chai = require('chai'); | ||
var chaiAsPromised = require('chai-as-promised'); | ||
const chai = require('chai'); | ||
const chaiAsPromised = require('chai-as-promised'); | ||
chai.use(chaiAsPromised); | ||
var expect = chai.expect; | ||
const expect = chai.expect; | ||
|
||
describe('protractor library', function() { | ||
it('should fail', function() { | ||
browser.get('index.html'); | ||
expect(browser.getTitle()).to.eventually.equal('INTENTIONALLY INCORRECT'); | ||
describe('protractor library', () => { | ||
it('should fail', async () => { | ||
await browser.get('index.html'); | ||
expect(await browser.getTitle()).to.equal('INTENTIONALLY INCORRECT'); | ||
}); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
describe('single failure spec1', function() { | ||
it('should fail expectation', function() { | ||
browser.get('index.html'); | ||
var greeting = element(by.binding('greeting')); | ||
expect(greeting.getText()).toEqual('INTENTIONALLY INCORRECT'); | ||
describe('single failure spec1', () => { | ||
it('should fail expectation', async () => { | ||
await browser.get('index.html'); | ||
const greeting = element(by.binding('greeting')); | ||
expect(await greeting.getText()).toEqual('INTENTIONALLY INCORRECT'); | ||
}); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
describe('single failure spec2', function() { | ||
it('should fail expectation', function() { | ||
browser.get('index.html'); | ||
var greeting = element(by.binding('greeting')); | ||
expect(greeting.getText()).toEqual('INTENTIONALLY INCORRECT'); | ||
describe('single failure spec2', () => { | ||
it('should fail expectation', async () => { | ||
await browser.get('index.html'); | ||
const greeting = element(by.binding('greeting')); | ||
expect(await greeting.getText()).toEqual('INTENTIONALLY INCORRECT'); | ||
}); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
describe('slow asynchronous events', function() { | ||
beforeEach(function() { | ||
browser.get('index.html#/async'); | ||
describe('slow asynchronous events', () => { | ||
beforeEach(async () => { | ||
await browser.get('index.html#/async'); | ||
}); | ||
|
||
it('waits for http calls', function() { | ||
var status = element(by.binding('slowHttpStatus')); | ||
var button = element(by.css('[ng-click="slowHttp()"]')); | ||
it('waits for http calls', async () => { | ||
const status = element(by.binding('slowHttpStatus')); | ||
const button = element(by.css('[ng-click="slowHttp()"]')); | ||
|
||
expect(status.getText()).toEqual('not started'); | ||
expect(await status.getText()).toEqual('not started'); | ||
|
||
button.click(); | ||
await button.click(); | ||
|
||
expect(status.getText()).toEqual('done'); | ||
expect(await status.getText()).toEqual('done'); | ||
}); | ||
|
||
it('waits for $timeout', function() { | ||
var status = element(by.binding('slowAngularTimeoutStatus')); | ||
var button = element(by.css('[ng-click="slowAngularTimeout()"]')); | ||
it('waits for $timeout', async () => { | ||
const status = element(by.binding('slowAngularTimeoutStatus')); | ||
const button = element(by.css('[ng-click="slowAngularTimeout()"]')); | ||
|
||
expect(status.getText()).toEqual('not started'); | ||
expect(await status.getText()).toEqual('not started'); | ||
|
||
button.click(); | ||
await button.click(); | ||
|
||
expect(status.getText()).toEqual('done'); | ||
expect(await status.getText()).toEqual('done'); | ||
}); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
describe('success spec', function() { | ||
it('should pass', function() { | ||
browser.get('index.html'); | ||
var greeting = element(by.binding('greeting')); | ||
expect(greeting.getText()).toEqual('Hiya'); | ||
describe('success spec', () => { | ||
it('should pass', async () => { | ||
await browser.get('index.html'); | ||
const greeting = element(by.binding('greeting')); | ||
expect(await greeting.getText()).toEqual('Hiya'); | ||
}); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
describe('timeout spec', function() { | ||
it('should timeout due to jasmine spec limit', function() { | ||
browser.get('index.html#/form'); | ||
describe('timeout spec', () => { | ||
it('should timeout due to jasmine spec limit', async () => { | ||
await browser.get('index.html#/form'); | ||
}, 1); | ||
}); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.