load in components

This commit is contained in:
Rimian Perkins 2019-09-11 20:37:23 +10:00
parent ee2be672f7
commit a9434f5723
4 changed files with 5 additions and 4 deletions

View File

@ -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);
}

View File

@ -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>

View File

@ -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"

View File

@ -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");