load in components
This commit is contained in:
parent
ee2be672f7
commit
a9434f5723
|
@ -45,6 +45,7 @@ export default Ember.Component.extend({
|
|||
actions: {
|
||||
submitStripeCard() {
|
||||
this.stripe.createPaymentMethod('card', this.card).then((result) => {
|
||||
|
||||
if (result.error) {
|
||||
this.set('cardError', result.error.message);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
{{/if}}
|
||||
|
||||
{{else}}
|
||||
<div class="discourse-donations-section-columns">
|
||||
<div class="discourse-patrons-section-columns">
|
||||
<div class="section-column">
|
||||
<h3>Your information</h3>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ componentTest("Discourse Patrons donation form has content", {
|
|||
},
|
||||
|
||||
async test(assert) {
|
||||
assert.ok(find("#payment-form").length, "The form renders");
|
||||
assert.ok(find(".discourse-patrons-section-columns").length, "The card section renders");
|
||||
assert.ok(
|
||||
find("dummy-component-tag").length,
|
||||
"The stripe component renders"
|
||||
|
|
|
@ -10,7 +10,7 @@ componentTest("Discourse Patrons stripe card success", {
|
|||
return {
|
||||
createPaymentMethod() {
|
||||
return new Ember.RSVP.Promise((resolve) => {
|
||||
resolve('payment-method-response');
|
||||
resolve({});
|
||||
});
|
||||
},
|
||||
elements() {
|
||||
|
@ -32,7 +32,7 @@ componentTest("Discourse Patrons stripe card success", {
|
|||
assert.expect(1);
|
||||
|
||||
this.set("onSubmit", (arg) => {
|
||||
assert.equal(arg, "payment-method-response", "payment method created");
|
||||
assert.ok(true, "payment method created");
|
||||
});
|
||||
|
||||
await click(".btn-payment");
|
||||
|
|
Loading…
Reference in New Issue