-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[4.x] Mounted action modal test helpers #18195
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
base: 4.x
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, CI is failing
@danharrin PhpStan does not understand that those are macros and I used a helper method so I don't have to repeat getting the partial HTML. I can extract it into a helper method and place it over the class or inline and repeat the code. WDYT? |
I think the methods need adding to the testing stubs file like the others. After that, we can add ignores where we are calling macroed functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a request while the the modal is open, for example, if a live field is changed, I think the partial name becomes action-modal.NESTING-INDEX
or something similar. Probably needs checking. action-modals
is only used on a request where a modal is opened or closed
* | ||
* @internal | ||
*/ | ||
public function getMountedActionModalHtml(): string {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to include this in the stubs if we ignore all its usages anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I have no idea how this stub file is used. I thought it's a file for PhpStan (https://phpstan.org/user-guide/stub-files) but I don't find it in the PhpStan config.
You are right. I adjusted the code to use either the general key or one with a nesting index. Is there a scenario where multiple nested actions are rendered at once? |
Description
More assertion methods for testing modal content: #17857
Functional changes
composer cs
command.