{"action":"created","issue":{"url":"https://api.github.com/repos/laterpay/laterpay-wordpress-plugin/issues/769","labels_url":"https://api.github.com/repos/laterpay/laterpay-wordpress-plugin/issues/769/labels{/name}","comments_url":"https://api.github.com/repos/laterpay/laterpay-wordpress-plugin/issues/769/comments","events_url":"https://api.github.com/repos/laterpay/laterpay-wordpress-plugin/issues/769/events","html_url":"https://github.com/laterpay/laterpay-wordpress-plugin/issues/769","id":78054873,"number":769,"title":"Add New Basic Tests","user":{"login":"twoldrich","id":6638286,"avatar_url":"https://avatars.githubusercontent.com/u/6638286?v=3","gravatar_id":"","url":"https://api.github.com/users/twoldrich","html_url":"https://github.com/twoldrich","followers_url":"https://api.github.com/users/twoldrich/followers","following_url":"https://api.github.com/users/twoldrich/following{/other_user}","gists_url":"https://api.github.com/users/twoldrich/gists{/gist_id}","starred_url":"https://api.github.com/users/twoldrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twoldrich/subscriptions","organizations_url":"https://api.github.com/users/twoldrich/orgs","repos_url":"https://api.github.com/users/twoldrich/repos","events_url":"https://api.github.com/users/twoldrich/events{/privacy}","received_events_url":"https://api.github.com/users/twoldrich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/laterpay/laterpay-wordpress-plugin/labels/New%20Feature","name":"New Feature","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"mturalenka","id":6449022,"avatar_url":"https://avatars.githubusercontent.com/u/6449022?v=3","gravatar_id":"","url":"https://api.github.com/users/mturalenka","html_url":"https://github.com/mturalenka","followers_url":"https://api.github.com/users/mturalenka/followers","following_url":"https://api.github.com/users/mturalenka/following{/other_user}","gists_url":"https://api.github.com/users/mturalenka/gists{/gist_id}","starred_url":"https://api.github.com/users/mturalenka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mturalenka/subscriptions","organizations_url":"https://api.github.com/users/mturalenka/orgs","repos_url":"https://api.github.com/users/mturalenka/repos","events_url":"https://api.github.com/users/mturalenka/events{/privacy}","received_events_url":"https://api.github.com/users/mturalenka/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/laterpay/laterpay-wordpress-plugin/milestones/16","html_url":"https://github.com/laterpay/laterpay-wordpress-plugin/milestones/v0.9.13","labels_url":"https://api.github.com/repos/laterpay/laterpay-wordpress-plugin/milestones/16/labels","id":1194938,"number":16,"title":"v0.9.13","description":"","creator":{"login":"mturalenka","id":6449022,"avatar_url":"https://avatars.githubusercontent.com/u/6449022?v=3","gravatar_id":"","url":"https://api.github.com/users/mturalenka","html_url":"https://github.com/mturalenka","followers_url":"https://api.github.com/users/mturalenka/followers","following_url":"https://api.github.com/users/mturalenka/following{/other_user}","gists_url":"https://api.github.com/users/mturalenka/gists{/gist_id}","starred_url":"https://api.github.com/users/mturalenka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mturalenka/subscriptions","organizations_url":"https://api.github.com/users/mturalenka/orgs","repos_url":"https://api.github.com/users/mturalenka/repos","events_url":"https://api.github.com/users/mturalenka/events{/privacy}","received_events_url":"https://api.github.com/users/mturalenka/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":11,"state":"open","created_at":"2015-07-06T14:10:39Z","updated_at":"2015-08-14T11:27:38Z","due_on":"2015-07-23T21:00:00Z","closed_at":null},"comments":6,"created_at":"2015-05-19T11:45:19Z","updated_at":"2015-08-14T11:36:31Z","closed_at":null,"body":"## First Basic Tests\r\nThe following very few and very basic tests ensure, that users can still purchase individual PPU items and PPU time passes and access them after an update. It should be easy to extend those basic tests (e.g. to SIS purchases or logged-in PPU, different preview modes, different price types) later on, so I tried to make those tests as \"modular\" as possible. A detailed description for every test step and the used constants (c_...) are outlined in separate sections. Of course, the naming of constants (c_...), parameters (p_...) and modules is only for illustrative purposes.\r\n\r\n#### 1. User Can Purchase PPU Item With Current Release\r\n*This test checks, if users can successfully purchase and access a PPU item.*\r\n\r\nStep | Parameter | Description\r\n---- | --------- | -----------\r\nLogin | c_url_test_system, c_user, c_password | Log in to the test system\r\nInstall | c_current_plugin_version | Install the current plugin version\r\nCreate_Post | c_post_title, c_fulltext, c_teaser, c_revenue_model_ppu, c_price_ppu, c_price_type_individual, none | Create a test PPU post\r\nLogout | | Log out from the test system\r\nCheck_Post | c_post_title, p_is_fulltext_visible=false, p_is_teaser_visible=true, p_is_purchase_button_visible=true, p_is_overlay_visible=false, p_is_purchase_link_visible=true, p_are_time_passes_visible=false | Check, if teaser content, purchase button and purchase link are visible and if the fulltext is hidden. Overlay should not be visible (this tests with preview mode \"Teaser only\") and time passes should not be displayed (as there are none in this setting).\r\nPurchase_Post_PPU | c_post_title | Purchase the test post\r\nCheck_Post | c_post_title, p_is_fulltext_visible=true, p_is_teaser_visible=false, p_is_purchase_button_visible=false, p_is_overlay_visible=false, p_is_purchase_link_visible=false, p_are_time_passes_visible=false | Check, if teaser content, purchase button and purchase link are hidden and if the fulltext is visible. Overlay should not be visible (after the purchase and generally not in this setting) and time passes should not be displayed (as there are none in this setting).\r\nDeactivate | | Deactivate the LaterPay WordPress plugin\r\nDelete | | Delete the LaterPay WordPress Plugin\r\n\r\n**Assertion**: This test passes, if all the conditions of the **last \"Check_Post\"** step are fulfilled.\r\n\r\n#### 2. User Can Purchase PPU Time Pass With Current Release\r\n*This test checks, if users can successfully purchase and access a PPU time pass.*\r\n\r\nStep | Parameter | Description\r\n---- | --------- | -----------\r\nLogin | c_url_test_system, c_user, c_password | Log in to the test system\r\nInstall | c_current_plugin_version | Install the current plugin version\r\nCreate_Post | c_post_title, c_fulltext, c_teaser, c_revenue_model_ppu, c_price_ppu, c_price_type_individual, none | Create a test PPU post\r\nCreate_Time_Pass | c_time_pass_title, c_time_pass_description, c_validity_period, c_validity_unit, c_validity_access, c_revenue_model_ppu, c_price_ppu | Create a test PPU time pass\r\nLogout | | Log out from the test system\r\nCheck_Post | c_post_title, p_is_fulltext_visible=false, p_is_teaser_visible=true, p_is_purchase_button_visible=true, p_is_overlay_visible=false, p_is_purchase_link_visible=true, p_are_time_passes_visible=true | Check, if teaser content, purchase button and purchase link are visible and if the fulltext is hidden. Overlay should not be visible (this tests with preview mode \"Teaser only\") and time passes should be displayed.\r\nPurchase_Time_Pass_PPU | c_time_pass_title | Purchase the test time pass\r\nCheck_Post | c_post_title, p_is_fulltext_visible=true, p_is_teaser_visible=false, p_is_purchase_button_visible=false, p_is_overlay_visible=false, p_is_purchase_link_visible=false, p_are_time_passes_visible=false | Check, if teaser content, purchase button and purchase link are hidden and if the fulltext is visible. Overlay should not be visible (after the purchase and generally not in this setting) and time passes should not be displayed (as this time pass has already been purchased).\r\nDeactivate | | Deactivate the LaterPay WordPress plugin\r\nDelete | | Delete the LaterPay WordPress Plugin\r\n\r\n**Assertion**: This test passes, if all the conditions of the **last \"Check_Post\"** step are fulfilled.\r\n\r\n#### 3. User Can Access Individual PPU Purchase (Purchased Before Update)\r\n*This test checks, if users can access a PPU purchase with the current plugin version, which they did with the previous plugin version.*\r\n\r\nStep | Parameter | Description\r\n---- | --------- | -----------\r\nLogin | c_url_test_system, c_user, c_password | Log in to the test system\r\nInstall | c_previous_plugin_version | Install the previous plugin version\r\nCreate_Post | c_post_title, c_fulltext, c_teaser, c_revenue_model_ppu, c_price_ppu, c_price_type_individual, none | Create a test PPU post\r\nLogout | | Log out from the test system\r\nPurchase_Post_PPU | c_post_title | Purchase the test post\r\nLogin | c_url_test_system, c_user, c_password | Log in to the test system\r\nInstall | c_current_plugin_version | Install the current plugin version\r\nLogout | | Log out from the test system\r\nCheck_Post | c_post_title, p_is_fulltext_visible=true, p_is_teaser_visible=false, p_is_purchase_button_visible=false, p_is_overlay_visible=false, p_is_purchase_link_visible=false, p_are_time_passes_visible=false | Check, if teaser content, purchase button and purchase link are visible and if the fulltext is hidden. Overlay should not be visible (this tests with preview mode \"Teaser only\") and time passes should not be displayed (as there are none in this setting).\r\nDeactivate | | Deactivate the LaterPay WordPress plugin\r\nDelete | | Delete the LaterPay WordPress Plugin\r\n\r\n**Assertion**: This test passes, if all the conditions of the **last \"Check_Post\"** step are fulfilled.\r\n\r\n\r\n#### 4. User Can Access PPU Time Pass Purchase  (Purchased Before Update)\r\n*This test checks, if users can access a PPU time pass with the current plugin version, which they bought with the previous plugin version.*\r\n\r\nStep | Parameter | Description\r\n---- | --------- | -----------\r\nLogin | c_url_test_system, c_user, c_password | Log in to the test system\r\nInstall | c_previous_plugin_version | Install the previous plugin version\r\nCreate_Post | c_post_title, c_fulltext, c_teaser, c_revenue_model_ppu, c_price_ppu, c_price_type_individual, none | Create a test PPU post\r\nCreate_Time_Pass | p_time_pass_title, p_time_pass_description, p_validity_period, p_validity_unit, p_validity_access, p_revenue_model_ppu, p_price_ppu | Create a test PPU time pass\r\nLogout | | Log out from the test system\r\nPurchase_Time_Pass_PPU | c_time_pass_title | Purchase the test time pass\r\nLogin | c_url_test_system, c_user, c_password | Log in to the test system\r\nInstall | c_current_plugin_version | Install the current plugin version\r\nLogout | | Log out from the test system\r\nCheck_Post | c_post_title, p_is_fulltext_visible=true, p_is_teaser_visible=false, p_is_purchase_button_visible=false, p_is_overlay_visible=false, p_is_purchase_link_visible=false, p_are_time_passes_visible=false | Check, if teaser content, purchase button and purchase link are hidden and if the fulltext is visible. Overlay should not be visible (after the purchase and generally not in this setting) and time passes should not be displayed (as this time pass has already been purchased).\r\nDeactivate | | Deactivate the LaterPay WordPress plugin\r\nDelete | | Delete the LaterPay WordPress Plugin\r\n\r\n**Assertion**: This test passes, if all the conditions of the **last \"Check_Post\"** step are fulfilled.\r\n\r\n\r\n## Test Modules\r\nThis section contains all the modules, which are used in the tests above. Each module lists the exact action, that has to be taken and the involved element.\r\nExample: Login(p_url_test_system, p_user, p_password} is the step \"Login\" that is used for all the tests above. As three parameters, it needs the URL of the test system, the user name for an admin user and the corresponding password. (An explanation of the parameters can be found in the \"Constants\" section below.)\r\n\r\n#### Login(p_url_test_system, p_user, p_password)\r\n*Log in to the WordPress test installation*\r\n\r\nAction | Involved Element or URL\r\n------ | -----------------------\r\nGo to {p_url_test_system}/wp-admin | id=\"user_login\"\r\nEnter user name {p_user} and password {p_password} | id=\"user_pass\" \r\nClick \"Login\" button | id=\"wp-submit\"\r\n\r\n#### Install(p_plugin_version)\r\n*Install and activate a specific version of the LaterPay WordPress plugin*\r\n\r\nAction | Involved Element or URL\r\n------ | -----------------------\r\nClick the \"Plugins\" navigation item | ...wp-admin/plugins.php\r\nClick the \"Add New\" button | .../wp-admin/plugin-install.php\r\nClick the \"Upload Plugin\" button | .../wp-admin/plugin-install.php?tab=upload\r\nClick the \"Select File\" button | id=\"pluginzip\"\r\nSelect the zip file with plugin version {p_plugin_version} |\r\nClick the \"Install\" button | id=\"install-plugin-submit\"\r\nClick the \"Activate\" link | .../wp-admin/plugins.php?action=activate...\r\n\r\n#### Deactivate\r\n*Deactivates the LaterPay WordPress plugin*\r\n\r\nAction | Involved Element or URL\r\n------ | -----------------------\r\nClick the \"Plugins\" navigation item | ...wp-admin/plugins.php\r\nClick the \"Deactivate\" link for the LaterPay plugin | class=\"deactivate\"\r\n\r\n#### Delete\r\n*Deletes the LaterPay WordPress plugin*\r\n\r\nAction | Involved Element or URL\r\n------ | -----------------------\r\nClick the \"Plugins\" navigation item | ...wp-admin/plugins.php\r\nClick the \"Delete\" link for the LaterPay plugin | class=\"Delete\"\r\nConfirm the question, if you want to delete the plugin |\r\n\r\n#### Create_Post(p_post_title, p_fulltext, p_teaser,p_revenue_model, p_price, p_price_type, p_category)\r\n*Creates a test posts with the given parameters*\r\n\r\nAction | Involved Element or URL\r\n------ | -----------------------\r\nClick the \"Posts\" navigation item | .../wp-admin/edit.php\r\nClick the \"Add New\" button | .../wp-admin/post-new.php\r\nEnter a title {p_post_title} in the title input | name=\"post_title\"\r\nEnter a fulltext {p_fulltext} in the post content input | name=\"content\"\r\nEnter a teaser {p_teaser} in the teaser input | name=\"laterpay_post_teaser\"\r\nAssign the post to one/multiple categories, if {p_category} is not \"none\" | id=\"categorychecklist\" \r\nSelect the price type {p_price_type} from the price type button group | e.g. id=\"lp_js_useIndividualPrice\" for individual prices\r\nEnter a price {p_price} in the price input | name=\"post-price\"\r\nSelect the revenue model {p_revenue_model} from the revenue model button group | id=\"lp_js_postPriceRevenueModel\"\r\nClick the \"Publish\" button | name=\"publish\"\r\n\r\n#### Create_Time_Pass(p_time_pass_title, p_time_pass_description, p_validity_period, p_validity_unit, p_validity_access, p_revenue_model, p_price)\r\n*Creates a time pass with the given parameters*\r\n\r\nAction | Involved Element or URL\r\n------ | -----------------------\r\nClick the \"LaterPay\" navigation item | .../wp-admin/admin.php?page=laterpay-plugin\r\nClick the \"Pricing\" navigation item | .../wp-admin/admin.php?page=laterpay-pricing-tab\r\nClick the \"Create\" button to add a time pass | id=\"lp_js_addTimePass\"\r\nEnter a title {p_time_pass_title} in the title input | name=\"title\"\r\nEnter a description {p_description} in the description input | name=\"description\"\r\nSelect the accessible content {p_validity_access} from the select | name=\"duration\"\r\nSelect the validiy period {p_validity_period} from the select | name=\"duration\"\r\nSelect the unit for the validiy period {p_validity_unit} from the select | name=\"period\"\r\nEnter a price {p_price} in the price input | name=\"price\"\r\nSelect the revenue model {p_revenue_model} with the revenue model toggle | name=\"revenue_model\"\r\nClick the \"Save\" button | class=\"lp_js_saveTimePass\"\r\n\r\n#### Logout\r\n*Logs the test user out from the test system*\r\n\r\nAction | Involved Element or URL\r\n------ | -----------------------\r\nClick the \"Logout\" link | id=\"wp-admin-bar-logout\"\r\n\r\n#### Check_Post(p_post_title, p_is_fulltext_visible, p_is_teaser_visible, p_is_purchase_button_visible, p_is_overlay_visible, p_is_purchase_link_visible, p_are_time_passes_visible)\r\n*Checks, if certain elements of a post are visible for the user or not. This check is often used as an assertion for the tests in this ticket.*\r\n\r\nAction | Involved Element or URL\r\n------ | -----------------------\r\nGo to post {p_post_title} |\r\nCheck, if the fulltext is visible / not visible (depending on {p_is_fulltext_visible}) | class=\"entry-content\"\r\nCheck, if the teaser is visible / not visible (depending on {p_is_teaser_visible}) | class=\"lp_teaser-content\"\r\nCheck, if the teaser_overlay is visible / not visible (depending on {p_is_overlay_visible}) | class=\"lp_benefits\"\r\nCheck, if the purchase_button is visible / not visible (depending on {p_is_purchase_button_visible}) | class=\"lp_purchase-button\"\"\r\n\r\n#### Purchase_Post_PPU(p_post_title)\r\n*Purchase the given PPU post*\r\n\r\nAction | Involved Element or URL\r\n------ | -----------------------\r\nGo to the article page for post {p_post_title} |\r\nClick the LaterPay purchase button | class=\"lp_purchase-button\"\r\nAccept the LaterPay Terms and Conditions | name=\"agree\"\r\nConfirm the purchase in the LaterPay purchase dialog | id=\"nextbuttons\"\r\n\r\n#### Purchase_Time_Pass_PPU(p_time_pass_title)\r\n*Purchase the given PPU time pass*\r\n\r\nAction | Involved Element or URL\r\n------ | -----------------------\r\nGo to the article page for post {p_time_pass_title} |\r\nClick the LaterPay purchase button in the respective time pass | class=\"lp_purchase-button\"\r\nAccept the LaterPay Terms and Conditions | name=\"agree\"\r\nConfirm the purchase in the LaterPay purchase dialog | id=\"nextbuttons\"\r\n\r\n\r\n## Test Variants\r\nThe basic tests have to performed under various conditions:\r\n\r\nVariant | Description\r\n------- | -----------\r\nWithout Caching Plugin | No caching plugin is installed on the test environment\r\nWith Caching Plugin | A caching plugin (WP Super Cache) is installed and active on the test environment\r\n\r\n\r\n## Constants\r\nThe following constants are used as placeholders in this ticket:\r\n\r\nConstant | Value | Description\r\n-------- | ----- | -----------\r\nc_user | \"admin\" | User name for admin test account\r\nc_passwort | \"admin\" | Passwort for admin test account\r\nc_post_title | \"Test Post\" | Title for test posts\r\nc_teaser | 200 words of Lorem Ipsum (http://www.loremipsum.de/)  | Teaser text for test posts\r\nc_fulltext | 1000 words of Lorem Ipsum | Fulltext for test posts\r\nc_price_ppu | 29 | Price for PPU test posts in Cents\r\nc_price_sis | 249 | Price for SIS test posts in Cents\r\nc_revenue_model_ppu | \"PPU\" | Revenue model PPU\r\nc_revenue_model_sis | \"SIS\" | Revenue model SIS\r\nc_time_pass_title | \"Test Time Pass\" | Title for test time pass\r\nc_time_pass_description | \"This is a test time pass\" | Description for test time pass\r\nc_time_pass_access | All content | Access definition for test time pass\r\nc_time_pass_validity_period | 1 | Time valid for test time pass\r\nc_time_pass_validity_unit | \"Day\" | Unit for the validity period\r\nc_url_test_system | xxx.xxx.xx.xx/xx | URL of the respective WordPress test installation\r\nc_current_plugin_version | 0.9.11.4 | Current version of the LaterPay WordPress plugin, has to be changed with every release\r\nc_previous_plugin_version | 0.9.11.5 | Previous version of the LaterPay WordPress plugin, has to be changed with every release\r\nc_price_type_individual | \"Individual\" | Price type \"Individual price\"\r\nc_price_type_individual_dynamic | \"Individual Dynamic\" | Price type \"Individual dynamic price\r\nc_price_type_category | \"Category Default\" | Price type \"Category default price\"\r\nc_price_type_global | \"Global Default\" | Price type \"Global default price\""},"comment":{"url":"https://api.github.com/repos/laterpay/laterpay-wordpress-plugin/issues/comments/131083963","html_url":"https://github.com/laterpay/laterpay-wordpress-plugin/issues/769#issuecomment-131083963","issue_url":"https://api.github.com/repos/laterpay/laterpay-wordpress-plugin/issues/769","id":131083963,"user":{"login":"mturalenka","id":6449022,"avatar_url":"https://avatars.githubusercontent.com/u/6449022?v=3","gravatar_id":"","url":"https://api.github.com/users/mturalenka","html_url":"https://github.com/mturalenka","followers_url":"https://api.github.com/users/mturalenka/followers","following_url":"https://api.github.com/users/mturalenka/following{/other_user}","gists_url":"https://api.github.com/users/mturalenka/gists{/gist_id}","starred_url":"https://api.github.com/users/mturalenka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mturalenka/subscriptions","organizations_url":"https://api.github.com/users/mturalenka/orgs","repos_url":"https://api.github.com/users/mturalenka/repos","events_url":"https://api.github.com/users/mturalenka/events{/privacy}","received_events_url":"https://api.github.com/users/mturalenka/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T11:36:31Z","updated_at":"2015-08-14T11:36:31Z","body":"@twoldrich could you please assist with getting required env?"}}