32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-12-27 10:22:38 +00:00
weblinks/tests/_data/scenarios/acceptance.txt

204 lines
10 KiB
Plaintext
Raw Normal View History

I WANT TO TEST CATEGORY CREATION IN /ADMINISTRATOR/
I am "Administrator"
I do administrator login ""
I am going to "Navigate to Categories page in /administrator/"
I am on page "administrator/index.php?option=com_categories&extension=com_weblinks"
I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']"
I expect to "see categories page"
I check for php notices or warnings ""
I am going to "try to save a category with a filled title"
I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.add')\"]"]"
I wait for text "Category Manager: Add A New Weblinks Category"," '30"," ['css' => 'h1']"
I fill field(['id' => 'jform_title'], 'automated testing' . rand "1"," 100)"
I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.apply')\"]"]"
I expect to "see a success message after saving the category"
I see "Category successfully saved"," ['id' => 'system-message-container']"
I WANT TO TEST CATEGORY CREATION IN /ADMINISTRATOR/ WITHOUT TITLE
I am "Administrator"
I do administrator login ""
I am going to "Navigate to Categories page in /administrator/"
I am on page "administrator/index.php?option=com_categories&extension=com_weblinks"
I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']"
I expect to "see categories page"
I am going to "try to save a category with empty title and it should fail"
I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.add')\"]"]"
I wait for text "Category Manager: Add A New Weblinks Category"," '30"," ['css' => 'h1']"
I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.apply')\"]"]"
I expect to "see an error when trying to save a category without title"
I see "Invalid field: Title"," ['id' => 'system-message-container']"
I WANT TO TEST CATEGORY PUBLISHING IN /ADMINISTRATOR/
I am "Administrator"
I do administrator login ""
I am going to "Navigate to Categories page in /administrator/"
I am on page "administrator/index.php?option=com_categories&extension=com_weblinks"
I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']"
I expect to "see categories page"
I check for php notices or warnings ""
I am going to "try to save a category with a filled title"
I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.add')\"]"]"
I wait for text "Category Manager: Add A New Weblinks Category"," '30"," ['css' => 'h1']"
I fill field(['id' => 'jform_title'], 'automated testing pub' . rand "1"," 100)"
I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.save')\"]"]"
I expect to "see a success message after saving the category"
I see "Category successfully saved"," ['id' => 'system-message-container']"
I am going to "Search for automated testing"
I fill field "['xpath' => "//input[@id=\"filter_search\"]"]"," "automated testing pub" . "\n""
I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']"
I am going to "Select the first weblink"
I click "['xpath' => "//input[@id=\"cb0\"]"]"
I am going to "try to publish a weblink category"
I click(['xpath' => "//button[@onclick=\"if (document.admin form.boxchecked.value==0){alert('please first make a selection from the list.');}else{ joomla.submitbutton "categories.publish')}\"]"]"
I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']"
I expect to "see a success message after publishing the category"
I see "1 category successfully published."," ['id' => 'system-message-container']"
I WANT TO TEST CATEGORY UNPUBLISHING IN /ADMINISTRATOR/
I am "Administrator"
I do administrator login ""
I am going to "Navigate to Categories page in /administrator/"
I am on page "administrator/index.php?option=com_categories&extension=com_weblinks"
I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']"
I expect to "see categories page"
I check for php notices or warnings ""
I am going to "try to save a category with a filled title"
I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.add')\"]"]"
I wait for text "Category Manager: Add A New Weblinks Category"," '30"," ['css' => 'h1']"
I fill field(['id' => 'jform_title'], 'automated testing unpub' . rand "1"," 100)"
I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "category.save')\"]"]"
I expect to "see a success message after saving the category"
I see "Category successfully saved"," ['id' => 'system-message-container']"
I am going to "Search for automated testing"
I fill field "['xpath' => "//input[@id=\"filter_search\"]"]"," "automated testing unpub" . "\n""
I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']"
I am going to "Select the first weblink"
I click "['xpath' => "//input[@id=\"cb0\"]"]"
I am going to "Try to publish a weblink category"
I click(['xpath' => "//button[@onclick=\"if (document.admin form.boxchecked.value==0){alert('please first make a selection from the list.');}else{ joomla.submitbutton "categories.publish')}\"]"]"
I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']"
I expect to "See a success message after publishing the category"
I see "1 category successfully published."," ['id' => 'system-message-container']"
I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']"
I am going to "Select the first weblink"
I click "['xpath' => "//input[@id=\"cb0\"]"]"
I am going to "Try to unpublish a weblink category"
I click(['xpath' => "//button[@onclick=\"if (document.admin form.boxchecked.value==0){alert('please first make a selection from the list.');}else{ joomla.submitbutton "categories.unpublish')}\"]"]"
I wait for text "Weblinks: Categories"," '30"," ['css' => 'h1']"
I expect to "See a success message after unpublishing the category"
I see "1 category successfully unpublished"," ['id' => 'system-message-container']"
I WANT TO TEST WEBLINK CREATION IN /ADMINISTRATOR/
I am "Administrator"
I do administrator login ""
I am going to "Navigate to Weblinks page in /administrator/"
I am on page "administrator/index.php?option=com_weblinks"
I wait for text "Web Links"," '30"," ['css' => 'h1']"
I expect to "see weblinks page"
I check for php notices or warnings ""
I am going to "try to save a weblink with a filled title and URL"
I click "New"
I wait for text "Web Link: New"," '30"," ['css' => 'h1']"
I fill field "['id' => 'jform_title']"," $this->title"
I fill field "['id' => 'jform_url']"," $this->url"
I click(['xpath' => "//button[@onclick=\"joomla.submitbutton "weblink.save')\"]"]"
I wait for text "Web Links"," '30"," ['css' => 'h1']"
I expect to "see a success message and the weblink added after saving the weblink"
I see "Web link successfully saved"," ['id' => 'system-message-container']"
I see "$this->title"," ['id' => 'weblinkList']"
I WANT TO TEST WEBLINK REMOVAL IN /ADMINISTRATOR/
I am "Administrator"
I do administrator login ""
I am going to "Navigate to Weblinks page in /administrator/"
I am on page "administrator/index.php?option=com_weblinks"
I wait for text "Web Links","30","['css' => 'h1']"
I expect to "see weblinks page"
I am going to "Search the just saved weblink"
I search for item "$this->title"
I wait for text "Web Links","30","['css' => 'h1']"
I am going to "Delete the just saved weblink"
I check all results ""
I click(['xpath'=> "//button[@onclick=\"if (document.admin form.boxchecked.value==0){alert('please first make a selection from the list.');}else{ joomla.submitbutton "weblinks.trash')}\"]"]"
I wait for text "Web Links","30","['css' => 'h1']"
I expect to "see a success message and the weblink removed from the list"
I see "Web link successfully trashed","['id' => 'system-message-container']"
I cant see "$this->title","['id' => 'weblinkList']"
I WANT TO TEST WEBLINK REMOVAL IN /ADMINISTRATOR/
I am "Administrator"
I do administrator login ""
I am going to "Navigate to Weblinks page in /administrator/"
I am on page "administrator/index.php?option=com_weblinks"
I wait for text "Web Links","30","['css' => 'h1']"
I expect to "see weblinks page"
I select option in chosen "- Select Status -"," 'Trashed"
I am going to "Search the just saved weblink"
I search for item "$this->title"
I wait for text "Web Links","30","['css' => 'h1']"
I am going to "Delete the just saved weblink"
I check all results ""
I click "['xpath'=> '//div[@id="toolbar-delete"]/button']"
I wait for text "Web Links","30","['css' => 'h1']"
I expect to "see a success message and the weblink removed from the list"
I see "1 web link successfully deleted.","['id' => 'system-message-container']"
I cant see "$this->title","['id' => 'weblinkList']"
I WANT TO TEST WEBLINK CREATION WITHOUT TITLE FAILS IN /ADMINISTRATOR/
I am "Administrator"
I do administrator login ""
I am going to "Navigate to Weblinks page in /administrator/"
I am on page "administrator/index.php?option=com_weblinks"
I wait for text "Web Links","30","['css' => 'h1']"
I expect to "see weblinks page"
I check for php notices or warnings ""
I am going to "try to save a weblink with empty title and it should fail"
I click(['xpath'=> "//button[@onclick=\"joomla.submitbutton "weblink.add')\"]"]"
I wait for text "Web Link: New","30","['css' => 'h1']"
I click(['xpath'=> "//button[@onclick=\"joomla.submitbutton "weblink.apply')\"]"]"
I expect to "see an error when trying to save a weblink without title and without URL"
I see "Invalid field: Title","['id' => 'system-message-container']"
I see "Invalid field: URL","['id' => 'system-message-container']"
I WANT TO TEST LISTING A CATEGORY OF WEBLINKS IN FRONTEND
I am "Administrator"
I do administrator login ""
I create weblink "$this->title"," $this->url"
I create menu item "$this->menuItem"," 'Weblinks"," 'List All Web Link Categories"," 'Main Menu"
I comment "I want to check if the menu entry exists in the frontend"
I am on page "index.php?option=com_weblinks"
I expect to "see weblink categories"
I wait for text "Uncategorised","30"," ['css' => 'h3']"
I check for php notices or warnings ""
I comment "I open the uncategorised Weblink Category"
I click "['link' => 'Uncategorised']"
I wait for text "Uncategorised","30"," ['css' => 'h2']"
I expect to "see the weblink we created"
I see element "['link' => $this->title]"
I see element "['xpath' => "//a[@href='$this->url']"]"
I WANT TO INSTALL JOOMLA
I am "Administrator"
I install joomla ""
I do administrator login ""
I set error reporting to development ""
I WANT TO INSTALL WEBLINKS
I do administrator login ""
I comment('get weblinks repository folder from acceptance.suite.yml "see _support/AcceptanceHelper.php)"
I get configuration "repo_folder"
I install extension from folder "$path . 'src/com_weblinks/"
I do administrator logout ""