{"action":"created","comment":{"url":"https://api.github.com/repos/edx/ecommerce/pulls/comments/78003639","id":78003639,"diff_hunk":"@@ -72,6 +73,28 @@ define([\n                 });\n             });\n \n+            describe('Editing dynamic coupon', function() {\n+                beforeEach(function() {\n+                    model = Coupon.findOrCreate(dynamic_coupon);\n+                    model.updateSeatData();\n+                    view = new CouponCreateEditView({model: model, editing: true}).render();\n+                });\n+\n+                it('should display dynamic catalog information.', function() {\n+                    expect(view.$('#catalog-query').val()).toEqual(model.get('catalog_query'));\n+                    expect(view.$('#non-credit').is(':checked')).toEqual(true);\n+                    expect(view.$('#verified').is(':checked')).toEqual(true);\n+                    expect(view.$('#professional').is(':checked')).toEqual(true);\n+                });\n+\n+                it('should hide checkboxes if credit seat type.', function() {\n+                    var credit_seat_type = ['credit'];\n+                    model.set('course_seat_types', credit_seat_type);\n+                    view.render();\n+                    expect(view.$('.non-credit-seats').hasClass('hidden')).toEqual(true);","path":"ecommerce/static/js/test/specs/views/coupon_edit_view_spec.js","position":32,"original_position":32,"commit_id":"f6e962a9cfca78bbf9df8e0269ce3df4ee051efc","original_commit_id":"f6e962a9cfca78bbf9df8e0269ce3df4ee051efc","user":{"login":"iivic","id":16685686,"avatar_url":"https://avatars.githubusercontent.com/u/16685686?v=3","gravatar_id":"","url":"https://api.github.com/users/iivic","html_url":"https://github.com/iivic","followers_url":"https://api.github.com/users/iivic/followers","following_url":"https://api.github.com/users/iivic/following{/other_user}","gists_url":"https://api.github.com/users/iivic/gists{/gist_id}","starred_url":"https://api.github.com/users/iivic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iivic/subscriptions","organizations_url":"https://api.github.com/users/iivic/orgs","repos_url":"https://api.github.com/users/iivic/repos","events_url":"https://api.github.com/users/iivic/events{/privacy}","received_events_url":"https://api.github.com/users/iivic/received_events","type":"User","site_admin":false},"body":"You could write this line as expect(view.$('.non-credit-seats.hidden').toExists();\r\nSomeone created this matcher in /js/test/specs/views/coupon_detail_view_spec.js. Maybe move this matcher to utils?","created_at":"2016-09-08T13:21:40Z","updated_at":"2016-09-08T13:21:40Z","html_url":"https://github.com/edx/ecommerce/pull/929#discussion_r78003639","pull_request_url":"https://api.github.com/repos/edx/ecommerce/pulls/929","_links":{"self":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/comments/78003639"},"html":{"href":"https://github.com/edx/ecommerce/pull/929#discussion_r78003639"},"pull_request":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/929"}}},"pull_request":{"url":"https://api.github.com/repos/edx/ecommerce/pulls/929","id":83931127,"html_url":"https://github.com/edx/ecommerce/pull/929","diff_url":"https://github.com/edx/ecommerce/pull/929.diff","patch_url":"https://github.com/edx/ecommerce/pull/929.patch","issue_url":"https://api.github.com/repos/edx/ecommerce/issues/929","number":929,"state":"open","locked":false,"title":"[WIP] Credit checkout flow","user":{"login":"vkaracic","id":2808092,"avatar_url":"https://avatars.githubusercontent.com/u/2808092?v=3","gravatar_id":"","url":"https://api.github.com/users/vkaracic","html_url":"https://github.com/vkaracic","followers_url":"https://api.github.com/users/vkaracic/followers","following_url":"https://api.github.com/users/vkaracic/following{/other_user}","gists_url":"https://api.github.com/users/vkaracic/gists{/gist_id}","starred_url":"https://api.github.com/users/vkaracic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkaracic/subscriptions","organizations_url":"https://api.github.com/users/vkaracic/orgs","repos_url":"https://api.github.com/users/vkaracic/repos","events_url":"https://api.github.com/users/vkaracic/events{/privacy}","received_events_url":"https://api.github.com/users/vkaracic/received_events","type":"User","site_admin":false},"body":"This PR contains all changes necessary to enable checkout of credit seats via our basket.\r\n\r\nGeneral workflow:\r\n\r\n1. Create coupon for credit seats\r\n2. User goes to the offer landing page\r\n3. Upon click on checkout on the offer landing page, user is redirected to the provider selection\r\n4. After selecting the provider, seat is added to the basket and voucher applied\r\n\r\nHow to create a credit course for testing purposes: https://openedx.atlassian.net/wiki/display/SOL/Test+credit+courses+for+ecommerce\r\n\r\nThe tickets for this work:\r\nhttps://openedx.atlassian.net/browse/SOL-2008\r\nhttps://openedx.atlassian.net/browse/SOL-2013\r\nhttps://openedx.atlassian.net/browse/SOL-2014\r\n\r\nSandbox info:\r\nTBA\r\n\r\n---\r\n\r\nAcceptance criteria checklist (grouped from AC's from the tickets) for testing on a sandbox:\r\n- [ ] Validate I'm forced to login before redirecting me to the landing page\r\n- [ ] Validate I'm only shown courses that I am eligible for credit and matches the code course criteria.\r\n- [ ] Validate one or more courses are listed on the landing page with \"get credit\" button\r\n- [ ] Validate the % or $ off discount is displayed clearly\r\n- [ ] Validate the amount of discount and the final amount is accurately listed\r\n- [ ] Validate \"get credit\" button is displayed for each course\r\n- [ ] Validate clicking on the \"get credit\" button takes learner to the Credit selection page with the discount code already applied and the correct amount displayed with discount, and provided with a single checkout button\r\n- [ ] Validate the following error messages are shown:\r\n* If code is valid but no intersection of credit eligible courses for the learner and the courses for which the code is valid, then display message \"Code \"xyz123\" is a valid code however you do not have any credit eligible courses available to you.\"\r\n* If the learner has already purchased credit for a course and she tries to purchase again, then display \"You have already purchased Credit for this course\"\r\n- [ ] Validate that I can select either one or multiple courses where the code will be valid\r\n- [ ] Validate that I can preview the courses/seats where the code will be valid\r\n- [ ] Validate that I can toggle between Credit and Verified/Prof-ed (they should be mutually exclusive)\r\n- [ ] Validate if a course is setup with multiple credit providers, then option is given to select one or more provider for which the code is valid (check boxes)\r\n- [ ] Validate that I can set it to single use / multi use code\r\n- [ ] Validate that I can limit it to email domain\r\n- [ ] Validate that I can set anywhere from 1% - 100% discount\r\n- [ ] Validate that I can set dollar amount as discount\r\n- [ ] Validate that I can select start and end dates\r\n- [ ] Validate that I can create 1 to 1000 codes\r\n- [ ] Validate that I can select all invoice criteria as before (prepaid or post redemption)\r\n- [ ] Validate that I can set maximum number of use\r\n- [ ] Validate that I can successfully save/create the codes\r\n\r\n(we'll need to go over this list and edit it accordingly)\r\n\r\n---\r\n\r\nCriteria for merging:\r\n- [ ] Implementation covers all the AC listed above\r\n- [ ] 100% test coverage\r\n- [ ] Make sure all acceptance tests work (create a new one?)\r\n- [ ] first review pass (reviewers @marjev @iivic )\r\n- [ ] second review pass (reviewer @mjfrey )\r\n- [ ] documentation added / adjusted\r\n","created_at":"2016-09-04T19:05:26Z","updated_at":"2016-09-08T13:21:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0eb40245b6d5276cf97922de6ee829d68e61c67","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/ecommerce/pulls/929/commits","review_comments_url":"https://api.github.com/repos/edx/ecommerce/pulls/929/comments","review_comment_url":"https://api.github.com/repos/edx/ecommerce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/ecommerce/issues/929/comments","statuses_url":"https://api.github.com/repos/edx/ecommerce/statuses/f6e962a9cfca78bbf9df8e0269ce3df4ee051efc","head":{"label":"edx:mjfrey/credit-checkout-flow","ref":"mjfrey/credit-checkout-flow","sha":"f6e962a9cfca78bbf9df8e0269ce3df4ee051efc","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":30175039,"name":"ecommerce","full_name":"edx/ecommerce","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/ecommerce","description":"Django application used to manage edX's product catalog and handle orders for those products.","fork":false,"url":"https://api.github.com/repos/edx/ecommerce","forks_url":"https://api.github.com/repos/edx/ecommerce/forks","keys_url":"https://api.github.com/repos/edx/ecommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/ecommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/ecommerce/teams","hooks_url":"https://api.github.com/repos/edx/ecommerce/hooks","issue_events_url":"https://api.github.com/repos/edx/ecommerce/issues/events{/number}","events_url":"https://api.github.com/repos/edx/ecommerce/events","assignees_url":"https://api.github.com/repos/edx/ecommerce/assignees{/user}","branches_url":"https://api.github.com/repos/edx/ecommerce/branches{/branch}","tags_url":"https://api.github.com/repos/edx/ecommerce/tags","blobs_url":"https://api.github.com/repos/edx/ecommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/ecommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/ecommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/ecommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/ecommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/ecommerce/languages","stargazers_url":"https://api.github.com/repos/edx/ecommerce/stargazers","contributors_url":"https://api.github.com/repos/edx/ecommerce/contributors","subscribers_url":"https://api.github.com/repos/edx/ecommerce/subscribers","subscription_url":"https://api.github.com/repos/edx/ecommerce/subscription","commits_url":"https://api.github.com/repos/edx/ecommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/ecommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/ecommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/ecommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/ecommerce/contents/{+path}","compare_url":"https://api.github.com/repos/edx/ecommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/ecommerce/merges","archive_url":"https://api.github.com/repos/edx/ecommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/ecommerce/downloads","issues_url":"https://api.github.com/repos/edx/ecommerce/issues{/number}","pulls_url":"https://api.github.com/repos/edx/ecommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/ecommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/ecommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/ecommerce/labels{/name}","releases_url":"https://api.github.com/repos/edx/ecommerce/releases{/id}","deployments_url":"https://api.github.com/repos/edx/ecommerce/deployments","created_at":"2015-02-02T06:55:15Z","updated_at":"2016-07-20T07:49:16Z","pushed_at":"2016-09-08T12:27:20Z","git_url":"git://github.com/edx/ecommerce.git","ssh_url":"git@github.com:edx/ecommerce.git","clone_url":"https://github.com/edx/ecommerce.git","svn_url":"https://github.com/edx/ecommerce","homepage":"","size":12110,"stargazers_count":38,"watchers_count":38,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":16,"forks":40,"open_issues":16,"watchers":38,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"c53b3fa594d83b7d35d9c0ebe16520b89bce97db","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":30175039,"name":"ecommerce","full_name":"edx/ecommerce","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/ecommerce","description":"Django application used to manage edX's product catalog and handle orders for those products.","fork":false,"url":"https://api.github.com/repos/edx/ecommerce","forks_url":"https://api.github.com/repos/edx/ecommerce/forks","keys_url":"https://api.github.com/repos/edx/ecommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/ecommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/ecommerce/teams","hooks_url":"https://api.github.com/repos/edx/ecommerce/hooks","issue_events_url":"https://api.github.com/repos/edx/ecommerce/issues/events{/number}","events_url":"https://api.github.com/repos/edx/ecommerce/events","assignees_url":"https://api.github.com/repos/edx/ecommerce/assignees{/user}","branches_url":"https://api.github.com/repos/edx/ecommerce/branches{/branch}","tags_url":"https://api.github.com/repos/edx/ecommerce/tags","blobs_url":"https://api.github.com/repos/edx/ecommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/ecommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/ecommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/ecommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/ecommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/ecommerce/languages","stargazers_url":"https://api.github.com/repos/edx/ecommerce/stargazers","contributors_url":"https://api.github.com/repos/edx/ecommerce/contributors","subscribers_url":"https://api.github.com/repos/edx/ecommerce/subscribers","subscription_url":"https://api.github.com/repos/edx/ecommerce/subscription","commits_url":"https://api.github.com/repos/edx/ecommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/ecommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/ecommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/ecommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/ecommerce/contents/{+path}","compare_url":"https://api.github.com/repos/edx/ecommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/ecommerce/merges","archive_url":"https://api.github.com/repos/edx/ecommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/ecommerce/downloads","issues_url":"https://api.github.com/repos/edx/ecommerce/issues{/number}","pulls_url":"https://api.github.com/repos/edx/ecommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/ecommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/ecommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/ecommerce/labels{/name}","releases_url":"https://api.github.com/repos/edx/ecommerce/releases{/id}","deployments_url":"https://api.github.com/repos/edx/ecommerce/deployments","created_at":"2015-02-02T06:55:15Z","updated_at":"2016-07-20T07:49:16Z","pushed_at":"2016-09-08T12:27:20Z","git_url":"git://github.com/edx/ecommerce.git","ssh_url":"git@github.com:edx/ecommerce.git","clone_url":"https://github.com/edx/ecommerce.git","svn_url":"https://github.com/edx/ecommerce","homepage":"","size":12110,"stargazers_count":38,"watchers_count":38,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":16,"forks":40,"open_issues":16,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/929"},"html":{"href":"https://github.com/edx/ecommerce/pull/929"},"issue":{"href":"https://api.github.com/repos/edx/ecommerce/issues/929"},"comments":{"href":"https://api.github.com/repos/edx/ecommerce/issues/929/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/929/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/ecommerce/pulls/929/commits"},"statuses":{"href":"https://api.github.com/repos/edx/ecommerce/statuses/f6e962a9cfca78bbf9df8e0269ce3df4ee051efc"}}}}
{"actor":{"display_login":"iivic"}}