-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[feature] Adding urlIs and urlContains to expectedConditions class #3237
Conversation
declared as a var baseUrlFromSpec - to prevent tests failure, just incase if anyone builds and runs protractor test app with different port number
This looks good to me. We should re-think how Expected Conditions and webdriver's @cnishina do you mind merging? |
@juliemr I do some contributions to until class of selenium too along with jleyba help. |
|
||
it('should have urlIs', function() { | ||
var baseUrlFromSpec = browser.baseUrl; | ||
expect(EC.urlIs('http://localhost:8081').call()).toBe(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Instead of using this url, we should use the one provided from the environment variables:
var env = require('../environment');
expect(EC.urlIs(env.baseUrl).call()).toBe(false);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we waiting for @juliemr to comment or Should I push in the commit ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cnishina is right, good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juliemr @cnishina
baseUrl: env.baseUrl + '/ng1/',
is what I am seeing in the conf file. Its same as what Craig have suggested. I get that appended with /ng1/ its makes tests look neat.
Refer: https://github.com/angular/protractor/blob/master/spec/basicConf.js#L21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the baseUrlFromSpec
is fine too. It just should not have the url as localhost. @manoj9788 please fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cnishina Just realized what you meant. Fixed the hardcoded url with env.baseUrl
Added a new feature UrlIs and UrlContains. Tests have passed and all check is done from my side.
happy to change if anything is needed.