Skip to content

feat(cdk-experimental/testing): add support for matching selector on TestElement #16848

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

Merged
merged 2 commits into from
Aug 29, 2019

Conversation

mmalerba
Copy link
Contributor

@mmalerba mmalerba commented Aug 22, 2019

There were a couple harnesses that had an id option which removed. It is now unnecessary since it can be achieved through using the selector option.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 22, 2019
@mmalerba mmalerba force-pushed the harness-matches branch 2 times, most recently from ba9c649 to 779cac3 Compare August 22, 2019 21:03
@mmalerba
Copy link
Contributor Author

PTAL

@mmalerba mmalerba added P2 The issue is important to a large percentage of users, with a workaround pr: merge safe target: patch This PR is targeted for the next patch release and removed pr: merge safe labels Aug 22, 2019
@mmalerba
Copy link
Contributor Author

Not merge safe since there is one team using the harness framework

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@mmalerba mmalerba added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Aug 27, 2019
@mmalerba
Copy link
Contributor Author

CARETAKER NOTE: The tests added in this PR for TestbedHarnessEnvironment should also be added for CatalystHarnessEnvironment in google3

@mmalerba
Copy link
Contributor Author

I've verified that this passes presubmit, just needs review @jelbourn

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM. Just one question.

@@ -267,7 +271,14 @@ export class HarnessPredicate<T extends ComponentHarness> {
private _predicates: AsyncPredicate<T>[] = [];
private _descriptions: string[] = [];

constructor(public harnessType: ComponentHarnessConstructor<T>) {}
constructor(public harnessType: ComponentHarnessConstructor<T>, options: BaseHarnessFilters) {
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why we make the options required here? I could imagine having {} as the default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't want people to forget to pass it to the super constructor, so I figured if I leave off the default they can't forget 😄

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough 😄

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 Aug 27, 2019
@jelbourn jelbourn merged commit 784756d into angular:master Aug 29, 2019
@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 29, 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 merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants