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.
chore(syntax): update all other specs to the new syntax
- Loading branch information
Showing
7 changed files
with
28 additions
and
63 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,18 +1,6 @@ | ||
describe('tests that use the shortcuts set by the onPrepare in the config', | ||
describe('onPrepare function in the config', | ||
function() { | ||
beforeEach(function() { | ||
// ptor is in the globals thanks to the onPrepare callback function in the | ||
// config. | ||
ptor.get('app/index.html#/form'); | ||
}); | ||
|
||
it('should find an element using elem instead of findElement', function() { | ||
var greeting = ptor.elem(protractor.By.binding('{{greeting}}')); | ||
expect(greeting.getText()).toEqual('Hiya'); | ||
}); | ||
|
||
it('should find an element using the global by function', function() { | ||
var greeting = ptor.elem(by.binding('{{greeting}}')); | ||
expect(greeting.getText()).toEqual('Hiya'); | ||
it('should have a special variable set in onPrepare', function() { | ||
expect(browser.params.password).toEqual('12345'); | ||
}); | ||
}); |
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 @@ | ||
var ptor = protractor.getInstance(); | ||
ptor.elem = ptor.findElement; | ||
ptor.elems = ptor.findElements; | ||
global.by = protractor.By; | ||
global.ptor = ptor; | ||
browser.params.password = '12345'; |
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