Skip to content

Commit 0ec32aa

Browse files
ndemiancCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 59777da commit 0ec32aa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

extensions/levelcode-ai/test/webviewCss.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ test('TRANSCRIPT: the speaker label leaves the screen but NOT the accessibility
410410

411411
// And it must still BE there to hide: both speakers labelled on a turn start, neither on a
412412
// continuation (which is the same voice carrying on, and was never labelled).
413-
const add = html.slice(html.indexOf('function add(role, html)'), html.indexOf('function add(role, html)') + 700);
413+
const at = html.indexOf('function add(role, html)');
414+
assert.ok(at !== -1, 'function add(role, html) is gone — cannot verify label emission');
415+
const add = html.slice(at, at + 700);
414416
assert.match(add, /role === 'user' \? 'You' : 'LevelCode AI'/, 'the label text is no longer emitted at all');
415417
assert.match(add, /cont \? '' : '<div class="role">/, 'a continuation must still omit the label element entirely');
416418
});

0 commit comments

Comments
 (0)