Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Check if plugin disabled globally prior to extending JS
- Loading branch information
1 parent
1f938c3
commit 16afd2c
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
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()); | ||
}); |