2022-03-06 18:30:01 -05:00
|
|
|
import { acceptance, count } from "discourse/tests/helpers/qunit-helpers";
|
2019-12-02 19:00:03 -05:00
|
|
|
import { stubStripe } from "discourse/plugins/discourse-subscriptions/helpers/stripe";
|
2022-03-06 18:30:01 -05:00
|
|
|
import { visit } from "@ember/test-helpers";
|
2022-03-07 08:34:05 -05:00
|
|
|
import { test } from "qunit";
|
2019-10-08 20:53:58 -04:00
|
|
|
|
2021-01-04 14:32:33 -05:00
|
|
|
acceptance("Discourse Subscriptions", function (needs) {
|
|
|
|
needs.user();
|
2022-03-06 18:30:01 -05:00
|
|
|
needs.hooks.beforeEach(function () {
|
2019-10-08 20:53:58 -04:00
|
|
|
stubStripe();
|
2021-01-04 14:32:33 -05:00
|
|
|
});
|
2020-01-09 22:41:32 -05:00
|
|
|
|
2022-03-06 18:30:01 -05:00
|
|
|
test("viewing product page", async function (assert) {
|
2021-01-04 14:32:33 -05:00
|
|
|
await visit("/s");
|
2019-10-08 20:53:58 -04:00
|
|
|
|
2022-03-06 18:30:01 -05:00
|
|
|
assert.ok(count(".product-list") > 0, "has product page");
|
|
|
|
assert.ok(count(".product:first-child a") > 0, "has a link");
|
2021-01-04 14:32:33 -05:00
|
|
|
});
|
2019-10-08 20:53:58 -04:00
|
|
|
});
|