Skip to content

Conversation

pxlrbt
Copy link
Member

@pxlrbt pxlrbt commented Oct 13, 2025

Description

More assertion methods for testing modal content: #17857

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@pxlrbt pxlrbt added this to the v4 milestone Oct 13, 2025
@pxlrbt pxlrbt requested a review from danharrin October 13, 2025 10:36
@pxlrbt pxlrbt self-assigned this Oct 13, 2025
@pxlrbt pxlrbt added the enhancement New feature or request label Oct 13, 2025
@github-project-automation github-project-automation bot moved this to Todo in Roadmap Oct 13, 2025
Copy link
Member

@danharrin danharrin left a 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

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Oct 13, 2025
@pxlrbt
Copy link
Member Author

pxlrbt commented Oct 13, 2025

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

@danharrin
Copy link
Member

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.

@pxlrbt pxlrbt requested a review from danharrin October 13, 2025 11:34
Copy link
Member

@danharrin danharrin left a 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 {}
Copy link
Member

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?

Copy link
Member Author

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.

@danharrin danharrin linked an issue Oct 13, 2025 that may be closed by this pull request
@pxlrbt
Copy link
Member Author

pxlrbt commented Oct 13, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pending changes

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[4.x] Action modal content not found in tests

2 participants