@bongos/core 1.19.440 → 1.19.441

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -600,20 +600,22 @@ test('the done panel’s progress region is stable, change-only, and says each s
600
600
  assert.match(fn('stripMarkup'), /role="status" aria-live="polite"/, 'the mine-card strip is left alone this pass');
601
601
  });
602
602
 
603
- test('the map table sorts from the keyboard and an owned row’s name is a real link', () => {
604
- assert.match(HUB, /<th class="colName" data-sort="name" aria-sort="ascending"><button type="button" class="thSort">Project<\/button><\/th>/);
605
- assert.match(HUB, /<th class="right colBuilders" data-sort="builders"><button type="button" class="thSort">Builders<\/button><\/th>/);
606
- assert.match(SCRIPT, /var btn = th\.querySelector\('button'\);\n\s*if \(!btn\) return;\n\s*btn\.addEventListener\('click'/, 'the listener sits on the button, not the th');
607
- assert.doesNotMatch(SCRIPT, /th\.style\.cursor/, 'no JS-set cursor on the th');
608
- assert.match(COSMOS, /\.tbl th button\{all:unset;cursor:pointer;\}/);
609
- assert.match(COSMOS, /\.tbl th button:focus-visible\{outline:2px solid var\(--accent\);outline-offset:2px;\}/, 'keyboard focus on the sort button is visible');
610
- const generated = (SCRIPT.match(/return '<tr data-generated([\s\S]*?)'<\/tr>';/) || [, ''])[1];
603
+ test('the map list sorts from the keyboard and an owned row’s name is a real link', () => {
604
+ // the sort was a button inside a <th> until task 1003356 took the header row
605
+ // away with the table; it is a pill in a group now, and still a real button
606
+ assert.match(HUB, /<button type="button" class="sortPill" data-sort="name" aria-pressed="true">name <span class="dir">a to z<\/span><\/button>/);
607
+ assert.match(HUB, /<button type="button" class="sortPill" data-sort="builders" aria-pressed="false">builders<\/button>/);
608
+ assert.match(SCRIPT, /document\.querySelectorAll\('\.tblSort button\[data-sort\]'\)\.forEach\(function \(btn\) \{\r?\n\s*btn\.addEventListener\('click'/, 'the listener sits on the button itself');
609
+ assert.doesNotMatch(SCRIPT, /th\.style\.cursor/, 'no JS-set cursor on a header that no longer exists');
610
+ assert.match(COSMOS, /\.tblSort button\{[^}]*min-height:36px;/, 'the sort pill clears the 24px floor on its own, with no all:unset to undo');
611
+ assert.match(COSMOS, /\.tblSort button:focus-visible\{outline:2px solid var\(--accent\);outline-offset:2px;\}/, 'keyboard focus on the sort button is visible');
612
+ const generated = (SCRIPT.match(/return '<li class="tblRow" data-generated([\s\S]*?)'<\/li>';/) || [, ''])[1];
611
613
  assert.match(generated, /<a class="ptitle" data-manage="' \+ esc\(String\(p\._inst\.id\)\) \+ '" href="\?view=manage&id=' \+ esc\(String\(p\._inst\.id\)\) \+ '">/, 'an owned row’s title is a manage anchor');
612
614
  const rows = SCRIPT.slice(SCRIPT.indexOf("$('mapRows').addEventListener('click'"));
613
615
  const branch = rows.indexOf("closest('a[data-manage]')");
614
616
  const bail = rows.indexOf("if (ev.target.closest && ev.target.closest('a')) return;");
615
617
  assert.ok(branch > 0 && bail > branch, 'the manage branch runs before the anchor bail-out');
616
- assert.match(HUB, /Sort by Project or Builders\./, 'the hint names the two sortable columns');
618
+ assert.match(HUB, /Sorted by name, A to Z\./, 'the live order is stated where the hint used to name the columns');
617
619
  assert.match(COSMOS, /\.tbl \.ptitle\{[^}]*text-decoration:none;\}/, 'the link wears the title’s ink, not the UA underline');
618
620
  });
619
621