forked from angular/protractor
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(test): update provider and capabilities tests off of the contro…
…l flow (angular#5021)
- Loading branch information
Showing
6 changed files
with
37 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
describe('direct connect', function() { | ||
it('should instantiate and run', function() { | ||
var usernameInput = element(by.model('username')); | ||
var name = element(by.binding('username')); | ||
describe('direct connect', () => { | ||
it('should instantiate and run', async() => { | ||
const usernameInput = element(by.model('username')); | ||
const name = element(by.binding('username')); | ||
|
||
browser.get('index.html#/form'); | ||
await browser.get('index.html#/form'); | ||
|
||
expect(name.getText()).toEqual('Anon'); | ||
expect(await name.getText()).toEqual('Anon'); | ||
|
||
usernameInput.clear(); | ||
usernameInput.sendKeys('Jane'); | ||
expect(name.getText()).toEqual('Jane'); | ||
await usernameInput.clear(); | ||
await usernameInput.sendKeys('Jane'); | ||
expect(await name.getText()).toEqual('Jane'); | ||
}); | ||
}); |
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,17 +1,17 @@ | ||
describe('local driver provider', function() { | ||
var URL = '/ng2/#/async'; | ||
describe('local driver provider', () => { | ||
const URL = '/ng2/#/async'; | ||
|
||
it('should get a page and find an element', function() { | ||
browser.get(URL); | ||
var increment = $('#increment'); | ||
expect(increment).toBeDefined(); | ||
it('should get a page and find an element', async() => { | ||
await browser.get(URL); | ||
const increment = $('#increment'); | ||
expect(await increment.isPresent()).toBeDefined(); | ||
}); | ||
|
||
it('should get a forked instance, and find an element', function() { | ||
browser.get(URL); | ||
var browser2 = browser.forkNewDriverInstance(); | ||
browser2.get(URL); | ||
var increment = browser2.$('#increment'); | ||
expect(increment).toBeDefined(); | ||
it('should get a forked instance, and find an element', async() => { | ||
await browser.get(URL); | ||
const browser2 = await browser.forkNewDriverInstance().ready; | ||
await browser2.get(URL); | ||
const increment = browser2.$('#increment'); | ||
expect(await increment.isPresent()).toBeDefined(); | ||
}); | ||
}); |
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