Issue #1811622 by tim.plunkett, xjm: Remove assumption about front page title from NodeCreationTest.

Part of #1811016: [meta] Decouple tests from Node module.

NodeCreationTest currently assumes the title of the node front page is "Welcome to Drupal," and uses this to test whether the user is redirected away from the node page when an unpublished node is created. It also does not actually confirm that that the node is created.

Attached is based on @tim.plunkett's change in the VDC sandbox. Tim had removed the configuration that sets node as the front page and just changed the title assertion as in the attached. However, if we really do want to codify that the user is directed to the front page, and not just away from the node page, we should check the URL. Unfortunately, because of the way user_page() works, we can't just assertUrl('') when user is the front page, because it redirects to user/N and so fails any generic assertion I was able to come up with. So, I've left node as the front page here.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Issue tags: +Testing system, +VDC
xjm’s picture

Issue summary: View changes

Updated issue summary.

tim.plunkett’s picture

I helped write this patch, so I won't RTBC. But +1!

tim.plunkett’s picture

FileSize
1.27 KB

Removing the debug statement.

cosmicdreams’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and the previous patch went green

xjm’s picture

xjm’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Yeah, closing in favor of #1811804: Provide a test page testing module; I really think that's a better direction.

xjm’s picture

Issue summary: View changes

Updated issue summary.