X Tutup
Skip to content

chore(test): migrate Dart tests to package:test#7111

Closed
juliemr wants to merge 1 commit intoangular:masterfrom
juliemr:guinness2-2016-b
Closed

chore(test): migrate Dart tests to package:test#7111
juliemr wants to merge 1 commit intoangular:masterfrom
juliemr:guinness2-2016-b

Conversation

@juliemr
Copy link
Copy Markdown
Member

@juliemr juliemr commented Feb 16, 2016

Instead of running with karma and the karma-dart shim, run dart
tests directly using the new package:test runner. This migrates
away from package:unittest.

Fixes a couple tests, mostly associated with depending on absolute
URLs or editing the test providers after an injector had already
been created.

Remove karma-dart and associated files. Change gupfiles to run tests
via pub run test instead.

@juliemr juliemr added type: chore action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 16, 2016
@juliemr juliemr self-assigned this Feb 16, 2016
@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Feb 16, 2016

FYI folks interesting in dart test: @kevmoo @nex3 @kegluneq

@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Feb 16, 2016

Transformer tests are failing but will pass after #6896 is merged.

@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Feb 16, 2016

@vicb do you have time to review this?

@juliemr juliemr assigned vicb and unassigned juliemr Feb 16, 2016
@juliemr juliemr force-pushed the guinness2-2016-b branch 4 times, most recently from 7845154 to 0b492ac Compare February 17, 2016 17:17
gulpfile.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this expected to remove build.dart.material.css ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - @jelbourn said that we don't care about the material tests anymore, so to speed things up it should be OK to remove this.

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Feb 17, 2016

@juliemr most of the changes look good to me. However there are some Travis errors, are those expected ?

@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Feb 17, 2016

The dev.js travis error is occuring for all PRs, as far as I can tell. The Transformer tests are failing but will pass after #6896 is merged (we should merge that first and then I'll verify).

@juliemr juliemr force-pushed the guinness2-2016-b branch from 0b492ac to 0151d09 Compare March 1, 2016 21:53
@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Mar 1, 2016

I've rebased on top of the transformer tests, which are now in.

@juliemr juliemr force-pushed the guinness2-2016-b branch 3 times, most recently from 3469c21 to 7b5c05a Compare March 3, 2016 06:31
@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Mar 3, 2016

Sigh. OK, so here's the current status - the test.server.dart gulp task is failing on Travis but not on my local machine. It looks like the problem is that I had to update the version of the pub package webdriver that we depend on (because the old one explicitly depending on a conflicting version of package test, I think), and the newer webdriver can't use Dartium because the chrome-version of Dartium is very old. Now I'm trying to use normal Chrome on Travis, but it times out for unknown reasons.

Versions are hard :(

@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Mar 3, 2016

Precisely - the pub spec incompatibility is:

webdriver: ^0.9.0 depends on matcher: ^0.11.4. This is an older version of matcher which is tied to versions of test: <0.12.0.

@juliemr juliemr force-pushed the guinness2-2016-b branch 2 times, most recently from 8d27e07 to ed552a2 Compare March 3, 2016 07:55
@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Mar 3, 2016

Found a workaround! @vicb would you mind taking another look, and then I'll squash the commits?

@zoechi
Copy link
Copy Markdown
Contributor

zoechi commented Mar 3, 2016

Why are you using WebDriver 0.9.x instead of 1.0.x? matcher: '^0.12.0+1'

@zoechi
Copy link
Copy Markdown
Contributor

zoechi commented Mar 3, 2016

There is webdriver: '^0.9.0 in dependencies in modules/benchpress/pubspec.yaml which means >=0.9.0 <0.10.0. For versions < 1.0.0 ^ means include all versions with the same minor version. For versions > 1.0.0 it means include all versions with the same major version. Therefore if you update the webdriver dependency to webdriver: '^1.0.0, you shouldn't need the overrides and you'd get the newest webdriver.

@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Mar 3, 2016

@zoechi but we can't use the newest webdriver, because it's incompatible with Dartium.

@zoechi
Copy link
Copy Markdown
Contributor

zoechi commented Mar 3, 2016

I see, didn't know that. That's why I asked "why you are 0.9.x instead of 1.0.x". Sorry for the noise.

@juliemr juliemr force-pushed the guinness2-2016-b branch from 1a4743c to 321dcdc Compare March 3, 2016 18:21
@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Mar 3, 2016

I made a separate issue for upgrading benchpress's webdriver: #7404

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the test runner mess with the url?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - it adds the dart test runner's test tmp directory in front of it.

@juliemr juliemr force-pushed the guinness2-2016-b branch 3 times, most recently from ddcbf4b to ec46ead Compare March 3, 2016 22:11
@IgorMinar IgorMinar added pr_state: LGTM action: merge The PR is ready for merge by the caretaker labels Mar 3, 2016
@mary-poppins
Copy link
Copy Markdown

Merging PR #7111 on behalf of @vikerman to branch presubmit-vikerman-pr-7111.

@kevmoo
Copy link
Copy Markdown
Contributor

kevmoo commented Mar 3, 2016

@IgorMinar @juliemr FYI – I think we could/should remove unittest from the root pubspec – it doesn't appear to be used anywhere now...

@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Mar 3, 2016

@kevmoo it is still used by some transformer tests.

@kevmoo
Copy link
Copy Markdown
Contributor

kevmoo commented Mar 3, 2016

@kevmoo it is still used by some transformer tests.

@juliemr Yes, but from within the package. Actually, I don't see any need for anything but the 'guiness2' package in the root pubpsec.yaml file

@juliemr
Copy link
Copy Markdown
Member Author

juliemr commented Mar 3, 2016

Due to the way that the build steps copy the pubspecs around (which I admit, I do not fully understand) that didn't work.

Instead of running with karma and the karma-dart shim, run dart
tests directly using the new package:test runner. This migrates
away from package:unittest.

Fixes a couple tests, mostly associated with depending on absolute
URLs or editing the test providers after an injector had already
been created.

Remove karma-dart and associated files. Change gupfiles to run tests
via `pub run test` instead.
@vikerman
Copy link
Copy Markdown
Contributor

vikerman commented Mar 4, 2016

Merged to master manually

@vikerman vikerman closed this Mar 4, 2016
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker action: review The PR is still awaiting reviews from at least one requested reviewer cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

X Tutup