Commit dacb2049 authored by Rebecca Blundell's avatar Rebecca Blundell Committed by Robert Lyon
Browse files

Bug1661467 consolidating notes tests into one feature file

There were two notes tests that ran through the same initial
steps. This combines the two to avoid repetition.

Change-Id: Ibcc245a8b0358ebe2b30d2692ad46751daeca8a8
parent 14f5c339
@javascript @core @core_portfolio
@javascript @core @blocktype @blocktype_notes
Feature: Adding a Note to a page
In order to be able to write notes on my portfolio
As a student
I need to be able to add a Note block to my portfolio
In order to be able to write notes on my portfolio
As a student
I need to be able to add a Note block to my portfolio
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| userA | Kupuhipa1 | test01@example.com | Pete | Mc | mahara | internal | member |
| username | password | email | firstname | lastname | institution | authname | role |
| userA | Kupuhipa1 | test01@example.com | Pete | Mc | mahara | internal | member |
And the following "pages" exist:
| title | description| ownertype | ownername |
| Page 1 | page P1 | user | userA |
# Logging in as a user
Given I log in as "userA" with password "Kupuhipa1"
And I choose "Pages" in "Portfolio"
And I follow "Edit \"Page 1\""
# Configuring the block
And I expand "General" node
And I wait "1" seconds
And I follow "Note" in the "div#general" "css_element"
And I press "Add"
And I fill in the following:
| Block title | Note block 1 |
Scenario Outline: Adding a Note block to a portfolio (Bug 1424512)
# Logging in as a user
Given I log in as "<Log>" with password "Kupuhipa1"
# Verifying log in
And I should see "<Verify>"
# Creating a page
And I follow "Portfolio"
And I press "Create page"
And I press "Save"
# Adding a note block
And I expand "General" node
And I wait "1" seconds
And I follow "Note" in the "div#general" "css_element"
And I press "Add"
# Configuring the block
And I fill in the following:
| Block title | Note block 1 |
And I press "Save"
And I should see "Note block 1"
And I display the page
# Verifying the Note block saved
And I choose "Notes" in "Content"
And I should see "Note block 1"
And I delete the "Note block 1" row
Then I should see "Note deleted"
Scenario: Adding and deleting a Note block (Bug 1424512)
And I press "Save"
And I should see "Note block 1"
# Verifying the Note block saved
And I display the page
And I choose "Notes" in "Content"
And I should see "Note block 1"
# Verifying the Note block can be deleted
And I delete the "Note block 1" row
Then I should see "Note deleted"
Examples:
| Log | Verify |
| admin | Admin User |
| userA | Pete Mc |
Scenario: Adding an attachment to a note
# Attaching a file to the note
And I follow "Attachments" in the "div#instconf_artefactfieldset_container" "css_element"
And I wait "1" seconds
And I attach the file "Image2.png" to "userfile[]"
And I should see "Upload of Image2.png complete"
And I press "Save"
# Verifying the attachment saved
And I choose "Notes" in "Content"
And I follow "Note block 1"
And I should see "Image2.png"
@javascript @core @core_portfolio @walter
Feature: Adding an attachment to a note
In order to be able to add files to the notes on my portfolio
As a student
I need to be able to add an attachment to a note
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| userA | Kupuhipa1 | test01@example.com | Pete | Mc | mahara | internal | member |
Scenario Outline: Adding an attachment to a note
# Logging in as a user
Given I log in as "<Log>" with password "Kupuhipa1"
# Verifying log in
And I should see "<Verify>"
# Creating a page
And I follow "Portfolio"
And I press "Create page"
And I press "Save"
# Adding a note block
And I expand "General" node
And I wait "1" seconds
And I follow "Note" in the "div#general" "css_element"
And I press "Add"
# Configuring the block
And I fill in the following:
| Block title | Note block 1 |
# Attaching a file to the note
And I follow "Attachments" in the "div#instconf_artefactfieldset_container" "css_element"
And I wait "1" seconds
And I attach the file "Image2.png" to "userfile[]"
And I should see "Upload of Image2.png complete"
And I press "Save"
And I should see "Note block 1"
# Verifying the Note block saved
And I choose "Notes" in "Content"
And I should see "Note block 1"
And I follow "Note block 1"
And I should see "Image2.png"
And I delete the "Note block 1" row
Then I should see "Note deleted"
Examples:
| Log | Verify |
| admin | Admin User |
| userA | Pete Mc |
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment