Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
5f6474ac
Commit
5f6474ac
authored
8 years ago
by
Ahsan Ulhaq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add js test for analytics event on LMS receipt page"
This reverts commit
785b752d
.
parent
be6aea17
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
125 deletions
+2
-125
lms/static/js/fixtures/commerce/checkout_receipt.html
+0
-26
lms/static/js/spec/commerce/receipt_spec.js
+0
-90
lms/static/js/spec/main.js
+1
-7
lms/static/karma_lms.conf.js
+1
-2
No files found.
lms/static/js/fixtures/commerce/checkout_receipt.html
deleted
100644 → 0
View file @
be6aea17
<div
id=
"error-container"
class=
"hidden"
>
<div
id=
"error"
class=
"wrapper-msg wrapper-msg-activate"
>
<div
class=
" msg msg-activate"
>
<span
class=
"msg-icon icon fa fa-exclamation-triangle"
aria-hidden=
"true"
></span>
<div
class=
"msg-content"
>
<h3
class=
"title"
>
Error
</h3>
<div
class=
"copy"
>
<p>
dummy error text
</p>
</div>
</div>
</div>
</div>
</div>
<div
class=
"container"
>
<section
class=
"wrapper carousel"
>
<div
id=
"receipt-container"
class=
"pay-and-verify hidden"
data-is-payment-complete=
'True'
data-platform-name=
'edx-platform'
data-verified=
'True'
data-username=
'user-1'
>
<h2>
${_("Loading Order Data...")}
</h2>
<span>
${ _("Please wait while we retrieve your order details.") }
</span>
</div>
</section>
</div>
This diff is collapsed.
Click to expand it.
lms/static/js/spec/commerce/receipt_spec.js
deleted
100644 → 0
View file @
be6aea17
define
([
'js/commerce/views/receipt_view'
],
function
(){
'use strict'
;
describe
(
"edx.commerce.ReceiptView"
,
function
(
ReceiptView
)
{
var
view
,
data
=
null
;
beforeEach
(
function
(){
loadFixtures
(
"js/fixtures/commerce/checkout_receipt.html"
);
var
receiptFixture
=
readFixtures
(
"templates/commerce/receipt.underscore"
);
appendSetFixtures
(
"<script id=
\"
receipt-tpl
\"
type=
\"
text/template
\"
>"
+
receiptFixture
+
"</script>"
);
data
=
{
"status"
:
"Open"
,
"billed_to"
:
{
"city"
:
"dummy city"
,
"first_name"
:
"john"
,
"last_name"
:
"doe"
,
"country"
:
"AL"
,
"line2"
:
"line2"
,
"line1"
:
"line1"
,
"state"
:
""
,
"postcode"
:
"12345"
},
"lines"
:
[
{
"status"
:
"Open"
,
"unit_price_excl_tax"
:
"10.00"
,
"product"
:
{
"attribute_values"
:
[
{
"name"
:
"certificate_type"
,
"value"
:
"verified"
},
{
"name"
:
"course_key"
,
"value"
:
"course-v1:edx+dummy+2015_T3"
}
],
"stockrecords"
:
[
{
"price_currency"
:
"USD"
,
"product"
:
123
,
"partner_sku"
:
"1234ABC"
,
"partner"
:
1
,
"price_excl_tax"
:
"10.00"
,
"id"
:
123
}
],
"product_class"
:
"Seat"
,
"title"
:
"Dummy title"
,
"url"
:
"https://ecom.edx.org/api/v2/products/123/"
,
"price"
:
"10.00"
,
"expires"
:
null
,
"is_available_to_buy"
:
true
,
"id"
:
123
,
"structure"
:
"child"
},
"line_price_excl_tax"
:
"10.00"
,
"description"
:
"dummy description"
,
"title"
:
"dummy title"
,
"quantity"
:
1
}
],
"number"
:
"EDX-123456"
,
"date_placed"
:
"2016-01-01T01:01:01Z"
,
"currency"
:
"USD"
,
"total_excl_tax"
:
"10.00"
};
view
=
new
ReceiptView
({
el
:
$
(
'#receipt-container'
)});
view
.
renderReceipt
(
data
);
});
it
(
"sends analytic event when receipt is rendered"
,
function
()
{
expect
(
window
.
analytics
.
track
).
toHaveBeenCalledWith
(
"Completed Order"
,
{
orderId
:
"EDX-123456"
,
total
:
"10.00"
,
currency
:
"USD"
}
);
});
});
}
);
This diff is collapsed.
Click to expand it.
lms/static/js/spec/main.js
View file @
5f6474ac
...
...
@@ -98,7 +98,6 @@
'js/bookmarks/views/bookmarks_list'
:
'js/bookmarks/views/bookmarks_list'
,
'js/bookmarks/views/bookmark_button'
:
'js/bookmarks/views/bookmark_button'
,
'js/views/message_banner'
:
'js/views/message_banner'
,
'js/commerce/views/receipt_view'
:
'js/commerce/views/receipt_view'
,
// edxnotes
'annotator_1.2.9'
:
'xmodule_js/common_static/js/vendor/edxnotes/annotator-full.min'
,
...
...
@@ -318,10 +317,6 @@
exports
:
'js/ccx/schedule'
,
deps
:
[
'jquery'
,
'underscore'
,
'backbone'
,
'gettext'
,
'moment'
]
},
'js/commerce/views/receipt_view'
:
{
exports
:
'edx.commerce.ReceiptView'
,
deps
:
[
'jquery'
,
'backbone'
,
'underscore'
,
'underscore.string'
]
},
// Backbone classes loaded explicitly until they are converted to use RequireJS
'js/instructor_dashboard/ecommerce'
:
{
...
...
@@ -768,8 +763,7 @@
'js/spec/learner_dashboard/collection_list_view_spec.js'
,
'js/spec/learner_dashboard/sidebar_view_spec.js'
,
'js/spec/learner_dashboard/program_card_view_spec.js'
,
'js/spec/learner_dashboard/certificate_view_spec.js'
,
'js/spec/commerce/receipt_spec.js'
'js/spec/learner_dashboard/certificate_view_spec.js'
];
for
(
var
i
=
0
;
i
<
testFiles
.
length
;
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
lms/static/karma_lms.conf.js
View file @
5f6474ac
...
...
@@ -117,8 +117,7 @@ var fixtureFiles = [
{
pattern
:
'support/templates/**/*.*'
,
included
:
false
},
{
pattern
:
'templates/bookmarks/**/*.*'
,
included
:
false
},
{
pattern
:
'templates/learner_dashboard/**/*.*'
,
included
:
false
},
{
pattern
:
'templates/ccx/**/*.*'
,
included
:
false
},
{
pattern
:
'templates/commerce/receipt.underscore'
,
included
:
false
}
{
pattern
:
'templates/ccx/**/*.*'
,
included
:
false
}
];
// override fixture path and other config.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment