mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
More specific behat tree assertion
This commit is contained in:
parent
55fc0265f4
commit
35a32d608d
@ -11,7 +11,7 @@ Feature: Apply rich formatting to content
|
||||
"""<h1>My awesome headline</1>
|
||||
<p>Some amazing content</p>"""
|
||||
And I go to "/admin/pages"
|
||||
Then I follow "About Us"
|
||||
Then I click on "About Us" in the tree
|
||||
And I focus the "Content" field
|
||||
|
||||
Scenario: I can control alignment of selected content
|
||||
|
@ -140,7 +140,7 @@ class CmsUiContext extends BehatContext
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^I should see "([^"]*)" in CMS Tree$/
|
||||
* @When /^I should see "([^"]*)" in the tree$/
|
||||
*/
|
||||
public function stepIShouldSeeInCmsTree($text)
|
||||
{
|
||||
@ -151,7 +151,7 @@ class CmsUiContext extends BehatContext
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^I should not see "([^"]*)" in CMS Tree$/
|
||||
* @When /^I should not see "([^"]*)" in the tree$/
|
||||
*/
|
||||
public function stepIShouldNotSeeInCmsTree($text)
|
||||
{
|
||||
@ -161,6 +161,17 @@ class CmsUiContext extends BehatContext
|
||||
assertNull($element, sprintf('%s found', $text));
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^I click on "([^"]*)" in the tree$/
|
||||
*/
|
||||
public function stepIClickOnElementInTheTree($text)
|
||||
{
|
||||
$treeEl = $this->getCmsTreeElement();
|
||||
$treeNode = $treeEl->findLink($text);
|
||||
assertNotNull($treeNode, sprintf('%s not found', $text));
|
||||
$treeNode->click();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^I expand the "([^"]*)" CMS Panel$/
|
||||
*/
|
||||
|
@ -9,7 +9,7 @@ So that I can link to a external website or a page on my site
|
||||
Given I am logged in with "ADMIN" permissions
|
||||
Given "About Us" has text in content "You can fill this page out with your own content, or delete it and create your own pages."
|
||||
And I go to "/admin/pages"
|
||||
Then I should see "About Us" in CMS Tree
|
||||
And I click on "About Us" in the tree
|
||||
|
||||
@javascript
|
||||
Scenario: I can select text within the content and apply an internal sitetree url link using the add url button
|
||||
|
@ -8,10 +8,9 @@ Feature: Insert an image into a page
|
||||
Given a "page" "About Us"
|
||||
Given I am logged in with "ADMIN" permissions
|
||||
And I go to "/admin/pages"
|
||||
Then I should see "About Us" in CMS Tree
|
||||
And I click on "About Us" in the tree
|
||||
|
||||
Scenario: I can insert images into the content
|
||||
When I follow "About Us"
|
||||
Then I should see an edit page form
|
||||
|
||||
When I press the "Insert Media" button
|
||||
|
Loading…
Reference in New Issue
Block a user