EZP-30662: Add proof of concept cache scenario #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA: https://jira.ez.no/browse/EZP-30662
This PR:
As http-cache is disabled I can't say the app is working correctly, but the test will do its job when time comes ;) This is a proof-of-concept, the test works but if we want to do it "correctly" then there are still some things left to do.
Notes:
1.
In a working Varnish setup this should be something like X-VARNISH: MISS/HIT, but for now it doesn't matter (what matters is that we can verify response headers).
2. This PR passes because it uses Goutte driver (scenarios are not marked with
javascript
), which also supports response headers.3. Chromium container can be run with
docker run -d --rm -p 9222:9222 --name=chrome registry.gitlab.com/dmore/docker-chrome-headless:7.1 tail -f /dev/null
TODOs:
Handled in ezsystems/docker-php#39 and ezsystems/ezplatform#417
EzSystems\EzPlatformAdminUi\Behat\Helper
namespace to BehatBundle otherwise there is a cyclic dependency between them. Also, this is the right place for these files.n similar fashion, map from
EzFieldElement
should also be in BehatBundle.iSeeCorrectPreviewDataFor
should be in something like FrontendContext (not strictly BrowserContext)Done in #87 . Factories refactor is postponed for now, does not have to happen yet.
generate URLs using reverse siteaccess matching - this would add support for other SA matchers then Map\URI, we can skip this point easily for a long timeout of scope for this PRfinish FieldDataProviders to support "parseFromString" - I need to doublecheck the date formats. Also, relations providers need to accept UrlAlias string and convert it to locationId.
Open question:
I'm still thinking about it, basically I don't think we should rely on hard-coded preview Pages (as we do today), given that this bundle allows to create Content Types basically.
The current approach is "good enough" for now, but should probably be redesigned in the future.