add_pdf.feature 1.21 KB
Newer Older
1 2 3 4 5 6 7 8 9
@javascript @core @blocktype @blocktype_pdf
Feature: Adding a pdf to a page
    As a student
    I need to be able to add a pdf block to my portfolio
    and check it is visible on the page

Background:
Given the following "users" exist:
    | username | password | email | firstname | lastname | institution | authname | role |
Gregor Anzelj's avatar
Gregor Anzelj committed
10
    | UserA | Kupuh1pa! | UserA@example.org | Angela | User | mahara | internal | member |
11 12

    And the following "pages" exist:
13 14
    | title | description | ownertype | ownername |
    | Page UserA_01 | Page 01| user | UserA |
15 16 17

Scenario:
    # Logging in as a user
Gregor Anzelj's avatar
Gregor Anzelj committed
18
    Given I log in as "UserA" with password "Kupuh1pa!"
19
    And I choose "Pages and collections" in "Create" from main menu
20
    And I click on "Edit" in "Page UserA_01" card menu
21
    # Configuring the block
22
    When I follow "Drag to add a new block" in the "blocktype sidebar" property
23
    And I press "Add"
24 25
    And I click on "Show more"
    And I click on "PDF" in the "Content types" property
26 27 28 29 30 31 32 33
    And I fill in the following:
    | Block title | Mahara about PDF |

    And I follow "File"
    And I attach the file "mahara_about.pdf" to "File"
    And I press "Save"
    And I display the page
    Then I should see "Mahara about PDF"