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

ON HOLD. need to not have a PR that is 95 files... #5038

Closed
wants to merge 4 commits into from

Conversation

cnishina
Copy link
Contributor

  • 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)

@cnishina cnishina force-pushed the misc branch 2 times, most recently from 091b5c9 to fd23742 Compare November 15, 2018 20:16
- 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.
@cnishina
Copy link
Contributor Author

Also these "approved" changes will need another lgtm.

@cnishina cnishina force-pushed the misc branch 4 times, most recently from 977cf70 to c797148 Compare November 22, 2018 00:28
- 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.
Copy link
Contributor Author

@cnishina cnishina left a 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');
Copy link
Contributor Author

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
Copy link
Contributor Author

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);
Copy link
Contributor Author

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);
Copy link
Contributor Author

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';
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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');
Copy link
Contributor Author

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);
Copy link
Contributor Author

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()) {
Copy link
Contributor Author

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.
Copy link
Contributor Author

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.

@cnishina cnishina changed the title chore(test): move error tests off of the control flow. ON HOLD. need to not have a PR that is 95 files... Nov 22, 2018
@cnishina
Copy link
Contributor Author

Closing this one too!

@cnishina cnishina closed this Dec 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants