2017-04-21 07:10:48 +02:00
|
|
|
@retry
|
2012-11-09 19:15:54 +01:00
|
|
|
Feature: Search for a page
|
2016-02-15 02:58:24 +01:00
|
|
|
As an author
|
|
|
|
I want to search for a page in the CMS
|
|
|
|
So that I can efficiently navigate nested content structures
|
2012-11-09 19:15:54 +01:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
Background:
|
|
|
|
Given a "page" "Home"
|
|
|
|
And a "page" "About Us"
|
|
|
|
And a "page" "Contact Us"
|
|
|
|
And I am logged in with "ADMIN" permissions
|
|
|
|
And I go to "/admin/pages"
|
2018-09-04 03:13:33 +02:00
|
|
|
And I press the "Filter" button
|
2013-06-05 13:30:15 +02:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
Scenario: I can search for a page by its title
|
|
|
|
Given I fill in "Search" with "About Us"
|
2018-09-27 11:39:42 +02:00
|
|
|
And I press the "Enter" key in the "SearchBox__Term" field
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should see "About Us" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
But I should not see "Contact Us" in the cms list
|
2012-11-09 19:15:54 +01:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
Scenario: I can search for a page by its type
|
2017-06-13 00:28:56 +02:00
|
|
|
Given a "Virtual Page" "My Virtual Page"
|
2018-09-04 03:13:33 +02:00
|
|
|
When I press the "Advanced" button
|
|
|
|
And I select "Virtual Page" from "Page type"
|
2018-09-27 11:39:42 +02:00
|
|
|
And I press the "Enter" key in the "SearchBox__Term" field
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should see "My Virtual Page" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
But I should not see "Contact Us" in the cms list
|
2013-09-13 18:46:23 +02:00
|
|
|
|
2018-09-07 02:11:57 +02:00
|
|
|
# BUG: https://github.com/silverstripe/silverstripe-admin/issues/631
|
|
|
|
# Scenario: I can search for a page by its oldest last edited date
|
|
|
|
# Given a "page" "Recent Page"
|
|
|
|
# And a "page" "Old Page" was last edited "7 days ago"
|
|
|
|
# When I press the "Advanced" button
|
|
|
|
# And I fill in "From" with "the date of 5 days ago"
|
|
|
|
# And I press the "Search" button
|
|
|
|
# Then I should see "Recent Page" in the cms list
|
|
|
|
# But I should not see "Old Page" in the cms list
|
2013-09-13 18:46:23 +02:00
|
|
|
|
2018-09-07 02:11:57 +02:00
|
|
|
# BUG: https://github.com/silverstripe/silverstripe-admin/issues/631
|
|
|
|
# Scenario: I can search for a page by its newest last edited date
|
|
|
|
# Given a "page" "Recent Page"
|
|
|
|
# And a "page" "Old Page" was last edited "7 days ago"
|
|
|
|
# When I press the "Advanced" button
|
|
|
|
# And I fill in "To" with "the date of 5 days ago"
|
|
|
|
# And I press the "Search" button
|
|
|
|
# Then I should not see "Recent Page" in the cms list
|
|
|
|
# But I should see "Old Page" in the cms list
|
2013-09-13 18:46:23 +02:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
Scenario: I can include deleted pages in my search
|
|
|
|
Given a "page" "Deleted Page"
|
2018-09-04 03:13:33 +02:00
|
|
|
And the "page" "Deleted Page" is unpublished
|
|
|
|
And the "page" "Deleted Page" is deleted
|
2018-09-27 11:39:42 +02:00
|
|
|
When I press the "Enter" key in the "SearchBox__Term" field
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should not see "Deleted Page" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
When I press the "Advanced" button
|
|
|
|
And I select "All pages, including archived" from "Page status"
|
|
|
|
And I press the "Search" button
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should see "Deleted Page" in the cms list
|
2014-03-27 20:29:30 +01:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
Scenario: I can include only deleted pages in my search
|
|
|
|
Given a "page" "Deleted Page"
|
2018-09-04 03:13:33 +02:00
|
|
|
And the "page" "Deleted Page" is unpublished
|
|
|
|
And the "page" "Deleted Page" is deleted
|
2018-09-27 11:39:42 +02:00
|
|
|
When I press the "Enter" key in the "SearchBox__Term" field
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should not see "Deleted Page" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
When I press the "Advanced" button
|
|
|
|
And I select "Archived pages" from "Page status"
|
|
|
|
And I press the "Search" button
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should see "Deleted Page" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
And I should not see "About Us" in the cms list
|
2014-03-27 20:29:30 +01:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
Scenario: I can include draft pages in my search
|
|
|
|
Given a "page" "Draft Page"
|
2018-09-04 03:13:33 +02:00
|
|
|
And the "page" "Draft Page" is not published
|
2018-09-27 11:39:42 +02:00
|
|
|
When I press the "Enter" key in the "SearchBox__Term" field
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should see "Draft Page" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
When I press the "Advanced" button
|
|
|
|
And I select "Draft pages" from "Page status"
|
|
|
|
And I press the "Search" button
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should see "Draft Page" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
And I should not see "About Us" in the cms list
|
2014-03-27 20:29:30 +01:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
Scenario: I can include changed pages in my search
|
|
|
|
When I click on "About Us" in the tree
|
|
|
|
Then I should see an edit page form
|
2014-03-27 20:29:30 +01:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
When I fill in the "Content" HTML field with "<p>my new content</p>"
|
2018-09-04 03:13:33 +02:00
|
|
|
And I press the "Save" button
|
2016-02-15 02:58:24 +01:00
|
|
|
Then I should see "Saved" in the "button#Form_EditForm_action_save" element
|
2014-03-27 20:29:30 +01:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
When I go to "/admin/pages"
|
2018-09-04 03:13:33 +02:00
|
|
|
And I press the "Filter" button
|
|
|
|
And I press the "Advanced" button
|
|
|
|
And I select "Modified pages" from "Page status"
|
|
|
|
And I press the "Search" button
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should see "About Us" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
And I should not see "Home" in the cms list
|
2014-03-27 20:29:30 +01:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
Scenario: I can include live pages in my search
|
|
|
|
Given a "page" "Live Page"
|
2018-09-04 03:13:33 +02:00
|
|
|
And the "page" "Live Page" is published
|
|
|
|
And the "page" "Live Page" is deleted
|
2018-09-27 11:39:42 +02:00
|
|
|
When I press the "Enter" key in the "SearchBox__Term" field
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should not see "Live Page" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
When I press the "Advanced" button
|
|
|
|
And I select "Live but removed from draft" from "Page status"
|
|
|
|
And I press the "Search" button
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should see "Live Page" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
And I should not see "About Us" in the cms list
|
2014-07-28 08:57:09 +02:00
|
|
|
|
2016-02-15 02:58:24 +01:00
|
|
|
Scenario: I can include only live pages in my search
|
|
|
|
Given a "page" "Live Page"
|
2018-09-04 03:13:33 +02:00
|
|
|
And the "page" "Live Page" is published
|
|
|
|
And a "page" "Draft Page"
|
|
|
|
And a "page" "Draft Page" is unpublished
|
|
|
|
And a "page" "Deleted Page"
|
|
|
|
And the "page" "Deleted Page" is unpublished
|
|
|
|
And the "page" "Deleted Page" is deleted
|
2014-07-28 08:57:09 +02:00
|
|
|
|
2018-09-04 03:13:33 +02:00
|
|
|
When I press the "Advanced" button
|
|
|
|
And I select "Published pages" from "Page status"
|
|
|
|
And I press the "Search" button
|
2017-07-25 02:08:44 +02:00
|
|
|
Then I should not see "Draft Page" in the cms list
|
2018-09-04 03:13:33 +02:00
|
|
|
And I should not see "Deleted Page" in the cms list
|
|
|
|
But I should see "Live Page" in the cms list
|