mirror of
https://github.com/discourse/discourse.git
synced 2025-03-03 14:16:41 +08:00
DEV: Add tests for sidebar accessibility changes (#19138)
Accessibility is a feature which we do not want to regress on. Follow-up to e30df227162e08e3ff33e1217ef36051e615d726
This commit is contained in:
parent
e30df22716
commit
e05cd5de8f
@ -195,5 +195,25 @@ acceptance(
|
||||
"the 3 topic tracking state change callbacks are removed"
|
||||
);
|
||||
});
|
||||
|
||||
test("accessibility of sidebar section header", async function (assert) {
|
||||
await visit("/");
|
||||
|
||||
assert.ok(
|
||||
exists(
|
||||
".sidebar-section-community .sidebar-section-header[aria-expanded='true'][aria-controls='sidebar-section-content-community']"
|
||||
),
|
||||
"accessibility attributes are set correctly on sidebar section header when section is expanded"
|
||||
);
|
||||
|
||||
await click(".sidebar-section-header");
|
||||
|
||||
assert.ok(
|
||||
exists(
|
||||
".sidebar-section-community .sidebar-section-header[aria-expanded='false'][aria-controls='sidebar-section-content-community']"
|
||||
),
|
||||
"accessibility attributes are set correctly on sidebar section header when section is collapsed"
|
||||
);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user