-
Notifications
You must be signed in to change notification settings - Fork 2.3k
ON HOLD. need to not have a PR that is 95 files... #5038
Conversation
091b5c9
to
fd23742
Compare
- Leave node scripts/errorTest.js commented out since it has something to do with the control flow where the exit code is not set. Also the breakpointhook.js file has issues we will need to address (Error: Cannot find module). - Add TODO block for slowHttpAndTimeout tests. - Update spec/errorTest to use const, let over var and async/await. - Add SELENIUM_PROMISE_MANAGER flag to plugins tests (currently missing) - Turn on the rest of test suite prior to updating to selenium 4 (basicConf using blocking proxy, unit tests, dependency tests, and typing tests) - Remove spec/errorTest/error_spec.js. Committed in angular@a13a2d3#diff-0b3f10a17756d2a4773c4d716805edf8 but not used.
- update browser.get method because of control flow.... and then it became whack-a-mole for q promises, wdpromises...fix one, two more type errors pop up. - remove q from protractor!!! huzzah. things are probably broken. (i'll have to do another review. i might not have done the debugger file) - will slowly add tests back into this test and pass the test suite.
Also these "approved" changes will need another lgtm. |
977cf70
to
c797148
Compare
- Removed jshint to reduce noise. We will not need this when switching suite to TypeScript. - Changed Protractor configuration files to be ".conf.js" for uniformity (I was trying to exclude ".conf.js" from jshint. After removing jshint, this decision seems pointless but cleaner?) - Cleaned up logging. Ran all the tests and most seem to pass. There are some issues where catching and unhandled promises throwing errors report slightly differently. - Fixed the driverProviderAttachSession test.
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.
Probably the most important files we need to code review is browser, plugins, launcher, runner, taskRunner
@@ -6,13 +6,11 @@ import {ProtractorBrowser} from './browser'; | |||
import {Locator} from './locators'; | |||
import {Logger} from './logger'; | |||
import {Ptor} from './ptor'; | |||
import * as helper from './util'; | |||
let breakpointHook = require('./breakpointhook.js'); |
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.
These are unused and deleting.
@@ -52,7 +52,7 @@ jobs: | |||
name: Selenium Start | |||
background: true | |||
command: | | |||
./node_modules/webdriver-manager/bin/webdriver-manager update | |||
./bin/webdriver-manager update |
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.
This was to just call the correct webdriver-manager in circle. We need these binaries for some tests.
@@ -41,7 +41,7 @@ gulp.task('tslint', function() { | |||
}); | |||
|
|||
gulp.task('lint', function(done) { | |||
runSequence('tslint', 'jshint', 'format:enforce', done); | |||
runSequence('tslint', 'format:enforce', done); |
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.
Most of these here are to clean up jshint and remove a not used done statement.
@@ -38,7 +38,7 @@ export class AttachSession extends DriverProvider { | |||
getNewDriver(): WebDriver { | |||
const httpClient = new http.HttpClient(this.config_.seleniumAddress); | |||
const executor = new http.Executor(httpClient); | |||
const newDriver = WebDriver.attachToSession(executor, this.config_.seleniumSessionId); | |||
const newDriver = WebDriver.attachToSession(executor, this.config_.seleniumSessionId, null); |
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.
Setting null here will ensure that the control flow option is set to null.
@@ -3,7 +3,7 @@ | |||
* It is responsible for setting up the account object, tearing | |||
* it down, and setting up the driver correctly. | |||
*/ | |||
import {Builder, Session, WebDriver} from 'selenium-webdriver'; | |||
import {Builder, WebDriver} from 'selenium-webdriver'; |
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.
Removed unused Session.
return null; | ||
}; | ||
$$ = function(search: string): ElementArrayFinder { | ||
$$ = function(_: string): ElementArrayFinder { |
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.
Minor clean up stuff. No biggie
* browser.get('page2'); // 'page2' gotten by restarted browser | ||
* | ||
* // Running against global browser, with control flow disabled | ||
* // Running against global browser | ||
* await browser.get('page1'); |
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.
Doc clean up. No more restartSync
and no more control flow.
.then(() => { | ||
if (this.bpClient) { | ||
return this.driver.controlFlow().execute(() => { | ||
return this.bpClient.setWaitEnabled(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.
No more control flow!
if (this.ignoreSynchronization) { | ||
return this.driver.navigate().refresh(); | ||
async refresh(opt_timeout?: number) { | ||
if (!await this.waitForAngularEnabled()) { |
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.
ignoreSynchronization
is problematic. It was previously noted as deprecated and I think we should remove this property.
{message: 'from teardown'} | ||
]); | ||
|
||
// TODO(selenium4): turn these on when we figure out the correct error message handling. |
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.
We need to talk about these and the following tests commented out. These are UnhandledPromiseRejectionWarnings. I'm not sure where to fix this but maybe for the next PR.
Closing this one too! |
to do with the control flow where the exit code is not set. Also the
breakpointhook.js file has issues we will need to address (Error: Cannot find
module).
(basicConf using blocking proxy, unit tests, dependency tests, and
typing tests)