Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime): Make native modal keyboard interaction consistent with browsers #18453

Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d279a07
Rebase and fix tests
lionel-rowe Apr 3, 2023
8b237e9
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
bartlomieju Apr 6, 2023
d31fe0e
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
lionel-rowe Apr 11, 2023
780797d
breaking - throw instead of returning early if !isatty
lionel-rowe Apr 11, 2023
8861563
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
lionel-rowe Sep 2, 2023
d679281
Implement changes from code review
lionel-rowe Sep 2, 2023
dc369c5
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
lionel-rowe Sep 4, 2023
06ebf48
Implement changes from code review
lionel-rowe Sep 3, 2023
88317d4
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
bartlomieju Sep 4, 2023
b79f443
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
bartlomieju Sep 5, 2023
67a5e25
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
bartlomieju Sep 6, 2023
d3b7253
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
lionel-rowe Sep 12, 2023
94e192f
Exclude ctrl+c/ctrl+d tests from macos
lionel-rowe Sep 12, 2023
27d449a
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
lionel-rowe Sep 12, 2023
9c2c740
Fix test on Windows
dsherret Sep 18, 2023
f8f13de
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
dsherret Sep 18, 2023
1332048
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
bartlomieju Dec 6, 2023
6778a12
update rustyline
bartlomieju Dec 6, 2023
ebb3f63
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
bartlomieju Dec 6, 2023
2634dc6
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
bartlomieju Dec 8, 2023
445c895
Merge branch 'main' into alert-prompt-confirm-keyboard-interaction
bartlomieju Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Exclude ctrl+c/ctrl+d tests from macos
  • Loading branch information
lionel-rowe committed Sep 12, 2023
commit 94e192fc95a7b1eec36f256ee68546ddccac029d
49 changes: 26 additions & 23 deletions cli/tests/integration/run_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2816,18 +2816,6 @@ mod permissions {
console.write_raw("\x1b"); // Escape
console.expect("false");

// confirm returns false by pressing Ctrl+C
console.write_line_raw("confirm()");
console.expect("Confirm [Y/n] ");
console.write_raw("\x03"); // Ctrl+C
console.expect("false");

// confirm returns false by pressing Ctrl+D
console.write_line_raw("confirm()");
console.expect("Confirm [Y/n] ");
console.write_raw("\x04"); // Ctrl+D
console.expect("false");

// confirm can display custom text
// confirm returns true by pressing y
console.write_line_raw("confirm('continue?')");
Expand Down Expand Up @@ -2909,17 +2897,32 @@ mod permissions {
console.write_raw("\x1b"); // Escape
console.expect("null");

// prompt returns null by pressing Ctrl+C
console.write_line_raw("prompt()");
console.expect("Prompt ");
console.write_raw("\x03"); // Ctrl+C
console.expect("null");

// prompt returns null by pressing Ctrl+D
console.write_line_raw("prompt()");
console.expect("Prompt ");
console.write_raw("\x04"); // Ctrl+D
console.expect("null");
#[cfg(not(target_os = "macos"))]
{
// confirm returns false by pressing Ctrl+C
console.write_line_raw("confirm()");
console.expect("Confirm [Y/n] ");
console.write_raw("\x03"); // Ctrl+C
console.expect("false");

// confirm returns false by pressing Ctrl+D
console.write_line_raw("confirm()");
console.expect("Confirm [Y/n] ");
console.write_raw("\x04"); // Ctrl+D
console.expect("false");

// prompt returns null by pressing Ctrl+C
console.write_line_raw("prompt()");
console.expect("Prompt ");
console.write_raw("\x03"); // Ctrl+C
console.expect("null");

// prompt returns null by pressing Ctrl+D
console.write_line_raw("prompt()");
console.expect("Prompt ");
console.write_raw("\x04"); // Ctrl+D
console.expect("null");
}
});
}

Expand Down