[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/blog/tests/behat/ -> delete.feature (source)

   1  @core @core_blog
   2  Feature: Delete a blog entry
   3    In order to manage my blog entries
   4    As a user
   5    I need to be able to delete entries I no longer wish to appear
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | testuser | Test | User | moodle@example.com |
  11      And I log in as "testuser"
  12      And I expand "Site pages" node
  13      And I follow "Site blogs"
  14      And I follow "Add a new entry"
  15      And I set the following fields to these values:
  16        | Entry title | Blog post one |
  17        | Blog entry body | User 1 blog post content |
  18      And I press "Save changes"
  19      And I follow "Add a new entry"
  20      And I set the following fields to these values:
  21        | Entry title | Blog post two |
  22        | Blog entry body | User 1 blog post content |
  23      And I press "Save changes"
  24      And I am on site homepage
  25      And I expand "Site pages" node
  26      And I follow "Site blogs"
  27  
  28    Scenario: Delete blog post results in post deleted
  29      Given I follow "Blog post one"
  30      And I follow "Delete"
  31      And I should see "Delete the blog entry 'Blog post one'?"
  32      When I press "Continue"
  33      Then I should not see "Blog post one"
  34      And I should see "Blog post two"
  35  
  36    Scenario: Delete confirmation screen works and allows cancel
  37      Given I follow "Blog post one"
  38      When I follow "Delete"
  39      Then I should see "Delete the blog entry 'Blog post one'?"
  40      And I press "Cancel"
  41      And I should see "Blog post one"
  42      And I should see "Blog post two"
  43  


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1