Commit 2f77bdad authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[breadcrumb] Minor unittest fix: improve elider-limit test

In self-review of CL:2143024, I mentioned it was more accurate to test
the elider-limit (hidden vs not-hidden) using the <bread-crumb> custom
element's |parts| getter.

So do that: the elider button should only be shown (not-hidden) if the
breadcrumb path has more than 4 components (aka its .parts > 4) and it
matches the attached comment exactly.

Tbr: adanilo
Bug: 1061388
Change-Id: If03446e6e99944a22a50bd8096d4c4608a2d1f25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2158428
Commit-Queue: Alex Danilo <adanilo@chromium.org>
Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Auto-Submit: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761169}
parent 5bea3edd
......@@ -170,7 +170,7 @@ function getBreadCrumbButtonState() {
// Elider should only display for paths with more than 4 parts.
if (!getBreadCrumbEliderButton().hasAttribute('hidden')) {
assertTrue(buttons.length > 4);
assertTrue(getBreadCrumb().parts.length > 4);
}
// The 'last' main button displayed should always be [disabled].
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment