team-ljyzipelo

공개

Linux 파일 창 실패와 취소를 구분하고 안내를 표시함

작성자
호시노 히나타
작성 시각
커밋
8e66fe78e4f9132e38f994a67b3176ccbcdd534b
부모
fa871ad
이 시점의 파일 보기

변경된 파일 12개

+374-42
수정experiments/rust-ui-memory-app/Cargo.lock+2-0
@@ -4599,7 +4599,9 @@ dependencies = [
45994599name = "zipelo-ui-memory-app"
46004600version = "0.1.0"
46014601dependencies = [
4602추가: "ashpd",
46024603 "eframe",
4604추가: "pollster 0.4.0",
46034605 "rfd",
46044606 "wgpu",
46054607 "zipelo-app-core-memory",
수정experiments/rust-ui-memory-app/Cargo.toml+3-1
@@ -14,7 +14,7 @@ doctest = false
1414
1515[features]
1616default = []
17삭제: ui = ["dep:eframe", "dep:wgpu", "dep:rfd"]
17추가: ui = ["dep:eframe", "dep:wgpu", "dep:rfd", "dep:ashpd", "dep:pollster"]
1818ui-fixture = ["ui"]
1919
2020[dependencies]
@@ -44,6 +44,8 @@ name = "format_contract"
4444path = "../../tests/rust-app-real-worker/formats.rs"
4545
4646[target.'cfg(target_os = "linux")'.dependencies]
47추가: ashpd = { version = "=0.11.1", optional = true, default-features = false, features = ["async-std"] }
48추가: pollster = { version = "=0.4.0", optional = true }
4749rfd = { version = "=0.16.0", optional = true, default-features = false, features = ["xdg-portal", "async-std"] }
4850
4951[target.'cfg(not(target_os = "linux"))'.dependencies]
수정experiments/rust-ui-memory-app/src/archive_dialog.rs+126-32
@@ -45,39 +45,133 @@ pub fn archive_filters() -> Vec<(&'static str, Vec<String>)> {
4545#[derive(Default)]
4646pub struct NativeDialogs;
4747
48추가: pub const DIALOG_UNAVAILABLE: &str =
49추가: "파일 선택 창을 열 수 없습니다. 파일을 창으로 끌어 놓아 주세요.";
50추가:
4851impl Dialogs for NativeDialogs {
4952 fn choose(&mut self, request: DialogRequest) -> Result<Option<Vec<PathBuf>>, String> {
50삭제: let dialog = rfd::FileDialog::new().set_directory(request.directory);
51삭제: let answer =
52삭제: std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| match request.purpose {
53삭제: Purpose::Open => {
54삭제: let mut dialog = dialog.set_title("압축파일 열기");
55삭제: for (name, extensions) in archive_filters() {
56삭제: dialog = dialog.add_filter(name, &extensions);
57삭제: }
58삭제: dialog.pick_file().map(|path| vec![path])
59삭제: }
60삭제: Purpose::Files => dialog.set_title("파일 추가").pick_files(),
61삭제: Purpose::Folder => dialog
62삭제: .set_title("폴더 추가")
63삭제: .pick_folder()
64삭제: .map(|path| vec![path]),
65삭제: Purpose::Destination | Purpose::Retry => dialog
66삭제: .set_title("압축을 풀 폴더 선택")
67삭제: .pick_folder()
68삭제: .map(|path| vec![path]),
69삭제: Purpose::SaveGzip | Purpose::RetryGzip => dialog
70삭제: .set_title("압축 해제 파일 저장")
71삭제: .set_file_name(request.file_name)
72삭제: .save_file()
73삭제: .map(|path| vec![path]),
74삭제: Purpose::SaveZip => dialog
75삭제: .set_title("ZIP 파일 저장")
76삭제: .set_file_name(request.file_name)
77삭제: .add_filter("ZIP 압축파일", &["zip"])
78삭제: .save_file()
79삭제: .map(|path| vec![path]),
80삭제: }));
81삭제: answer.map_err(|_| "파일 선택 창을 열지 못했습니다. 다시 시도하세요".to_owned())
53추가: std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
54추가: #[cfg(target_os = "linux")]
55추가: {
56추가: choose_portal(request)
57추가: }
58추가: #[cfg(not(target_os = "linux"))]
59추가: {
60추가: choose_native(request)
61추가: }
62추가: }))
63추가: .unwrap_or_else(|_| Err(DIALOG_UNAVAILABLE.into()))
64추가: }
65추가: }
66추가:
67추가: #[cfg(target_os = "linux")]
68추가: pub fn portal_response(
69추가: response: Result<Vec<PathBuf>, ashpd::Error>,
70추가: ) -> Result<Option<Vec<PathBuf>>, String> {
71추가: match response {
72추가: Ok(paths) if !paths.is_empty() => Ok(Some(paths)),
73추가: Err(ashpd::Error::Response(ashpd::desktop::ResponseError::Cancelled))
74추가: | Err(ashpd::Error::Portal(ashpd::PortalError::Cancelled(_))) => Ok(None),
75추가: _ => Err(DIALOG_UNAVAILABLE.into()),
8276 }
8377}
78추가:
79추가: #[cfg(target_os = "linux")]
80추가: fn choose_portal(request: DialogRequest) -> Result<Option<Vec<PathBuf>>, String> {
81추가: use ashpd::desktop::file_chooser::{FileFilter, OpenFileRequest, SaveFileRequest};
82추가: let filters = match request.purpose {
83추가: Purpose::Open => archive_filters(),
84추가: Purpose::SaveZip => vec![("ZIP 압축파일", vec!["zip".into()])],
85추가: _ => Vec::new(),
86추가: }
87추가: .into_iter()
88추가: .map(|(name, extensions)| {
89추가: extensions
90추가: .into_iter()
91추가: .fold(FileFilter::new(name), |filter, extension| {
92추가: let glob = if extension == "*" {
93추가: "*".to_owned()
94추가: } else {
95추가: format!("*.{extension}")
96추가: };
97추가: filter.glob(&glob)
98추가: })
99추가: })
100추가: .collect::<Vec<_>>();
101추가: portal_response(pollster::block_on(async move {
102추가: let selected = match request.purpose {
103추가: Purpose::SaveZip | Purpose::SaveGzip | Purpose::RetryGzip => SaveFileRequest::default()
104추가: .title(if request.purpose == Purpose::SaveZip {
105추가: "ZIP 파일 저장"
106추가: } else {
107추가: "압축 해제 파일 저장"
108추가: })
109추가: .current_name(Some(request.file_name.as_str()))
110추가: .filters(filters)
111추가: .current_folder::<&PathBuf>(Some(&request.directory))?
112추가: .send()
113추가: .await?
114추가: .response()?,
115추가: purpose => OpenFileRequest::default()
116추가: .title(match purpose {
117추가: Purpose::Open => "압축파일 열기",
118추가: Purpose::Files => "파일 추가",
119추가: Purpose::Folder => "폴더 추가",
120추가: _ => "압축을 풀 폴더 선택",
121추가: })
122추가: .multiple(purpose == Purpose::Files)
123추가: .directory(matches!(
124추가: purpose,
125추가: Purpose::Folder | Purpose::Destination | Purpose::Retry
126추가: ))
127추가: .filters(filters)
128추가: .current_folder::<&PathBuf>(Some(&request.directory))?
129추가: .send()
130추가: .await?
131추가: .response()?,
132추가: };
133추가: selected
134추가: .uris()
135추가: .iter()
136추가: .map(|uri| {
137추가: uri.to_file_path()
138추가: .map_err(|_| ashpd::Error::ParseError("파일 경로 응답 오류"))
139추가: })
140추가: .collect::<Result<Vec<_>, _>>()
141추가: }))
142추가: }
143추가:
144추가: #[cfg(not(target_os = "linux"))]
145추가: fn choose_native(request: DialogRequest) -> Result<Option<Vec<PathBuf>>, String> {
146추가: let dialog = rfd::FileDialog::new().set_directory(request.directory);
147추가: let answer = match request.purpose {
148추가: Purpose::Open => {
149추가: let mut dialog = dialog.set_title("압축파일 열기");
150추가: for (name, extensions) in archive_filters() {
151추가: dialog = dialog.add_filter(name, &extensions);
152추가: }
153추가: dialog.pick_file().map(|path| vec![path])
154추가: }
155추가: Purpose::Files => dialog.set_title("파일 추가").pick_files(),
156추가: Purpose::Folder => dialog
157추가: .set_title("폴더 추가")
158추가: .pick_folder()
159추가: .map(|path| vec![path]),
160추가: Purpose::Destination | Purpose::Retry => dialog
161추가: .set_title("압축을 풀 폴더 선택")
162추가: .pick_folder()
163추가: .map(|path| vec![path]),
164추가: Purpose::SaveGzip | Purpose::RetryGzip => dialog
165추가: .set_title("압축 해제 파일 저장")
166추가: .set_file_name(request.file_name)
167추가: .save_file()
168추가: .map(|path| vec![path]),
169추가: Purpose::SaveZip => dialog
170추가: .set_title("ZIP 파일 저장")
171추가: .set_file_name(request.file_name)
172추가: .add_filter("ZIP 압축파일", &["zip"])
173추가: .save_file()
174추가: .map(|path| vec![path]),
175추가: };
176추가: Ok(answer)
177추가: }
수정experiments/rust-ui-memory-app/src/archive_screen.rs+33-8
@@ -316,7 +316,13 @@ impl ArchiveApp {
316316 self.zip_name.clone()
317317 },
318318 };
319삭제: match self.dialogs.choose(request) {
319추가: let answer = self.dialogs.choose(request);
320추가: if answer.is_ok()
321추가: && self.ui_error.as_deref() == Some(crate::archive_dialog::DIALOG_UNAVAILABLE)
322추가: {
323추가: self.ui_error = None;
324추가: }
325추가: match answer {
320326 Ok(Some(paths)) if !paths.is_empty() => {
321327 let path = paths[0].clone();
322328 match purpose {
@@ -529,7 +535,7 @@ impl ArchiveApp {
529535 });
530536 });
531537 });
532삭제: if self.model.busy() || self.result_visible() || self.ui_error.is_some() {
538추가: if self.model.busy() || self.result_visible() || (self.ui_error.is_some() && !self.create) {
533539 egui::Panel::bottom("archive-work")
534540 .frame(theme::panel(theme::PANEL).corner_radius(0))
535541 .show(root, |ui| self.work_area(ui));
@@ -826,14 +832,28 @@ impl ArchiveApp {
826832 })
827833 }
828834
835추가: fn error_notice(ui: &mut egui::Ui, error: &str) {
836추가: let response = theme::panel(theme::ERROR_BG)
837추가: .show(ui, |ui| {
838추가: ui.horizontal_wrapped(|ui| {
839추가: theme::icon(ui, Icon::Error, 24.0);
840추가: ui.colored_label(theme::ERROR, error);
841추가: });
842추가: })
843추가: .response;
844추가: response.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Alert, true, error));
845추가: }
846추가:
829847 fn work_area(&mut self, ui: &mut egui::Ui) {
830848 if self.model.busy() {
831849 self.progress(ui);
832850 } else if self.result_visible() {
833851 self.result(ui);
834852 }
835삭제: if let Some(error) = &self.ui_error {
836삭제: ui.colored_label(theme::ERROR, error);
853추가: if !self.create
854추가: && let Some(error) = &self.ui_error
855추가: {
856추가: Self::error_notice(ui, error);
837857 if error == present::FOLDER_ERROR
838858 && theme::action(ui, "폴더 바꾸기", false, true).clicked()
839859 {
@@ -1158,9 +1178,17 @@ impl ArchiveApp {
11581178 cancel = close.clicked();
11591179 });
11601180 });
1181추가: if let Some(error) = &self.ui_error {
1182추가: Self::error_notice(ui, error);
1183추가: }
11611184 egui::ScrollArea::vertical()
11621185 .id_salt("create-fields")
1163삭제: .max_height((ctx.content_rect().height() - 180.0).max(180.0))
1186추가: .max_height(
1187추가: (ctx.content_rect().height()
1188추가: - 180.0
1189추가: - if self.ui_error.is_some() { 96.0 } else { 0.0 })
1190추가: .max(120.0),
1191추가: )
11641192 .show(ui, |ui| {
11651193 ui.add_space(16.0);
11661194 let frame = theme::panel(theme::STRIPE)
@@ -1236,9 +1264,6 @@ impl ArchiveApp {
12361264 });
12371265 let check = ui.checkbox(&mut self.aes256, "암호로 보호하기");
12381266 theme::focus(&check);
1239삭제: if let Some(error) = &self.ui_error {
1240삭제: ui.colored_label(theme::ERROR, error);
1241삭제: }
12421267 ui.add_space(16.0);
12431268 });
12441269 let (dismiss, confirm) =
수정tests/rust-app-ui/dialogs.rs+4-0
@@ -7,6 +7,7 @@ pub struct DialogState {
77 pub answers: VecDeque<Option<Vec<PathBuf>>>,
88 pub save_name: Option<String>,
99 pub cancel_save: bool,
10추가: pub error: Option<String>,
1011}
1112
1213#[derive(Clone, Default)]
@@ -16,6 +17,9 @@ impl Dialogs for TestDialogs {
1617 fn choose(&mut self, request: DialogRequest) -> Result<Option<Vec<PathBuf>>, String> {
1718 let mut state = self.0.borrow_mut();
1819 state.requests.push(request.clone());
20추가: if let Some(error) = &state.error {
21추가: return Err(error.clone());
22추가: }
1923 if let Some(answer) = state.answers.pop_front() {
2024 return Ok(answer);
2125 }
수정tests/rust-app-ui/native_dialogs.rs+103-0
@@ -75,3 +75,106 @@ fn gzip_suggested_names_are_portable_and_preserve_valid_stems() {
7575 }
7676 assert!(valid_output_leaf("사용자 이름.txt"));
7777}
78추가:
79추가: #[cfg(target_os = "linux")]
80추가: #[test]
81추가: fn portal_response_distinguishes_cancellation_from_backend_failure() {
82추가: use ashpd::{Error, PortalError, desktop::ResponseError};
83추가: use zipelo_ui_memory_app::archive_dialog::{DIALOG_UNAVAILABLE, portal_response};
84추가: for error in [
85추가: Error::Response(ResponseError::Cancelled),
86추가: Error::Portal(PortalError::Cancelled("cancelled".into())),
87추가: ] {
88추가: assert_eq!(portal_response(Err(error)), Ok(None));
89추가: }
90추가: for error in [
91추가: Error::Response(ResponseError::Other),
92추가: Error::Portal(PortalError::Failed("failed".into())),
93추가: Error::Portal(PortalError::WindowDestroyed("destroyed".into())),
94추가: Error::NoResponse,
95추가: Error::PortalNotFound("org.freedesktop.portal.FileChooser".try_into().unwrap()),
96추가: Error::IO(std::io::Error::other("backend unavailable")),
97추가: Error::ParseError("invalid URI"),
98추가: ] {
99추가: assert_eq!(portal_response(Err(error)), Err(DIALOG_UNAVAILABLE.into()));
100추가: }
101추가: assert_eq!(portal_response(Ok(vec![])), Err(DIALOG_UNAVAILABLE.into()));
102추가: let path = Path::new("/selected/archive.zip").to_path_buf();
103추가: assert_eq!(
104추가: portal_response(Ok(vec![path.clone()])),
105추가: Ok(Some(vec![path]))
106추가: );
107추가: }
108추가:
109추가: #[cfg(target_os = "linux")]
110추가: #[test]
111추가: fn missing_portal_returns_errors_for_every_dialog() {
112추가: use std::{
113추가: process::{Command, Stdio},
114추가: time::{Duration, Instant},
115추가: };
116추가: use zipelo_ui_memory_app::archive_dialog::{
117추가: DIALOG_UNAVAILABLE, DialogRequest, Dialogs, NativeDialogs, Purpose,
118추가: };
119추가: if std::env::var_os("ZIPELO_NO_PORTAL_CHILD").is_some() {
120추가: let mut dialogs = NativeDialogs;
121추가: for purpose in [
122추가: Purpose::Open,
123추가: Purpose::Files,
124추가: Purpose::Folder,
125추가: Purpose::Destination,
126추가: Purpose::Retry,
127추가: Purpose::SaveZip,
128추가: Purpose::SaveGzip,
129추가: Purpose::RetryGzip,
130추가: ] {
131추가: let result = dialogs.choose(DialogRequest {
132추가: purpose,
133추가: directory: std::env::current_dir().unwrap(),
134추가: file_name: "output.zip".into(),
135추가: });
136추가: assert_eq!(result, Err(DIALOG_UNAVAILABLE.into()), "{purpose:?}");
137추가: }
138추가: return;
139추가: }
140추가: let endpoint = Path::new(env!("CARGO_MANIFEST_DIR")).join(format!(
141추가: "../../tests/rust-app-ui/runs/no-bus-{}",
142추가: std::process::id()
143추가: ));
144추가: assert!(!endpoint.exists());
145추가: let mut child = Command::new(std::env::current_exe().unwrap())
146추가: .args([
147추가: "--exact",
148추가: "native_dialogs::missing_portal_returns_errors_for_every_dialog",
149추가: "--nocapture",
150추가: ])
151추가: .env("ZIPELO_NO_PORTAL_CHILD", "1")
152추가: .env(
153추가: "DBUS_SESSION_BUS_ADDRESS",
154추가: format!("unix:path={}", endpoint.display()),
155추가: )
156추가: .env_remove("DBUS_STARTER_ADDRESS")
157추가: .stdout(Stdio::piped())
158추가: .stderr(Stdio::piped())
159추가: .spawn()
160추가: .unwrap();
161추가: let deadline = Instant::now() + Duration::from_secs(15);
162추가: loop {
163추가: if child.try_wait().unwrap().is_some() {
164추가: break;
165추가: }
166추가: if Instant::now() >= deadline {
167추가: child.kill().unwrap();
168추가: child.wait().unwrap();
169추가: panic!("portal 실패 응답 시간 초과");
170추가: }
171추가: std::thread::sleep(Duration::from_millis(10));
172추가: }
173추가: let output = child.wait_with_output().unwrap();
174추가: assert!(
175추가: output.status.success(),
176추가: "{}{}",
177추가: String::from_utf8_lossy(&output.stdout),
178추가: String::from_utf8_lossy(&output.stderr)
179추가: );
180추가: }
수정tests/rust-app-ui/toolbar.rs+70-0
@@ -345,3 +345,73 @@ fn gzip_save_cancel_and_invalid_output_do_not_start_an_extraction() {
345345 assert_eq!(factory.state.borrow().starts.len(), 1);
346346 assert!(!app.model.busy());
347347}
348추가:
349추가: #[test]
350추가: fn dialog_failures_show_alerts_while_cancelled_dialogs_remain_silent() {
351추가: use zipelo_ui_memory_app::archive_dialog::DIALOG_UNAVAILABLE;
352추가: for failed in [false, true] {
353추가: for purpose in [
354추가: Purpose::Open,
355추가: Purpose::Files,
356추가: Purpose::Folder,
357추가: Purpose::Destination,
358추가: Purpose::SaveZip,
359추가: Purpose::SaveGzip,
360추가: ] {
361추가: let scratch = Folder::new();
362추가: let factory = FakeFactory::default();
363추가: if purpose == Purpose::SaveGzip {
364추가: factory.state.borrow_mut().list_format = Some(Format::Gzip);
365추가: }
366추가: let mut app = loaded(&scratch, &factory);
367추가: let dialogs = TestDialogs::default();
368추가: dialogs.0.borrow_mut().cancel_save = true;
369추가: if failed {
370추가: dialogs.0.borrow_mut().error = Some(DIALOG_UNAVAILABLE.into());
371추가: }
372추가: app.set_dialogs(Box::new(dialogs.clone()));
373추가: let ctx = egui::Context::default();
374추가: let label = match purpose {
375추가: Purpose::Open => "열기",
376추가: Purpose::Files | Purpose::Folder | Purpose::SaveZip => {
377추가: policy_click(&ctx, &mut app, "압축하기");
378추가: if purpose == Purpose::SaveZip {
379추가: let source = scratch.0.join("source.txt");
380추가: fs::write(&source, b"preserve").unwrap();
381추가: app.add_sources(vec![source]);
382추가: }
383추가: match purpose {
384추가: Purpose::Files => "파일 추가",
385추가: Purpose::Folder => "폴더 추가",
386추가: _ => "압축하기",
387추가: }
388추가: }
389추가: _ => "압축해제",
390추가: };
391추가: policy_click(&ctx, &mut app, label);
392추가: let shown = policy_render(&ctx, &mut app, vec![]);
393추가: assert_eq!(
394추가: shown.iter().any(|(text, _)| text == DIALOG_UNAVAILABLE),
395추가: failed,
396추가: "{purpose:?}"
397추가: );
398추가: assert_eq!(factory.state.borrow().starts.len(), 1, "{purpose:?}");
399추가: assert!(!app.model.busy());
400추가: assert_eq!(dialogs.0.borrow().requests.last().unwrap().purpose, purpose);
401추가: assert_eq!(
402추가: shown
403추가: .iter()
404추가: .filter(|(text, _)| text == DIALOG_UNAVAILABLE)
405추가: .count(),
406추가: usize::from(failed)
407추가: );
408추가: if failed {
409추가: dialogs.0.borrow_mut().error = None;
410추가: policy_click(&ctx, &mut app, label);
411추가: let recovered = policy_render(&ctx, &mut app, vec![]);
412추가: assert!(!recovered.iter().any(|(text, _)| text == DIALOG_UNAVAILABLE));
413추가: assert_eq!(factory.state.borrow().starts.len(), 1);
414추가: }
415추가: }
416추가: }
417추가: }
수정tests/ui-redesign/README.md+2-0
@@ -18,6 +18,8 @@ Enter는 초점이 있는 버튼만 활성화하며 암호 입력란 제출만
1818
1919단일 파일 GZ는 운영체제 저장 창에서 출력 이름과 위치를 선택하며 TAR.GZ는 폴더 선택을 유지함. 빈 이름, 금지 문자와 예약 이름은 안전한 기본 이름으로 제안하고 반환된 이름도 검증함. native_dialog_flows.rs는 GZ의 취소, 충돌 뒤 이름 변경, 원본 보존과 대소문자 ZIP 열기를 실제 작업자로 확인함. native_dialogs.rs는 확장자 대소문자 조합 30개와 모든 파일 선택지 및 GZ 기본 이름을 검증함.
2020
21추가: Linux는 rfd가 사용하는 기존 ashpd backend의 오류 응답을 직접 받아 사용자 취소와 구분함. portal_response_distinguishes_cancellation_from_backend_failure는 취소 코드, backend 실패와 잘못된 성공 응답을 구분함. missing_portal_returns_errors_for_every_dialog는 별도 자식 프로세스의 연결 불가 bus로 실제 native backend 8개 경로를 확인하며 부모의 세션 환경은 바꾸지 않음. dialog_failures_show_alerts_while_cancelled_dialogs_remain_silent는 열기, 파일 추가, 폴더 추가, 풀 위치, ZIP 저장과 GZ 저장에서 실패 안내와 취소 무작업을 대조함.
22추가:
2123## 화면 재현
2224
2325Xvfb, xdotool, ImageMagick import와 시스템 CJK 글꼴이 필요함. 촬영 실행 파일은 실제 eframe 컴포넌트에 합성 목록을 전달하며 압축파일을 읽거나 결과물을 저장하지 않음.
수정tests/ui-redesign/capture.py+17-1
@@ -29,7 +29,19 @@ def capture(binary, variant, state, output, environment, width, height):
2929 automatic.rmdir()
3030 except OSError:
3131 pass
32삭제: mode = "opened" if state in {"picker", "selected-empty"} else state
32추가: environment = dict(environment)
33추가: if state in {"dialog-unavailable", "create-dialog-unavailable"}:
34추가: endpoint = ROOT / "tests/ui-redesign/runs/no-portal-bus"
35추가: if endpoint.exists():
36추가: raise RuntimeError("실패 시험용 bus 경로가 이미 존재함")
37추가: environment["DBUS_SESSION_BUS_ADDRESS"] = f"unix:path={endpoint}"
38추가: environment.pop("DBUS_STARTER_ADDRESS", None)
39추가: mode = {
40추가: "picker": "opened",
41추가: "selected-empty": "opened",
42추가: "dialog-unavailable": "toolbar-root",
43추가: "create-dialog-unavailable": "toolbar-create",
44추가: }.get(state, state)
3345 log = ROOT / "tests/ui-redesign/runs" / f"{variant}-{state}.log"
3446 with log.open("w") as stream:
3547 app = subprocess.Popen([str(binary), mode], cwd=ROOT, env=environment, stdout=stream, stderr=stream)
@@ -55,6 +67,10 @@ def capture(binary, variant, state, output, environment, width, height):
5567 command(["xdotool", "mousemove", "--window", window, str(x), str(y), "click", "1"], environment)
5668 time.sleep(0.4)
5769
70추가: if state == "dialog-unavailable":
71추가: click(70, 45)
72추가: elif state == "create-dialog-unavailable":
73추가: click(width // 2 - 250, height // 2 + 54)
5874 if state == "create" or (state == "create-filled" and variant == "before"):
5975 click(180 if variant == "before" else width - 90, 18 if variant == "before" else 40)
6076 if state == "create-filled" and variant == "before":
추가tests/ui-redesign/screenshots/portal-failure/capture.json+14-0
@@ -0,0 +1,14 @@
1추가: [
2추가: {
3추가: "state": "dialog-unavailable",
4추가: "path": "tests/ui-redesign/screenshots/portal-failure/dialog-unavailable.png",
5추가: "width": 1060,
6추가: "height": 720
7추가: },
8추가: {
9추가: "state": "create-dialog-unavailable",
10추가: "path": "tests/ui-redesign/screenshots/portal-failure/create-dialog-unavailable.png",
11추가: "width": 1060,
12추가: "height": 720
13추가: }
14추가: ]
추가tests/ui-redesign/screenshots/portal-failure/create-dialog-unavailable.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/portal-failure/dialog-unavailable.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기