Skip to content

feat(material/dialog): add support for content sections in harness#23357

Merged
amysorto merged 2 commits intoangular:masterfrom
mmalerba:dialog-harness
Aug 20, 2021
Merged

feat(material/dialog): add support for content sections in harness#23357
amysorto merged 2 commits intoangular:masterfrom
mmalerba:dialog-harness

Conversation

@mmalerba
Copy link
Copy Markdown
Contributor

No description provided.

@mmalerba mmalerba requested a review from jelbourn as a code owner August 12, 2021 17:18
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 12, 2021
@mmalerba mmalerba requested a review from a team August 12, 2021 17:37
@josephperrott josephperrott removed the request for review from a team August 12, 2021 17:38
Copy link
Copy Markdown
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


/** Harness for interacting with a standard `MatDialog` in tests. */
export class MatDialogHarness extends ContentContainerComponentHarness<string> {
export class MatDialogHarness extends ContentContainerComponentHarness<MatDialogSection | string> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if we can do anything about it, but I think that the | string here basically removes any type checking for MatDialogSection.

Copy link
Copy Markdown
Contributor Author

@mmalerba mmalerba Aug 18, 2021

Choose a reason for hiding this comment

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

Yeah I left that as a reminder to eventually change it. I added a @breaking-change comment as well

return (await this.host()).text();
}

/** Gets the dialog's title text. */
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.

The JsDoc for these content areas should explain that they only work if you're using the corresponding premade content element

Copy link
Copy Markdown
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, aside from Jeremy's comment with the JSDoc.

@mmalerba mmalerba added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Aug 18, 2021
@mmalerba mmalerba changed the title feat(material/dialog/testing): add support for content sections in harness feat(material/dialog): add support for content sections in harness Aug 18, 2021
@amysorto amysorto merged commit 3dc5af4 into angular:master Aug 20, 2021
@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 20, 2021
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: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants