Skip to content
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

Overriding plugin templates in themes tests #10094

Merged
merged 3 commits into from
Jan 14, 2019

Conversation

Zales0123
Copy link
Member

Q A
Branch? 1.2
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets #10082, #10083
License MIT

I can imagine this PR can be a little bit controversial 😄 but I hope it can be a nice step forward to make ThemeBundle more reliable.

As there is no easy way to test overriding plugin templates inside ThemeBundle itself (as it would require us to use trait from CoreBundle), I thought it would be nice to implement such a "test plugin" for Behat tests. It's maybe not the most elegant way, but it tests themes connected with plugins quite well and I don't see having a test plugin only for scenarios a bad thing, as we already have test themes or test bundles in our test suite.

I was also thinking, that maybe such a test should be implemented on our https://github.com/Sylius/PluginSkeleton, but I really consider overriding plugins template as a ThemeBundle feature, rather than plugins... possibility 🚀

@Zales0123 Zales0123 added the Behat Issues and PRs aimed at improving Behat usage. label Jan 13, 2019
@Zales0123 Zales0123 requested a review from a team as a code owner January 13, 2019 23:46
@Zales0123 Zales0123 force-pushed the 1.2-plugin-templates-in-themes-tests branch from eece89f to f7ba8a5 Compare January 14, 2019 10:53
@Zales0123 Zales0123 force-pushed the 1.2-plugin-templates-in-themes-tests branch from f7ba8a5 to ba78f11 Compare January 14, 2019 15:02
@pamil pamil merged commit 8f6f9ad into Sylius:1.2 Jan 14, 2019
@pamil
Copy link
Contributor

pamil commented Jan 14, 2019

Thank you, Mateusz! 🎉

@Zales0123 Zales0123 deleted the 1.2-plugin-templates-in-themes-tests branch January 14, 2019 22:15
@Zales0123 Zales0123 mentioned this pull request Jan 15, 2019
pamil added a commit that referenced this pull request Jan 15, 2019
This PR was merged into the 1.3 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.3
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | related to #10094
| License         | MIT

Is there any possibility to avoid duplicated routing files in `test/` and `test_cached/`? ⚖️ 

Commits
-------

5713402 Fix composer.json
b004cc5 Fix ThemeBundle + plugins tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Behat Issues and PRs aimed at improving Behat usage.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants