diff --git a/test/javascripts/acceptance/subscribe-test.js.es6 b/test/javascripts/acceptance/subscribe-test.js.es6 index af50606..7b9d8bf 100644 --- a/test/javascripts/acceptance/subscribe-test.js.es6 +++ b/test/javascripts/acceptance/subscribe-test.js.es6 @@ -12,6 +12,10 @@ acceptance("Discourse Subscriptions", { QUnit.test("subscribing", async assert => { await visit("/s"); - assert.ok($("#product-list").length, "has product page"); - assert.ok($(".product:first-child a").length, "has a link"); + await click(".product:first-child a"); + + assert.ok( + $(".discourse-subscriptions-section-columns").length, + "has a the sections for billing" + ); }); diff --git a/test/javascripts/helpers/product-pretender.js.es6 b/test/javascripts/helpers/product-pretender.js.es6 index 3e53515..14ccb40 100644 --- a/test/javascripts/helpers/product-pretender.js.es6 +++ b/test/javascripts/helpers/product-pretender.js.es6 @@ -19,4 +19,23 @@ export default function(helpers) { return response(products); }); + + this.get("/s/products/:id", () => { + const product = {}; + + return response(product); + }); + + this.get("/s/plans", () => { + const plans = [ + { + id: "plan_GHGHSHS8654G", + amount: 200, + currency: "usd", + interval: "month" + } + ]; + + return response(plans); + }); }