From 8d5209aef649852fe009005a670b653a2da08744 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 8 Oct 2013 00:24:05 +0200 Subject: [PATCH] Migrated page-specific behat features to cms module --- tests/behat/features/apply-formatting.feature | 28 ------ tests/behat/features/insert-a-link.feature | 83 ---------------- tests/behat/features/insert-an-image.feature | 95 ------------------- 3 files changed, 206 deletions(-) delete mode 100644 tests/behat/features/apply-formatting.feature delete mode 100644 tests/behat/features/insert-a-link.feature delete mode 100644 tests/behat/features/insert-an-image.feature diff --git a/tests/behat/features/apply-formatting.feature b/tests/behat/features/apply-formatting.feature deleted file mode 100644 index 12af1ae79..000000000 --- a/tests/behat/features/apply-formatting.feature +++ /dev/null @@ -1,28 +0,0 @@ -Feature: Apply rich formatting to content - As a cms author - I want to work with content in the way I'm used to from word processing software - So that I make it more appealing by creating structure and highlights - - Background: - Given a "page" "About Us" has the "Content" "

My awesome headline

Some amazing content

" - And I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - Then I click on "About Us" in the tree - - Scenario: I can control alignment of selected content - Given I select "My awesome headline" in the "Content" HTML field - When I press the "Align Right" button - Then "My awesome headline" in the "Content" HTML field should be right aligned - But "Some amazing content" in the "Content" HTML field should be left aligned - Then I press the "Save draft" button - Then "My awesome headline" in the "Content" HTML field should be right aligned - - Scenario: I can bold selected content - Given I select "awesome" in the "Content" HTML field - When I press the "Bold (Ctrl+B)" button - Then "awesome" in the "Content" HTML field should be bold - But "My" in the "Content" HTML field should not be bold - When I press the "Save draft" button - Then "awesome" in the "Content" HTML field should be bold - But "My" in the "Content" HTML field should not be bold - \ No newline at end of file diff --git a/tests/behat/features/insert-a-link.feature b/tests/behat/features/insert-a-link.feature deleted file mode 100644 index 0ec21000a..000000000 --- a/tests/behat/features/insert-a-link.feature +++ /dev/null @@ -1,83 +0,0 @@ -@assets -Feature: Insert links into a page -As a cms author -I want to insert a link into my content -So that I can link to a external website or a page on my site - - Background: - Given a "page" "Home" - And a "page" "About Us" has the "Content" "My awesome content" - #And a "file" "assets/folder1/file1.jpg" - And I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - And I click on "About Us" in the tree - - Scenario: I can link to an internal page - Given I select "awesome" in the "Content" HTML field - And I press the "Insert Link" button - When I check "Page on the site" - And I fill in the "Page" dropdown with "Home" - And I fill in "my desc" for "Link description" - And I press the "Insert" button - # TODO Dynamic DB identifiers - Then the "Content" HTML field should contain "awesome" - # Required to avoid "unsaved changed" browser dialog - Then I press the "Save draft" button - - Scenario: I can link to an external URL - Given I select "awesome" in the "Content" HTML field - And I press the "Insert Link" button - - When I check "Another website" - And I fill in "http://silverstripe.org" for "URL" - And I check "Open link in a new window" - And I press the "Insert" button - Then the "Content" HTML field should contain "awesome" - # Required to avoid "unsaved changed" browser dialog - Then I press the "Save draft" button - - @todo - Scenario: I can link to a file - Given I select "awesome" in the "Content" HTML field - When I press the "Insert Link" button - When I check "Download a file" - And I fill in the "File" dropdown with "file1.jpg" - And I press the "Insert link" button - Then the "Content" HTML field should contain "awesome" - # Required to avoid "unsaved changed" browser dialog - Then I press the "Save draft" button - - - @todo - Scenario: I can link to an anchor - Given I fill in the "Content" HTML field with "My awesome content " - And I select "awesome" in the "Content" HTML field - When I press the "Insert Link" button - When I check "Anchor on this page" - And I fill in the "Select an anchor" dropdown with "myanchor" - And I press the "Insert link" button - Then the "Content" HTML field should contain "awesome" - # Required to avoid "unsaved changed" browser dialog - Then I press the "Save draft" button - - @todo - Scenario: I can edit a link - Given I fill in the "Content" HTML field with "My awesome content" - And I select "awesome" - When I press the "Insert Link" button - And the "URL" field should contain "http://silverstripe.org" - When I fill in "http://wordpress.org" for "URL" - And I press the "Insert link" button - Then the "Content" HTML field should contain "awesome" - # Required to avoid "unsaved changed" browser dialog - Then I press the "Save draft" button - - @todo - Scenario: I can delete a link - Given I fill in the "Content" HTML field with "My awesome content" - And I select "awesome" - When I press the "Insert Link" button - And I press the "Remove link" button - Then the "Content" HTML field should not contain "awesome" - # Required to avoid "unsaved changed" browser dialog - Then I press the "Save draft" button \ No newline at end of file diff --git a/tests/behat/features/insert-an-image.feature b/tests/behat/features/insert-an-image.feature deleted file mode 100644 index 742f8f71b..000000000 --- a/tests/behat/features/insert-an-image.feature +++ /dev/null @@ -1,95 +0,0 @@ -@assets -Feature: Insert an image into a page - As a cms author - I want to insert an image into a page - So that I can insert them into my content efficiently - - Background: - Given a "page" "About Us" - #And a "file" "assets/folder1/file1.jpg" - #And a "file" "assets/folder1/file3.jpg" - #And a "file" "assets/folder1/folder1.1/file2.jpg" - #And a "folder" "assets/folder2" - And I am logged in with "ADMIN" permissions - And I go to "/admin/pages" - And I click on "About Us" in the tree - - Scenario: I can insert an image from a URL - Given I press the "Insert Media" button - Then I should see "Choose files to upload..." - - When I press the "From the web" button - And I fill in "RemoteURL" with "http://www.silverstripe.com/themes/sscom/images/silverstripe_logo_web.png" - And I press the "Add url" button - Then I should see "silverstripe_logo_web.png (www.silverstripe.com)" in the ".ss-assetuploadfield span.name" element - - When I press the "Insert" button - Then the "Content" HTML field should contain "silverstripe_logo_web.png" - # Required to avoid "unsaved changed" browser dialog - Then I press the "Save draft" button - - @todo - Scenario: I can insert an image uploaded from my own computer - Given I press the "Insert Media" button - And I press the "From your computer" button - # TODO Figure out how to provide the file - And I attach the file "testfile.jpg" to "AssetUploadField" with HTML5 - Then the upload field should have successfully uploaded "testfile.jpg" - When I press the "Insert" button - Then the "Content" HTML field should contain "testfile.jpg" - - @todo - Scenario: I can insert an image from the CMS file store - Given I press the "Insert Media" button - And I press the "From the CMS" button - And I select "folder1" in the "Find in Folder" dropdown - And I select "file1.jpg" - When I press the "Insert" button - Then the "Content" HTML field should contain "file1.jpg" - - @todo - Scenario: I can insert multiple images at once - Given I press the "Insert Media" button - And I press the "From the CMS" button - And I select "folder1" in the "Find in Folder" dropdown - And I select "file1.jpg" - And I select "file3.jpg" - When I press the "Insert" button - Then the "Content" HTML field should contain "file1.jpg" - And the "Content" HTML field should contain "file1.jpg" - - @todo - Scenario: I can edit properties of an image before inserting it - Given I press the "Insert Media" button - And I press the "From the CMS" button - And I select "folder1" in the "Find in Folder" dropdown - And I select "file1.jpg" - And I follow "Edit" - When I fill in "Alternative text (alt)" with "My alt" - And I press the "Insert" button - Then the "Content" HTML field should contain "file1.jpg" - And the "Content" HTML field should contain "My alt" - - @todo - Scenario: I can edit dimensions of an image before inserting it - Given I press the "Insert Media" button - And I press the "From the CMS" button - And I select "folder1" in the "Find in Folder" dropdown - And I select "file1.jpg" - And I follow "Edit" - When I fill in "Width" with "10" - When I fill in "Height" with "20" - And I press the "Insert" button - Then the "Content" HTML field should contain "" - - @todo - Scenario: I can edit dimensions of an existing image - Given the "page" "About us" contains "" - And I reload the current page - When I highlight "" in the "Content" HTML field - And I press the "Insert Media" button - Then I should see "file1.jpg" - When I fill in "Width" with "10" - When I fill in "Height" with "20" - And I press the "Insert" button - Then the "Content" HTML field should contain "" \ No newline at end of file