All of our Behat widget tests start by creating a "Content page". However, should we instead use a "Landing page"?

Here are the advantages to a "Landing page" as I see them:

  1. No need to fill in a body, so it's few steps that we are copy/pasting - less repetition is good!
  2. The layout is simpler by default ("Boxton" vs "Bryant"), so we don't have to worry about targeting a specific region
  3. Some of the tests depend on listing "Content pages" (for example, the tests that involve the "Content list" widget). If a test fails, it'll leave a stray "Content page" around which can mess up the "Content list" tests, because now there is an unexpected page. This makes those tests less stable.

Anyway, it's a couple of positives and no negatives that I'm aware of.

What do you think?

Comments

lsolesen’s picture

We could also utilize the Drupalextension there is a Given I view this node type ... or something like that.

dsnopek’s picture

Issue summary: View changes

Yeah, if we stick with Content Pages, that'd be good. But we'd still have to deal with #2 and #3 on my list in the description. Landing pages aren't nodes, so we'd have to make our own "Given ..." step for those, but it'd be a good idea!

lsolesen’s picture

I am on the landing page idea. Only reason I started out with content pages was that landing pages needs some random code for the url not to clash. So I am all for the landing page idea especially when creating our own given-step :)

dsnopek’s picture

Title: Should we switch Behat widget tests to use "Landing page"? » Switch Behat widget tests to use "Landing page"
Component: Code » Admin
dsnopek’s picture

Status: Active » Fixed

I've replaced the bit at the beginning of all the widget tests where we create a Content Page with a "Given I am viewing a landing page" step. The tests all work for me locally, let's see what Travis-CI says:

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

  • Commit 0e81f01 on 7.x-1.x by dsnopek:
    Issue #2154225 by dsnopek: Switch Behat widget tests to use "Landing...

  • Commit 34a46fe on 7.x-1.x by dsnopek:
    Issue #2154225 by dsnopek: Switch Behat widget tests to use "Landing...

  • Commit 289d8c4 on 7.x-1.x by dsnopek:
    Issue #2154225 by dsnopek: Switch Behat widget tests to use "Landing...
dsnopek’s picture

Status: Fixed » Active

Ok, I managed to mess up this commit somehow. :-/ I was working on several changes at once and then tried to pull out just the changes for this particular issue, and ended up accidentally leaving a bunch of stuff out. Definitely will try not to do that again... I'm trying to fix this now!

  • Commit 75f92fa on 7.x-1.x by dsnopek:
    Issue #2154225 by dsnopek: Switch Behat widget tests to use "Landing...

  • Commit 2671628 on 7.x-1.x by dsnopek:
    Issue #2154225 by dsnopek: Switch Behat widget tests to use "Landing...
dsnopek’s picture

Status: Active » Fixed

OMG, this is finally passing! This was a merge nightmare combined with a Travis-CI only problem. Next time I'm going to be sure to run my personal GitHub on Travis-CI before committing!

dsnopek’s picture

Status: Fixed » Closed (fixed)

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