I'm working on a Panopoly-based distribution that has a few implementation details that differ from a vanilla install, including a different default layout for content pages. It'd be nice to get the resulting changes out of the .feature files and into the main configuration so they only have to be made in one place.

To that end, what do you think of adding a region to behat.template.yml for "Default Content," and/or a parameter for "Default Layout?"

Comments

dsnopek’s picture

I think this sounds reasonable! However, I think the name of the region should be more specific than just "Default Content" since the default is different depending on the type. For example, a "Content page" defaults to "Bryant" and a "Landing page" defaults to "Boxton". Maybe "Content page default" (or similar) so that it's clear this is for Content pages?

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new17 KB

Attached is a patch that creates a special region for "Panopoly Page Content" so that child distributions can swap it out. I've also tried running the tests with admin_menu enabled and save_draft disabled (since those are both support configurations) and it should work in those situations now too.

Please let me know if this is sufficient for your needs!

dsnopek’s picture

StatusFileSize
new17 KB

Ok, there were loads of issues with my commit for #2154225: Switch Behat widget tests to use "Landing page", so here is a re-roll that is based on the latest Git.

dsnopek’s picture

dsnopek’s picture

StatusFileSize
new32.28 KB

Ok, here's an updated version that takes advantage of panopoly_test: #2291961: Create a panopoly_test module to hold Views and Content Types for testing

Changes:

  • Even fewer tests depend on panopoly_pages
  • The Content Item, Content List and Live Preview no longer depend on panopoly_demo
  • Tagged each test with the panopoly_* module that it depends on, so it's easy to exclude tests for modules not included in a child distro
dsnopek’s picture

StatusFileSize
new31.77 KB

Travis tests show that I went a little too far on my refactoring of contentpage.feature. :-) I switched back from using "Body" to the form field name. Anyway, this patch is actually passing on Travis-CI!

cboyden’s picture

StatusFileSize
new32.72 KB

Here is an updated patch that removes a dependency in the Linkit test on the panopoly_page content type (creates the target node as a panopoly_test_page instead) and adds a named "Linkit modal" region so the tests pass when you use admin menu instead of navbar.

dsnopek’s picture

@cboyden: Looks good, thanks! I totally missed the creation of the node it's linking to. :-/ Testing the whole thing on Travis-CI again:

https://travis-ci.org/dsnopek/panopoly/builds/28491491

Hopefully, we're getting close to finishing this! :-)

cboyden’s picture

StatusFileSize
new32.77 KB

Here's another patch that adds a tag to the WYSIWYG scenarios that involve embedding non-static media into WYSIWYG fields. This is an area where some sites have stricter permissions about content that can be included in a page. The tag @panopoly_wysiwyg_multimedia will allow testers to exclude these scenarios instead of having them fail.

cboyden’s picture

StatusFileSize
new33.33 KB

Yet another patch: Updated to include moving the Live Preview table cell content to the 2nd row, to avoid styling issues where table header rows might be transformed by CSS.

dsnopek’s picture

StatusFileSize
new34.48 KB
new4.1 KB

Ok, here is one final version of this patch. I've added a new region-based version of the "Then I should see text matching" step, so that we can do case insensitive matches.

@cboyden: I've included an interdiff, so it'll be easy for you to see the changes I made from your patch.

I'm going to commit this in a moment!

dsnopek’s picture

Title: Parameterize content region and default layout » Parameterize tests as much as possible so they work in child distributions

Renaming issue for commit.

  • dsnopek committed 4b90140 on 7.x-1.x
    Issue #2267555 by dsnopek, cboyden: Parameterize tests as much as...
dsnopek’s picture

Status: Needs review » Fixed

Huzzah! I've committed it. :-) I'm super happy with these changes - the tests are much better organized and it's great that they can be used (mostly) unmodified in a child distribution. Thanks for your help, @cboyden!

I've been testing periodically in Travis, so it should succeed, but here's the build anyway:

https://travis-ci.org/panopoly/panopoly/builds/28532883

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.