mirror of
https://github.com/openai/codex.git
synced 2026-05-04 21:32:21 +03:00
chore(auto-review) feature => stable (#19063)
## Summary Turn on Auto Review ## Testing - [x] Update unit tests
This commit is contained in:
@@ -401,7 +401,7 @@ async fn permissions_selection_hides_auto_review_when_feature_disabled() {
|
||||
|
||||
assert!(
|
||||
!popup.contains("Auto-review"),
|
||||
"expected Auto-review to stay hidden until the experimental feature is enabled: {popup}"
|
||||
"expected Auto-review to stay hidden until the feature is enabled: {popup}"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ async fn permissions_selection_hides_auto_review_when_feature_disabled_even_if_a
|
||||
|
||||
assert!(
|
||||
!popup.contains("Auto-review"),
|
||||
"expected Auto-review to stay hidden when the experimental feature is disabled: {popup}"
|
||||
"expected Auto-review to stay hidden when the feature is disabled: {popup}"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use super::*;
|
||||
use codex_app_server_protocol::AppInfo;
|
||||
use codex_features::Stage;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[tokio::test]
|
||||
@@ -1747,31 +1748,22 @@ async fn experimental_popup_shows_js_repl_node_requirement() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn experimental_popup_includes_guardian_approval() {
|
||||
async fn experimental_popup_omits_stable_guardian_approval() {
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
let guardian_stage = FEATURES
|
||||
.iter()
|
||||
.find(|spec| spec.id == Feature::GuardianApproval)
|
||||
.map(|spec| spec.stage)
|
||||
.expect("expected guardian approval feature metadata");
|
||||
let guardian_name = guardian_stage
|
||||
.experimental_menu_name()
|
||||
.expect("expected guardian approval experimental menu name");
|
||||
let guardian_description = guardian_stage
|
||||
.experimental_menu_description()
|
||||
.expect("expected guardian approval experimental description");
|
||||
|
||||
assert_eq!(guardian_stage, Stage::Stable);
|
||||
|
||||
chat.open_experimental_popup();
|
||||
|
||||
let popup = render_bottom_popup(&chat, /*width*/ 120);
|
||||
let normalized_popup = popup.split_whitespace().collect::<Vec<_>>().join(" ");
|
||||
assert!(
|
||||
popup.contains(guardian_name),
|
||||
"expected auto-review entry in experimental popup, got:\n{popup}"
|
||||
);
|
||||
assert!(
|
||||
normalized_popup.contains(guardian_description),
|
||||
"expected auto-review description in experimental popup, got:\n{popup}"
|
||||
!popup.contains("Auto-review"),
|
||||
"expected stable auto-review feature to be omitted from experimental popup, got:\n{popup}"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user