DEV: Fix imports (#113)

This commit is contained in:
Jarek Radosz
2022-03-07 00:30:01 +01:00
committed by GitHub
parent d6eaba632d
commit 98c843b8f2
16 changed files with 186 additions and 153 deletions
+6 -5
View File
@@ -1,16 +1,17 @@
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { acceptance, count } from "discourse/tests/helpers/qunit-helpers";
import { stubStripe } from "discourse/plugins/discourse-subscriptions/helpers/stripe";
import { visit } from "@ember/test-helpers";
acceptance("Discourse Subscriptions", function (needs) {
needs.user();
needs.hooks.beforeEach(() => {
needs.hooks.beforeEach(function () {
stubStripe();
});
test("viewing product page", async (assert) => {
test("viewing product page", async function (assert) {
await visit("/s");
assert.ok($(".product-list").length, "has product page");
assert.ok($(".product:first-child a").length, "has a link");
assert.ok(count(".product-list") > 0, "has product page");
assert.ok(count(".product:first-child a") > 0, "has a link");
});
});
@@ -1,24 +1,24 @@
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
import { acceptance, count } from "discourse/tests/helpers/qunit-helpers";
import { stubStripe } from "discourse/plugins/discourse-subscriptions/helpers/stripe";
import { click, visit } from "@ember/test-helpers";
acceptance("Discourse Subscriptions", function (needs) {
needs.user();
needs.hooks.beforeEach(() => {
needs.hooks.beforeEach(function () {
stubStripe();
});
test("subscribing", async (assert) => {
test("subscribing", async function (assert) {
await visit("/s");
await click(".product:first-child a");
assert.ok(
$(".discourse-subscriptions-section-columns").length,
count(".discourse-subscriptions-section-columns") > 0,
"has the sections for billing"
);
assert.ok(
$(".subscribe-buttons button").length,
count(".subscribe-buttons button") > 0,
"has buttons for subscribe"
);
});