Skip to content

Commit

Permalink
refactor: improve bell assertion handling in multiple completions tes…
Browse files Browse the repository at this point in the history
…t case
  • Loading branch information
ryan-gang committed Jan 31, 2025
1 parent cbf3013 commit ff7b5b9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion internal/test_cases/command_multiple_completions_test_case.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,18 @@ func (t CommandMultipleCompletionsTestCase) Run(asserter *logged_shell_asserter.
}

if t.CheckForBell {
if err := RunBellAssertion(shell, logger); err != nil {
bellChannel := shell.VTBellChannel()
asserter.AddAssertion(assertions.BellAssertion{
BellChannel: bellChannel,
})
// Run the assertion, before sending the enter key
if err := asserter.AssertWithoutPrompt(); err != nil {
return err
}

logger.Successf("✓ Received bell")
// Pop the bell assertion after running
asserter.PopAssertion()
}

commandReflection := t.ExpectedReflection
Expand Down

0 comments on commit ff7b5b9

Please sign in to comment.