yarn prettier
This commit is contained in:
@@ -13,7 +13,10 @@ componentTest("Discourse Patrons donation form has content", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
assert.ok(find(".discourse-patrons-section-columns").length, "The card section renders");
|
||||
assert.ok(
|
||||
find(".discourse-patrons-section-columns").length,
|
||||
"The card section renders"
|
||||
);
|
||||
assert.ok(
|
||||
find("dummy-component-tag").length,
|
||||
"The stripe component renders"
|
||||
@@ -25,20 +28,19 @@ componentTest("donation form has a confirmation", {
|
||||
template: `{{donation-form confirmation=confirmation}}`,
|
||||
|
||||
beforeEach() {
|
||||
this.registry.register(
|
||||
"component:stripe-card",
|
||||
Ember.Component.extend()
|
||||
);
|
||||
this.registry.register("component:stripe-card", Ember.Component.extend());
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
this.set("confirmation", { "card": { "last4": "4242" }});
|
||||
this.set("confirmation", { card: { last4: "4242" } });
|
||||
|
||||
const confirmExists = find(".discourse-donations-confirmation").length;
|
||||
|
||||
assert.ok(confirmExists, "The confirmation form renders");
|
||||
|
||||
const last4 = find(".discourse-donations-last4").text().trim();
|
||||
const last4 = find(".discourse-donations-last4")
|
||||
.text()
|
||||
.trim();
|
||||
|
||||
assert.equal(last4, ".... .... .... 4242", "The last 4 digits are correct");
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ componentTest("Discourse Patrons stripe card success", {
|
||||
window.Stripe = () => {
|
||||
return {
|
||||
createPaymentMethod() {
|
||||
return new Ember.RSVP.Promise((resolve) => {
|
||||
return new Ember.RSVP.Promise(resolve => {
|
||||
resolve({});
|
||||
});
|
||||
},
|
||||
@@ -19,11 +19,11 @@ componentTest("Discourse Patrons stripe card success", {
|
||||
return {
|
||||
on() {},
|
||||
card() {},
|
||||
mount() {},
|
||||
mount() {}
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
},
|
||||
@@ -36,5 +36,5 @@ componentTest("Discourse Patrons stripe card success", {
|
||||
});
|
||||
|
||||
await click(".btn-payment");
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user