Skip to content

build: run overlay and text-field tests with Bazel - #13637

Merged
josephperrott merged 1 commit into
angular:masterfrom
devversion:build/run-overlay-text-field-tests-bazel
Oct 16, 2018
Merged

build: run overlay and text-field tests with Bazel#13637
josephperrott merged 1 commit into
angular:masterfrom
devversion:build/run-overlay-text-field-tests-bazel

Conversation

@devversion

Copy link
Copy Markdown
Member

* Implements a small and simple workaround that allows us to run the overlay and text-field unit tests through Bazel. Works around issue: https://github.com/bazelbuild/rules_typescript/issues/301
@googlebotgooglebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 16, 2018
@devversiondevversion added pr: merge safe target: patch This PR is targeted for the next patch release labels Oct 16, 2018
@devversion

devversion commented Oct 16, 2018

Copy link
Copy Markdown
MemberAuthor

@jelbourn I'm not a big fan of having such a workaround, but we need something like this in order to move on with Bazel for src/lib. The workaround is pretty short and I'll be watching the actual GitHub issue.

Maybe we can also somehow prioritize that issue within the Bazel Typescript rules.

@jelbournjelbourn left a comment

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.

I thought that there was also an issue with the test suite where it doesn't let you pass browser flags, which we use to set the winder to 1024x768 so that the geometry values are consistent

Comment threadtools/defaults.bzl
js_template="var cssElement = document.createElement('style'); \
cssElement.type = 'text/css'; \
cssElement.innerHTML = '$$css_content'; \
document.head.appendChild(cssElement);"

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.

Could this be a separate file that's included in the rule rather than creating it on-demand with a genrule?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Not entirely sure what you mean? A separate rule for generating this file?

Not sure if that would be worth the effort.

This is just a matrix function, so we don't have access to a context.

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.

I mean creating a real js file like overlay-test-style-include.js that's added to the deps of just the overlay rule?

@devversiondevversionOct 16, 2018

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I don't think that will work. I'm not sure how we could load the prebuilt CSS output into the file without a custom rule/or genrule

-- Actually it would work if we somehow know the path to the CSS file which is served by Karma (just not included)

I can look into it tomorrow, if we want to go with your proposed approach

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.

Ah, I see now.

@devversion

Copy link
Copy Markdown
MemberAuthor

Yeah that's what I initially thought. I've tried to fix it just by specifying a screen resolution, but apparently that doesn't have any effect. The tests just failed due to the missing CSS styles.

bazelbuild/rules_webtesting#305

@jelbournjelbourn left a comment

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.

LGTM

@jelbournjelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Oct 16, 2018
@josephperrott
josephperrott merged commit 5c8e0cb into angular:masterOct 16, 2018
@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-botangular-automatic-lock-botBot locked and limited conversation to collaborators Sep 9, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: mergeThe PR is ready for merge by the caretakercla: yesPR author has agreed to Google's Contributor License Agreementtarget: patchThis PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@devversion@jelbourn@googlebot@josephperrott