Newer
Older

Rajab Natshah
committed
Feature: File & Media Management - Assets Management - Image media and their usage list page for site admins
As a user with permission to manage files in the site
I want to be able to see the list of files
So that I will be able to manage files, see where they have been used in contents.
Background:
Given I am a logged in user with the "test_site_admin" user
@javascript @local @development @staging @production

Rajab Natshah
committed
Scenario: Check if content admins can access the content files page

Rajab Natshah
committed
When I go to "admin/content/media"

Rajab Natshah
committed
And I wait
Then I should see "Add media"
And I should not see "Access denied"
@local @development @staging @production

Rajab Natshah
committed
Scenario: Check if we do have a file named Flag Earth, if not then upload the file dependently

Rajab Natshah
committed
When I go to "/media/add/image"
And I wait
Then I should see "Allowed types: png gif jpg jpeg."

Rajab Natshah
committed
When I attach the file "flag-earth.jpg" to "edit-field-media-image-0-upload"

Rajab Natshah
committed
And I wait
And I press the "Save" button
And I wait

Rajab Natshah
committed
And I fill in "Flag Earth in space" for "field_media_image[0][alt]"
And I fill in "Flag Earth all earth in space" for "field_media_image[0][title]"

Rajab Natshah
committed
And I fill in "Flag Earth" for "name[0][value]"

Rajab Natshah
committed
And I check the box "Show in media library"

Rajab Natshah
committed
And I press the "Save" button
And I wait
Then I should see "Flag Earth"
And I wait

Rajab Natshah
committed
When I go to "admin/content/media"

Rajab Natshah
committed
Then I should see "Add media"
And I should see the "Edit" in the "Flag Earth" row
@javascript @local @development @staging @production

Rajab Natshah
committed
Scenario: Check if content admins can edit files

Rajab Natshah
committed
When I go to "/admin/content/media"

Rajab Natshah
committed
And I wait
Then I should see "Add media"

Rajab Natshah
committed
When I fill in "Flag Earth" for "edit-name"

Rajab Natshah
committed
And I press the "Filter" button

Rajab Natshah
committed
And I wait
Then I should see "Flag Earth"

Rajab Natshah
committed
When I click "Edit" in the "Flag Earth" row

Rajab Natshah
committed
And I wait
Then I should see "Edit Image Flag Earth"

Rajab Natshah
committed
When I fill in "Flag Earth after edit" for "name[0][value]"

Rajab Natshah
committed
And I check the box "Show in media library"

Rajab Natshah
committed
And I press the "Save" button
And I wait
Then I should see "Image Flag Earth after edit has been updated."
@javascript @local @development @staging @production

Rajab Natshah
committed
Scenario: Check if content admins can delete files

Rajab Natshah
committed
When I go to "/admin/content/media"

Rajab Natshah
committed
And I wait
Then I should see "Add media"

Rajab Natshah
committed
When I fill in "Flag Earth after edit" for "edit-name"

Rajab Natshah
committed
And I press the "Apply" button
And I wait
Then I should see "Flag Earth after edit"

Rajab Natshah
committed
When I click "Edit" in the "Flag Earth after edit" row

Rajab Natshah
committed
And I wait
Then I should see "Flag Earth after edit"

Rajab Natshah
committed
When I click "edit-delete"

Rajab Natshah
committed
And I wait
Then I should see "This action cannot be undone."
When I press the "Delete" button
And I wait

Rajab Natshah
committed
Then I should see "The media item Flag Earth after edit has been deleted."