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.
- Loading branch information
Showing
7 changed files
with
83 additions
and
8 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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
describe('configuration with no globals', function() { | ||
var URL = '/ng2/#/async'; | ||
|
||
it('should have objects belonging to protractor namespace', function() { | ||
expect(typeof protractor).toEqual('object'); | ||
expect(typeof protractor.browser).toEqual('object'); | ||
expect(typeof protractor.$).toEqual('function'); | ||
expect(typeof protractor.$$).toEqual('function'); | ||
expect(typeof protractor.element).toEqual('function'); | ||
expect(typeof protractor.by).toEqual('object'); | ||
expect(typeof protractor.By).toEqual('object'); | ||
}); | ||
|
||
it('should not have other globals', function() { | ||
expect(typeof browser).toEqual('undefined'); | ||
expect(typeof $).toEqual('undefined'); | ||
expect(typeof $$).toEqual('undefined'); | ||
expect(typeof element).toEqual('undefined'); | ||
expect(typeof by).toEqual('undefined'); | ||
expect(typeof By).toEqual('undefined'); | ||
}); | ||
|
||
it('should be able to use methods under the protractor namespace', function() { | ||
protractor.browser.get(URL); | ||
var increment = protractor.$('#increment'); | ||
expect(typeof increment).toEqual('object'); | ||
increment.$('.action').click(); | ||
expect(increment.$('.val').getText()).toEqual('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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var env = require('./environment'); | ||
|
||
// This is the configuration for a smoke test for an Angular2 application. | ||
exports.config = { | ||
|
||
seleniumAddress: env.seleniumAddress, | ||
|
||
framework: 'jasmine', | ||
|
||
specs: [ | ||
'noGlobals/noGlobals_spec.js' | ||
], | ||
|
||
noGlobals: true, | ||
|
||
capabilities: env.capabilities, | ||
|
||
baseUrl: env.baseUrl, | ||
|
||
useAllAngular2AppRoots: true | ||
}; |