From 5476bbeefb3a0f4293e9caefaf838678b6b8f3de Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 7 Jun 2013 10:21:05 +0200 Subject: [PATCH] Behat: Fixed indentation (no functional changes) Using tabs consistently --- tests/behat/features/access-user-help.feature | 24 +++--- tests/behat/features/create-a-page.feature | 24 +++--- tests/behat/features/edit-a-page.feature | 46 ++++++------ tests/behat/features/preview-a-page.feature | 74 +++++++++---------- .../behat/features/search-for-a-page.feature | 34 ++++----- tests/behat/features/settings-main.feature | 42 +++++------ 6 files changed, 122 insertions(+), 122 deletions(-) diff --git a/tests/behat/features/access-user-help.feature b/tests/behat/features/access-user-help.feature index e7a0d330..48df3412 100644 --- a/tests/behat/features/access-user-help.feature +++ b/tests/behat/features/access-user-help.feature @@ -3,17 +3,17 @@ Feature: Access the User Help I want to access the user help in the CMS So that I can get help about the CMS features - @javascript - Scenario: I can get to http://3.0.userhelp.silverstripe.org from anywhere in the CMS - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - Then I should see "Help" in the "#Menu-Help" element - - Given I go to "/admin/settings" - Then I should see "Help" in the "#Menu-Help" element + @javascript + Scenario: I can get to http://3.0.userhelp.silverstripe.org from anywhere in the CMS + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + Then I should see "Help" in the "#Menu-Help" element - Given I go to "http://3.0.userhelp.silverstripe.org" - Then I should see "SilverStripe User Help!" + Given I go to "/admin/settings" + Then I should see "Help" in the "#Menu-Help" element - #Given I click "Help" in the "#Menu-Help" element - #Then the url should match "http://3.0.userhelp.silverstripe.org" \ No newline at end of file + Given I go to "http://3.0.userhelp.silverstripe.org" + Then I should see "SilverStripe User Help!" + + #Given I click "Help" in the "#Menu-Help" element + #Then the url should match "http://3.0.userhelp.silverstripe.org" \ No newline at end of file diff --git a/tests/behat/features/create-a-page.feature b/tests/behat/features/create-a-page.feature index 5baa46fe..a1a04ed9 100644 --- a/tests/behat/features/create-a-page.feature +++ b/tests/behat/features/create-a-page.feature @@ -1,14 +1,14 @@ Feature: Create a page - As an author - I want to create a page in the CMS - So that I can grow my website + As an author + I want to create a page in the CMS + So that I can grow my website - @javascript - Scenario: I can create a page from the pages section - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - And I should see a "Add new" button in CMS Content Toolbar - When I press the "Add new" button - And I check "Page" - And I press the "Create" button - Then I should see an edit page form + @javascript + Scenario: I can create a page from the pages section + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + And I should see a "Add new" button in CMS Content Toolbar + When I press the "Add new" button + And I check "Page" + And I press the "Create" button + Then I should see an edit page form diff --git a/tests/behat/features/edit-a-page.feature b/tests/behat/features/edit-a-page.feature index a47299e6..182d0509 100644 --- a/tests/behat/features/edit-a-page.feature +++ b/tests/behat/features/edit-a-page.feature @@ -1,29 +1,29 @@ Feature: Edit a page - As an author - I want to edit a page in the CMS - So that I correct errors and provide new information + As an author + I want to edit a page in the CMS + So that I correct errors and provide new information - Background: - 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 + Background: + 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 - @javascript - Scenario: I can open a page for editing from the pages tree - When I follow "About Us" - Then I should see an edit page form + @javascript + Scenario: I can open a page for editing from the pages tree + When I follow "About Us" + Then I should see an edit page form - @javascript - Scenario: I can edit title and content and see the changes on draft - When I follow "About Us" - Then I should see an edit page form + @javascript + Scenario: I can edit title and content and see the changes on draft + When I follow "About Us" + Then I should see an edit page form - When I fill in "Title" with "About Us!" - And I fill in the "Content" HTML field with "my new content" - And I press the "Save draft" button - Then I should see "Saved" in the "button#Form_EditForm_action_save" element + When I fill in "Title" with "About Us!" + And I fill in the "Content" HTML field with "my new content" + And I press the "Save draft" button + Then I should see "Saved" in the "button#Form_EditForm_action_save" element - When I follow "About Us" - Then the "Title" field should contain "About Us!" - And the "Content" HTML field should contain "my new content" \ No newline at end of file + When I follow "About Us" + Then the "Title" field should contain "About Us!" + And the "Content" HTML field should contain "my new content" \ No newline at end of file diff --git a/tests/behat/features/preview-a-page.feature b/tests/behat/features/preview-a-page.feature index 9db7a527..cd39619f 100644 --- a/tests/behat/features/preview-a-page.feature +++ b/tests/behat/features/preview-a-page.feature @@ -1,46 +1,46 @@ Feature: Preview a page - As an author - I want to preview the page I'm editing in the CMS - So that I can see how it would look like to my visitors + As an author + I want to preview the page I'm editing in the CMS + So that I can see how it would look like to my visitors - Background: - Given a "page" "About Us" + Background: + Given a "page" "About Us" - @javascript - Scenario: I can show a preview of the current page from the pages section - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - Then I should see "About Us" in CMS Tree + @javascript + Scenario: I can show a preview of the current page from the pages section + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + Then I should see "About Us" in CMS Tree - When I follow "About Us" - And I set the CMS mode to "Preview mode" - Then I can see the preview panel - And the preview contains "About Us" - Then I set the CMS mode to "Edit mode" + When I follow "About Us" + And I set the CMS mode to "Preview mode" + Then I can see the preview panel + And the preview contains "About Us" + Then I set the CMS mode to "Edit mode" - # TODO: - # - Only tests correctly on fresh database - # - We should continue testing against it after we have fixtures ready - @javascript - Scenario: I can see an updated preview when editing content - Given I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - Then I should see "About Us" in CMS Tree + # TODO: + # - Only tests correctly on fresh database + # - We should continue testing against it after we have fixtures ready + @javascript + Scenario: I can see an updated preview when editing content + Given I am logged in with "ADMIN" permissions + And I go to "/admin/pages" + Then I should see "About Us" in CMS Tree - When I follow "About Us" - And I fill in the "Content" HTML field with "first content" - And I press the "Publish" button - And I fill in the "Content" HTML field with "my new content" - And I press the "Save draft" button - And I set the CMS mode to "Preview mode" + When I follow "About Us" + And I fill in the "Content" HTML field with "first content" + And I press the "Publish" button + And I fill in the "Content" HTML field with "my new content" + And I press the "Save draft" button + And I set the CMS mode to "Preview mode" - When I switch the preview to "Published" - Then the preview does not contain "my new content" - And the preview contains "first content" + When I switch the preview to "Published" + Then the preview does not contain "my new content" + And the preview contains "first content" - When I switch the preview to "Draft" - Then the preview does not contain "first content" - And the preview contains "my new content" + When I switch the preview to "Draft" + Then the preview does not contain "first content" + And the preview contains "my new content" - And I set the CMS mode to "Edit mode" - Then I should see an edit page form \ No newline at end of file + And I set the CMS mode to "Edit mode" + Then I should see an edit page form \ No newline at end of file diff --git a/tests/behat/features/search-for-a-page.feature b/tests/behat/features/search-for-a-page.feature index 46ad3fec..48aac0fd 100644 --- a/tests/behat/features/search-for-a-page.feature +++ b/tests/behat/features/search-for-a-page.feature @@ -1,21 +1,21 @@ Feature: Search for a page - As an author - I want to search for a page in the CMS - So that I can efficiently navigate nested content structures + As an author + I want to search for a page in the CMS + So that I can efficiently navigate nested content structures - Background: - Given a "page" "About Us" - And a "page" "Contact Us" + Background: + Given a "page" "About Us" + And a "page" "Contact Us" - @javascript - Scenario: I can search for a page by its title - 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 should see "Contact Us" in CMS Tree + @javascript + Scenario: I can search for a page by its title + 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 should see "Contact Us" in CMS Tree - When I expand the "Filter" CMS Panel - And I fill in "Content" with "About Us" - And I press the "Apply Filter" button - Then I should see "About Us" in CMS Tree - But I should not see "Contact Us" in CMS Tree + When I expand the "Filter" CMS Panel + And I fill in "Content" with "About Us" + And I press the "Apply Filter" button + Then I should see "About Us" in CMS Tree + But I should not see "Contact Us" in CMS Tree diff --git a/tests/behat/features/settings-main.feature b/tests/behat/features/settings-main.feature index 06a02629..aaf68a94 100644 --- a/tests/behat/features/settings-main.feature +++ b/tests/behat/features/settings-main.feature @@ -1,26 +1,26 @@ Feature: Edit site wide title and tagline - As a site administrator - I want to configure the sites title and tagline - So that I dont have to change any templates + As a site administrator + I want to configure the sites title and tagline + So that I dont have to change any templates - Background: - Given a "page" "home" + Background: + Given a "page" "home" - @javascript - Scenario: I can edit my Site title and Tagline - Given I am logged in with "ADMIN" permissions - And I go to "/admin/settings" - Then I should see an edit page form - And I should see "Site title" - And I should see "Tagline" - And I should see "Theme" + @javascript + Scenario: I can edit my Site title and Tagline + Given I am logged in with "ADMIN" permissions + And I go to "/admin/settings" + Then I should see an edit page form + And I should see "Site title" + And I should see "Tagline" + And I should see "Theme" - When I fill in "Site title" with "Test Site" - And I fill in "Tagline" with "Site is under construction" - And I press the "Save" button - And I reload the page - Then I should see "Test Site" in the ".cms-logo" element + When I fill in "Site title" with "Test Site" + And I fill in "Tagline" with "Site is under construction" + And I press the "Save" button + And I reload the page + Then I should see "Test Site" in the ".cms-logo" element - When I go to "/home" - Then I should see "Test Site" - And I should see "Site is under construction" \ No newline at end of file + When I go to "/home" + Then I should see "Test Site" + And I should see "Site is under construction" \ No newline at end of file