refactor(): use const and let instead of var
This commit is contained in:

committed by
Victor Berchet

parent
73593d4bf3
commit
77ee27c59e
@ -11,19 +11,19 @@ import {$, browser} from 'protractor';
|
||||
import {promise} from 'selenium-webdriver';
|
||||
|
||||
describe('async', () => {
|
||||
var URL = 'all/playground/src/async/index.html';
|
||||
const URL = 'all/playground/src/async/index.html';
|
||||
|
||||
beforeEach(() => browser.get(URL));
|
||||
|
||||
it('should work with synchronous actions', () => {
|
||||
var increment = $('#increment');
|
||||
const increment = $('#increment');
|
||||
increment.$('.action').click();
|
||||
|
||||
expect(increment.$('.val').getText()).toEqual('1');
|
||||
});
|
||||
|
||||
it('should wait for asynchronous actions', () => {
|
||||
var timeout = $('#delayedIncrement');
|
||||
const timeout = $('#delayedIncrement');
|
||||
|
||||
// At this point, the async action is still pending, so the count should
|
||||
// still be 0.
|
||||
@ -37,7 +37,7 @@ describe('async', () => {
|
||||
});
|
||||
|
||||
it('should notice when asynchronous actions are cancelled', () => {
|
||||
var timeout = $('#delayedIncrement');
|
||||
const timeout = $('#delayedIncrement');
|
||||
|
||||
// At this point, the async action is still pending, so the count should
|
||||
// still be 0.
|
||||
@ -55,7 +55,7 @@ describe('async', () => {
|
||||
});
|
||||
|
||||
it('should wait for a series of asynchronous actions', () => {
|
||||
var timeout = $('#multiDelayedIncrements');
|
||||
const timeout = $('#multiDelayedIncrements');
|
||||
|
||||
// At this point, the async action is still pending, so the count should
|
||||
// still be 0.
|
||||
@ -69,14 +69,14 @@ describe('async', () => {
|
||||
});
|
||||
|
||||
it('should wait via frameworkStabilizer', () => {
|
||||
var whenAllStable = (): promise.Promise<any> => {
|
||||
const whenAllStable = (): promise.Promise<any> => {
|
||||
return browser.executeAsyncScript('window.frameworkStabilizers[0](arguments[0]);');
|
||||
};
|
||||
|
||||
// This disables protractor's wait mechanism
|
||||
browser.ignoreSynchronization = true;
|
||||
|
||||
var timeout = $('#multiDelayedIncrements');
|
||||
const timeout = $('#multiDelayedIncrements');
|
||||
|
||||
// At this point, the async action is still pending, so the count should
|
||||
// still be 0.
|
||||
|
Reference in New Issue
Block a user