test the payment and subscribe page

This commit is contained in:
Rimian Perkins 2020-01-10 14:41:32 +11:00
parent ba43e9d977
commit 7e2d4595ca
2 changed files with 14 additions and 8 deletions

View File

@ -4,11 +4,14 @@ import { stubStripe } from "discourse/plugins/discourse-subscriptions/helpers/st
acceptance("Discourse Subscriptions", {
beforeEach() {
stubStripe();
}
},
loggedIn: true
});
QUnit.test("viewing payment page", async assert => {
QUnit.test("viewing product page", async assert => {
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");
});

View File

@ -1,14 +1,17 @@
import { acceptance } from "helpers/qunit-helpers";
import { stubStripe } from "discourse/plugins/discourse-subscriptions/helpers/stripe";
acceptance("Discourse Subscriptions", {
settings: {
discourse_patrons_subscription_group: "plan-id"
beforeEach() {
stubStripe();
},
loggedIn: true
});
QUnit.skip("subscribing", async assert => {
await visit("/patrons/subscribe");
QUnit.test("subscribing", async assert => {
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");
});