Skip to content

Commit

Permalink
[Behat] Removed duplicated folders (#947)
Browse files Browse the repository at this point in the history
* [Behat] Removed additional ContentManagement folders
* [Behat] Removed duplicated TrashTest folders
  • Loading branch information
mnocon authored Oct 17, 2023
1 parent f585bc2 commit 9b6f190
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 35 deletions.
44 changes: 25 additions & 19 deletions features/standard/ContentManagement.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@IbexaOSS @IbexaContent @IbexaExperience @IbexaCommerce
@IbexaOSS @IbexaContent @IbexaExperience @IbexaCommerce @javascript
Feature: Content items creation
As an administrator
In order to manage content to my site
Expand All @@ -7,23 +7,25 @@ Feature: Content items creation
Background:
Given I am logged as admin

@javascript @APIUser:admin
Scenario: Content moving can be cancelled
Given I create "folder" Content items
Given a "folder" Content item named "ContentManagement" exists in root
| name | short_name |
| ContentManagement | ContentManagement |
And I create "folder" Content items
| name | short_name | parentPath | language |
| ContentManagement | ContentManagement | root | eng-GB |
| FolderToCancelMove | FolderToCancelMove | ContentManagement | eng-GB |
And I'm on Content view Page for "ContentManagement/FolderToCancelMove"
When I click on the edit action bar button "Move"
And I select content "Media" through UDW
And I close the UDW window
Then I should be on Content view Page for "ContentManagement/FolderToCancelMove"

@javascript @APIUser:admin
Scenario: Content can be moved
Given I create "folder" Content items
Given a "folder" Content item named "ContentManagement" exists in root
| name | short_name |
| ContentManagement | ContentManagement |
And I create "folder" Content items
| name | short_name | parentPath | language |
| ContentManagement | ContentManagement | root | eng-GB |
| FolderToMove | FolderToMove | ContentManagement | eng-GB |
And I'm on Content view Page for "ContentManagement/FolderToMove"
When I click on the edit action bar button "Move"
Expand All @@ -34,23 +36,25 @@ Scenario: Content can be moved
And I'm on Content view Page for "ContentManagement"
And there's no "FolderToMove" "Folder" on Subitems list

@javascript @APIUser:admin
Scenario: Content copying can be cancelled
Given I create "folder" Content items
Given a "folder" Content item named "ContentManagement" exists in root
| name | short_name |
| ContentManagement | ContentManagement |
And I create "folder" Content items
| name | short_name | parentPath | language |
| ContentManagement | ContentManagement | root | eng-GB |
| FolderToCopyCancel | FolderToCopyCancel | ContentManagement | eng-GB |
And I'm on Content view Page for "ContentManagement/FolderToCopyCancel"
When I click on the edit action bar button "Copy"
And I select content "Media" through UDW
And I close the UDW window
Then I should be on Content view Page for "ContentManagement/FolderToCopyCancel"

@javascript @APIUser:admin
Scenario: Content can be copied
Given I create "folder" Content items
Given a "folder" Content item named "ContentManagement" exists in root
| name | short_name |
| ContentManagement | ContentManagement |
And I create "folder" Content items
| name | short_name | parentPath | language |
| ContentManagement | ContentManagement | root | eng-GB |
| FolderToCopy | FolderToCopy | ContentManagement | eng-GB |
And I'm on Content view Page for "ContentManagement/FolderToCopy"
When I click on the edit action bar button "Copy"
Expand All @@ -61,23 +65,25 @@ Scenario: Content can be copied
And I'm on Content view Page for "ContentManagement"
And there's a "FolderToCopy" "Folder" on Subitems list

@javascript @APIUser:admin
Scenario: Subtree copying can be cancelled
Given I create "folder" Content items
Given a "folder" Content item named "ContentManagement" exists in root
| name | short_name |
| ContentManagement | ContentManagement |
And I create "folder" Content items
| name | short_name | parentPath | language |
| ContentManagement | ContentManagement | root | eng-GB |
| FolderToSubtreeCopyCancel | FolderToSubtreeCopyCancel | ContentManagement | eng-GB |
And I'm on Content view Page for "ContentManagement/FolderToSubtreeCopyCancel"
When I click on the edit action bar button "Copy Subtree"
And I select content "Media" through UDW
And I close the UDW window
Then I should be on Content view Page for "ContentManagement/FolderToSubtreeCopyCancel"

@javascript @APIUser:admin
Scenario: Subtree can be copied
Given I create "folder" Content items
Given a "folder" Content item named "ContentManagement" exists in root
| name | short_name |
| ContentManagement | ContentManagement |
And I create "folder" Content items
| name | short_name | parentPath | language |
| ContentManagement | ContentManagement | root | eng-GB |
| FolderToSubtreeCopy | FolderToSubtreeCopy | ContentManagement | eng-GB |
And I'm on Content view Page for "ContentManagement/FolderToSubtreeCopy"
When I click on the edit action bar button "Copy Subtree"
Expand Down
35 changes: 19 additions & 16 deletions features/standard/Trash.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@IbexaOSS @IbexaContent @IbexaExperience @IbexaCommerce
@IbexaOSS @IbexaContent @IbexaExperience @IbexaCommerce @javascript
Feature: Trash management
As an administrator
In order to manage content on my site
Expand All @@ -7,35 +7,38 @@ Feature: Trash management
Background:
Given I am logged as admin

@javascript @APIUser:admin
Scenario: Trash can be emptied
Given I create "folder" Content items
Given a "folder" Content item named "TrashTest" exists in root
| name | short_name |
| TrashTest | TrashTest |
And I create "folder" Content items
| name | short_name | parentPath | language |
| TrashTest | TrashTest | root | eng-GB |
| FolderToTrash | FolderToTrash | TrashTest | eng-GB |
And I send "TrashTest/FolderToTrash" to the Trash
And I open "Trash" page in admin SiteAccess
And trash is not empty
When I empty the trash
Then trash is empty

@javascript @APIUser:admin
Scenario: Content can be moved to trash
Given I create "folder" Content items
| name | short_name | parentPath | language |
| TrashTest | TrashTest | root | eng-GB |
Given a "folder" Content item named "TrashTest" exists in root
| name | short_name |
| TrashTest | TrashTest |
And I create "folder" Content items
| name | short_name | parentPath | language |
| FolderToTrashManually | FolderToTrashManually | TrashTest | eng-GB |
And I'm on Content view Page for "TrashTest/FolderToTrashManually"
When I send content to trash
Then success notification that "Location 'FolderToTrashManually' moved to Trash." appears
And I open "Trash" page in admin SiteAccess
And there is a "Folder" "FolderToTrashManually" on Trash list

@javascript @APIUser:admin
Scenario: Element in trash can be deleted
Given I create "folder" Content items
Given a "folder" Content item named "TrashTest" exists in root
| name | short_name |
| TrashTest | TrashTest |
And I create "folder" Content items
| name | short_name | parentPath | language |
| TrashTest | TrashTest | root | eng-GB |
| DeleteFromTrash | DeleteFromTrash | TrashTest | eng-GB |
And I send "TrashTest/DeleteFromTrash" to the Trash
And I open "Trash" page in admin SiteAccess
Expand All @@ -46,9 +49,8 @@ Feature: Trash management
Then success notification that "Deleted selected item(s) from Trash." appears
And there is no "Folder" "DeleteFromTrash" on Trash list

@javascript @APIUser:admin
Scenario: Element in trash can be restored
Given I create "folder" Content items in root in "eng-GB"
Given a "folder" Content item named "TrashTest" exists in root
| name | short_name |
| TrashTest | TrashTest |
And I create "folder" Content items in "TrashTest" in "eng-GB"
Expand All @@ -64,11 +66,12 @@ Feature: Trash management
And there is no "Folder" "RestoreFromTrash" on Trash list
And there exists Content view Page for "TrashTest/RestoreFromTrash"

@javascript @APIUser:admin
Scenario: Element in trash can be restored under new location
Given I create "folder" Content items
Given a "folder" Content item named "TrashTest" exists in root
| name | short_name |
| TrashTest | TrashTest |
And I create "folder" Content items
| name | short_name | parentPath | language |
| TrashTest | TrashTest | root | eng-GB |
| RestoreFromTrashNewLocation | RestoreFromTrashNewLocation | TrashTest | eng-GB |
And I send "TrashTest/RestoreFromTrashNewLocation" to the Trash
And I open "Trash" page in admin SiteAccess
Expand Down

0 comments on commit 9b6f190

Please sign in to comment.