mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-07-06 22:42:11 +00:00
test the payment and subscribe page
This commit is contained in:
parent
ba43e9d977
commit
7e2d4595ca
@ -4,11 +4,14 @@ import { stubStripe } from "discourse/plugins/discourse-subscriptions/helpers/st
|
|||||||
acceptance("Discourse Subscriptions", {
|
acceptance("Discourse Subscriptions", {
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
stubStripe();
|
stubStripe();
|
||||||
}
|
},
|
||||||
|
|
||||||
|
loggedIn: true
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test("viewing payment page", async assert => {
|
QUnit.test("viewing product page", async assert => {
|
||||||
await visit("/s");
|
await visit("/s");
|
||||||
|
|
||||||
assert.ok($("#product-list").length, "has payment page");
|
assert.ok($("#product-list").length, "has product page");
|
||||||
|
assert.ok($(".product:first-child a").length, "has a link");
|
||||||
});
|
});
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
import { acceptance } from "helpers/qunit-helpers";
|
import { acceptance } from "helpers/qunit-helpers";
|
||||||
|
import { stubStripe } from "discourse/plugins/discourse-subscriptions/helpers/stripe";
|
||||||
|
|
||||||
acceptance("Discourse Subscriptions", {
|
acceptance("Discourse Subscriptions", {
|
||||||
settings: {
|
beforeEach() {
|
||||||
discourse_patrons_subscription_group: "plan-id"
|
stubStripe();
|
||||||
},
|
},
|
||||||
|
|
||||||
loggedIn: true
|
loggedIn: true
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.skip("subscribing", async assert => {
|
QUnit.test("subscribing", async assert => {
|
||||||
await visit("/patrons/subscribe");
|
await visit("/s");
|
||||||
|
|
||||||
assert.ok($("h3").length, "has a heading");
|
assert.ok($("#product-list").length, "has product page");
|
||||||
|
assert.ok($(".product:first-child a").length, "has a link");
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user