Comments

cboyden’s picture

Status: Active » Needs review
StatusFileSize
new365 bytes

Patch attached.

cboyden’s picture

Also, several of the tests still use the Landing Page content type. Should we switch entirely to Panopoly Test Page?

dsnopek’s picture

Status: Needs review » Needs work

The thing is, panopoly_test actually does depend on panopoly_pages for the "body" field base, which it's attaching to it's content type. So, we've got two options:

  1. Create our own body field base (maybe "field_panopoly_test_body"?) so we don't depend on it getting created somehow, or
  2. Adding features_exclude[dependencies][panopoly_pages] = panopoly_pages to the panopoy_test.info file, so Features won't try to add it back later (and assume that something will have created the 'body' field)

At this point, I'd be willing to go with either approach. #2 is certainly the quickest to implement, and one would expect that every distribution will create a 'body' field somehow...

Also, several of the tests still use the Landing Page content type. Should we switch entirely to Panopoly Test Page?

Hrm, well, all tests (except for those that are meant to test panopoly_pages) should be using the step "When I am viewing a landing page" which creates the "landing page" (a page manager page, not a real content type) on the backend in a way that doesn't depend on panopoly_pages. If there are tests that manually click through the form, then those should definitely get changed to that custom step!

mglaman’s picture

What if we add the exclude, and add an install file to panopoly_test. Once installed we can run node_add_body_field and attach Core's body field to the content type.

That way nothing has to be featurized, unless Behat is checking any customizations done (such as translations.)

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new1.22 KB

This removes Panopoly Pages dependency and uses Core body field on node type insert hook!

dsnopek’s picture

Status: Needs review » Needs work

Sounds like a good plan! But you still need to add the 'features_exclude' so that the dependency doesn't get added back next time someone does drush fu -y panopoly_tests.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new1.54 KB

Re-roll with exclude added

dsnopek’s picture

Looks good, but I want to try it out on Travis-CI first:

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

dsnopek’s picture

StatusFileSize
new0 bytes

The last test runs passed, but this took more twiddling in order to get it to take with regard to Features. Here is a new patch! I'll run this one on Travis before moving on as well.

dsnopek’s picture

StatusFileSize
new4.06 KB

Hrm, it helps when it has more than 0 bytes. :-)

dsnopek’s picture

dsnopek’s picture

Status: Needs review » Needs work

Hrm. My patch appears to be failing - I think I went too far. :-) Maybe we could try keeping the field instance in Features, but just doing the features_exclude to block the dependency? That way we don't have to do the hack that @mglaman did with adding the body field manually to the type, it'll just connect to whatever 'body' field happens to be present on the site.

dsnopek’s picture

Status: Needs work » Needs review
StatusFileSize
new697 bytes

Ok, here's a super conservative attempt.

dsnopek’s picture

dsnopek’s picture

Status: Needs review » Fixed

Finally passed on Travis-CI! Commited.

  • dsnopek committed 16b6488 on 7.x-1.x
    Update Panopoly Test for #2316067 by dsnopek, mglaman, cboyden: Fixed...

Status: Fixed » Closed (fixed)

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