Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

devversion
Copy link
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
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 16, 2018
@devversion devversion added pr: merge safe target: patch This PR is targeted for the next patch release labels Oct 16, 2018
@devversion
Copy link
Member Author

devversion commented Oct 16, 2018

@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.

Copy link
Member

@jelbourn jelbourn left a comment

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

js_template="var cssElement = document.createElement('style'); \
cssElement.type = 'text/css'; \
cssElement.innerHTML = '$$css_content'; \
document.head.appendChild(cssElement);"
Copy link
Member

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
Member Author

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
Member

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?

Copy link
Member Author

@devversion devversion Oct 16, 2018

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
Member

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
Member Author

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

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn 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:master Oct 16, 2018
@angular-automatic-lock-bot
Copy link

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 9, 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 cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants