3

I've created a block view, which I've positioned on the page using the admin UI. I've exported my view using Features and fe_block for its block.

I'd like to write a SimpleTest to verify that content from the view is displaying on the front page.

I've written a test that creates some nodes (of the type being displayed by the view), then does a drupalGet('/') and some assertText() statements to verify the content is displayed.

However, these are currently failing. When I view the HTML of the frontpage as seen by SimpleTest, the view isn't there.

Have I missed something? Is there a better way to be testing this?

0

The simpletest code needs to place the block into a region. Then, you should see the content after doing the drupalGet('/').

| improve this answer | |
  • The block positioning is already specified in the feature exported by fe_block – Nic Rodgers Sep 8 '14 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.