Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 79184ff

Browse files
cnishinaheathkit
authored andcommitted
chore(specs): use browser.baseUrl instead of env (#3498)
1 parent 385b26c commit 79184ff

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

spec/basic/expected_conditions_spec.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var EC = protractor.ExpectedConditions;
2-
var env = require('../environment');
32

43
describe('expected conditions', function() {
54
beforeEach(function() {
@@ -75,10 +74,10 @@ describe('expected conditions', function() {
7574

7675
it('should have urlIs', function() {
7776
var baseUrlFromSpec = browser.baseUrl;
78-
expect(EC.urlIs(env.baseUrl).call()).toBe(false);
77+
expect(EC.urlIs(browser.baseUrl).call()).toBe(false);
7978
expect(EC.urlIs(baseUrlFromSpec+'index.html#/form').call()).toBe(true);
8079
});
81-
80+
8281
it('should have elementToBeClickable', function() {
8382
var invalidIsClickable = EC.elementToBeClickable($('#INVALID'));
8483
var buttonIsClickable = EC.elementToBeClickable($('#disabledButton'));

spec/basic/navigation_spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ describe('navigation', function() {
4747
it('should navigate back and forward properly from link', function() {
4848
element(by.linkText('repeater')).click();
4949
expect(browser.getCurrentUrl()).
50-
toEqual(env.baseUrl + '/ng1/index.html#/repeater');
50+
toEqual(browser.baseUrl + 'index.html#/repeater');
5151

5252
browser.navigate().back();
5353
expect(browser.getCurrentUrl()).
54-
toEqual(env.baseUrl + '/ng1/index.html#/form');
54+
toEqual(browser.baseUrl + 'index.html#/form');
5555

5656
browser.navigate().forward();
5757
expect(browser.getCurrentUrl()).
58-
toEqual(env.baseUrl + '/ng1/index.html#/repeater');
58+
toEqual(browser.baseUrl + 'index.html#/repeater');
5959
});
6060
});

0 commit comments

Comments
 (0)