basic subscribe page
This commit is contained in:
@@ -11,7 +11,7 @@ acceptance("Discourse Patrons", {
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test("viewing", async assert => {
|
||||
QUnit.test("viewing the one-off payment page", async assert => {
|
||||
await visit("/patrons");
|
||||
|
||||
assert.ok($(".donations-page-payment").length, "has payment form class");
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Discourse Patrons");
|
||||
|
||||
QUnit.test("plugin outlets", async assert => {
|
||||
await visit("/");
|
||||
|
||||
assert.ok(
|
||||
$("#navigation-bar .discourse-patrons-subscribe").length,
|
||||
"has a subscribe button"
|
||||
);
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Discourse Patrons", {
|
||||
settings: {
|
||||
discourse_patrons_subscription_group: "plan-id"
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test("subscribing", async assert => {
|
||||
await visit("/patrons/subscribe");
|
||||
|
||||
assert.ok($("h3").length, "has a heading");
|
||||
});
|
||||
@@ -2,4 +2,8 @@ export default function(helpers) {
|
||||
const { response } = helpers;
|
||||
|
||||
this.get("/patrons", () => response({ email: "hello@example.com" }));
|
||||
|
||||
this.get("/groups/:plan", id => {
|
||||
return response({ full_name: "Saboo", bio_cooked: "This is the plan" });
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user