split into 2 files so its easier to use rake autospec

This commit is contained in:
Sam 2018-11-23 11:27:56 +11:00
parent 16afd2c612
commit 646b310064
3 changed files with 32 additions and 31 deletions

View File

@ -0,0 +1,16 @@
import { acceptance } from "helpers/qunit-helpers";
acceptance("Assign disabled mobile", {
loggedIn: true,
mobileView: true,
settings: { assign_enabled: false }
});
QUnit.test("Footer dropdown does not contain button", async assert => {
const menu = selectKit(".topic-footer-mobile-dropdown");
await visit("/t/internationalization-localization/280");
await menu.expand();
assert.notOk(menu.rowByValue("assign").exists());
});

View File

@ -0,0 +1,16 @@
import { acceptance } from "helpers/qunit-helpers";
acceptance("Assign mobile", {
loggedIn: true,
mobileView: true,
settings: { assign_enabled: true }
});
QUnit.test("Footer dropdown contains button", async assert => {
const menu = selectKit(".topic-footer-mobile-dropdown");
await visit("/t/internationalization-localization/280");
await menu.expand();
assert.ok(menu.rowByValue("assign").exists());
});

View File

@ -1,31 +0,0 @@
import { acceptance } from "helpers/qunit-helpers";
acceptance("Assign (mobile)", {
loggedIn: true,
mobileView: true,
settings: { assign_enabled: true },
});
QUnit.test("Footer dropdown contains button", async assert => {
const menu = selectKit(".topic-footer-mobile-dropdown");
await visit("/t/internationalization-localization/280");
await menu.expand();
assert.ok(menu.rowByValue("assign").exists());
});
acceptance("Assign (mobile & disabled)", {
loggedIn: true,
mobileView: true,
settings: { assign_enabled: false },
});
QUnit.test("Footer dropdown does not contain button", async assert => {
const menu = selectKit(".topic-footer-mobile-dropdown");
await visit("/t/internationalization-localization/280");
await menu.expand();
assert.notOk(menu.rowByValue("assign").exists());
});