Commit 3038ac62 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1668118: add behat collapse node step



Change-Id: I714dbe9ad31fdc4cad7721378d14bc7a56abc118
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
parent b91d7b08
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -178,6 +178,15 @@ class BehatNavigation extends BehatBase {
        $node->click();
    }

    /**
     * Collapse the selected node that matches the text.
     *
     * @Given /^I collapse "(?P<element_string>(?:[^"]|\\")*)" node$/
     */
    public function i_collapse_node($element) {
        $this->i_expand_node($element);
    }

    /**
     * Expands the selected node that matches the text which is located inside the second element.
     *
+1 −2
Original line number Diff line number Diff line
@@ -27,6 +27,5 @@ Scenario: Make Text Block Retractable
    Then I click on "Display page"
    Then I should see "Here is a new block"
    Then I should see "Text Block 1"
    # This next instruction is counterintuitive, as it actually collapes the node
    And I expand "Text Block 1" node
    And I collapse "Text Block 1" node
    And I should not see "Here is a new block"