apple submit --build <n> (first submission, the resubmit steps; plan table with --json under serve); desktop owner actions to send for review: owner.apple_submit, owner.apple_resubmit, owner.apple_iap_submit, owner.play_production, and the price gate owner actions (owner.prices_play_products / _play_subscriptions / _apple_subscriptions; owner.prices_import passes --allow-price-changes after the dialog); OWNER_ALLOWED_ARGS ties each forbidden flag to its one action, dry runs never carry owner flags, MCP still has no submit or production release; submit dialog text in the host; system.tools androidSdk, project.inspect playRelease, declarations dataDeletion
This commit is contained in:
parent
2e7dd44ae6
commit
33eb24a3dc
17 changed files with 335 additions and 49 deletions
|
|
@ -2,9 +2,9 @@
|
|||
//! after a dialog that names the action on its button and says users see it at once. Tokens are bound to exactly the
|
||||
//! method and the { project, args } sent (the same vector as the TypeScript side checks).
|
||||
use serde_json::json;
|
||||
use storebound_desktop::commands::{console_fill_dialog, dialog_labels, dialog_summary, owner_summary};
|
||||
use storebound_desktop::commands::{console_fill_dialog, dialog_labels, dialog_summary, owner_summary, summary_for};
|
||||
use storebound_desktop::confirm::{canonical, mac, mint};
|
||||
use storebound_desktop::policy::{sanitize_js_call, Kind, CONSOLE_FILL, CONSOLE_FILL_NOTE};
|
||||
use storebound_desktop::policy::{sanitize_js_call, Kind, CONSOLE_FILL, CONSOLE_FILL_NOTE, SUBMIT_METHODS};
|
||||
|
||||
#[test]
|
||||
fn owner_actions_are_dry_runs_from_the_window() {
|
||||
|
|
@ -29,6 +29,25 @@ fn owner_dialogs_name_the_action() {
|
|||
assert!(dialog_summary("Push", "d", "A", true, false).contains("not public until you submit"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn submit_for_review_is_an_owner_action_with_its_own_dialog() {
|
||||
assert_eq!(SUBMIT_METHODS, &["owner.apple_submit", "owner.apple_resubmit", "owner.apple_iap_submit", "owner.play_production"]);
|
||||
for m in SUBMIT_METHODS {
|
||||
// a dry run from the window, whatever it sends; the real run only through write_with_confirm
|
||||
let p = sanitize_js_call(m, Some(Kind::Owner), &json!({ "args": { "build": "52" } })).unwrap();
|
||||
assert_eq!(p["dryRun"], json!(true));
|
||||
for bad in [json!({ "dryRun": false }), json!({ "confirmToken": "sbt1.x" }), json!({ "args": {}, "project": "/x" })] {
|
||||
assert!(sanitize_js_call(m, Some(Kind::Owner), &bad).is_err(), "{m} {bad}");
|
||||
}
|
||||
let s = summary_for(m, Kind::Owner, "Submit for App Review", "Sends the version.", "Prism Puddle", true, false);
|
||||
assert!(s.contains("Prism Puddle") && s.contains("store's review") && s.contains("go live without another click") && s.contains("press the button"), "{s}");
|
||||
}
|
||||
// other owner actions keep their summary, writes theirs
|
||||
assert!(summary_for("owner.play_rollout", Kind::Owner, "T", "d", "A", true, false).contains("right away"));
|
||||
assert!(summary_for("play.listing", Kind::Write, "T", "d", "A", true, false).contains("not public until you submit"));
|
||||
assert_eq!(dialog_labels(Kind::Owner, "Submit for App Review").1, "Yes: Submit for App Review");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tokens_bind_method_project_and_args_of_each_write() {
|
||||
let secret = [9u8; 32];
|
||||
|
|
@ -41,6 +60,9 @@ fn tokens_bind_method_project_and_args_of_each_write() {
|
|||
("owner.play_rollout", json!({ "action": "percent", "percent": 50 })),
|
||||
("owner.ios_phased", json!({ "action": "resume", "version": "2.3.0" })),
|
||||
("owner.reply_send", json!({ "file": "play-r-p1.md" })),
|
||||
("owner.apple_submit", json!({ "build": "52", "version": "2.4.0" })),
|
||||
("owner.apple_resubmit", json!({ "build": "53", "resolve_iaps": true })),
|
||||
("owner.play_production", json!({ "version_code": "24", "status": "inProgress", "percent": 10 })),
|
||||
];
|
||||
for (method, args) in writes {
|
||||
let bound = json!({ "project": "/apps/prism", "args": args });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue