Mark the active Text or Image tab.
The active tab stays solid green, and the other tab is pale with green text. A tab whose field failed validation now shows red text.
This commit is contained in:
@@ -91,6 +91,16 @@ test("showHide switches between the text and the image tabs", () => {
|
||||
assert.equal(w.showHide("other"), false);
|
||||
});
|
||||
|
||||
test("showHide marks the tab that is showing", () => {
|
||||
const w = publishWindow();
|
||||
const text = w.document.getElementById("texttab");
|
||||
const upload = w.document.getElementById("uploadtab");
|
||||
w.showHide("upload");
|
||||
assert.deepEqual([text.classList.contains("active"), upload.classList.contains("active")], [false, true]);
|
||||
w.showHide("text");
|
||||
assert.deepEqual([text.classList.contains("active"), upload.classList.contains("active")], [true, false]);
|
||||
});
|
||||
|
||||
test("review asks for a title, then an author", () => {
|
||||
const w = publishWindow("<p>words</p>");
|
||||
assert.equal(w.review(), false);
|
||||
|
||||
Reference in New Issue
Block a user