mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-26 03:49:11 +00:00
Exercise attachment menu after closing the existing tab
This commit is contained in:
@@ -130,7 +130,6 @@ fn right_click(h: &mut Harness<'static, PdfCraftApp>, label: &str) {
|
||||
/// A row event of the Attachments list becomes an attachment action: a double click saves a file that
|
||||
/// is not a PDF and opens one that is; the row menu offers Open only for the PDF, and its Save, Open and
|
||||
/// Delete act on the row it was opened on.
|
||||
#[ignore = "known gap of the egui-to-craft port: see docs/port-known-gaps.md"]
|
||||
#[test]
|
||||
fn attachment_rows_turn_their_events_into_attachment_actions() {
|
||||
let saved = Path::new("out/saved notes.txt");
|
||||
@@ -143,6 +142,12 @@ fn attachment_rows_turn_their_events_into_attachment_actions() {
|
||||
assert_eq!(h.state().views.len(), 1, "nothing opens");
|
||||
double_click(&mut h, "inner.pdf");
|
||||
assert_eq!(h.state().views.len(), 2, "the attached PDF opens in a tab of its own");
|
||||
// Opening the same attachment again selects its existing tab. Close it and keep a different
|
||||
// document open so the menu action must create a third tab.
|
||||
h.state_mut().close_tab(1);
|
||||
let ctx = h.ctx.clone();
|
||||
h.state_mut().open_bytes(&ctx, "other.pdf", None, include_bytes!("../data/form.pdf").to_vec()).unwrap();
|
||||
h.run_steps(3);
|
||||
h.get_by_role_and_label(egui::accesskit::Role::Tab, "doc.pdf").click();
|
||||
h.run_steps(3);
|
||||
// The menu of a text file has no Open; the PDF's has.
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
# Known gaps of the egui-to-craft port
|
||||
|
||||
Status: 12 app tests are ignored at the end of the port's test phase (2026-11-20), so the suite can move on to the
|
||||
look-and-behaviour phase. Each still describes behaviour production had; each is a real gap to close, not a test to
|
||||
drop. Remove the `#[ignore]` when its gap is fixed. Framework items (F-n) are in the port workspace's follow-up list.
|
||||
Status: 11 app tests remain ignored after the port's test phase (2026-11-20). Remove the `#[ignore]` when its gap is
|
||||
fixed. Framework items (F-n) are in the port workspace's follow-up list.
|
||||
|
||||
| Test | How it fails | Likely cause |
|
||||
|---|---|---|
|
||||
| `attachment_row::attachment_rows_turn_their_events_into_attachment_actions` | Open from the row menu runs twice | the row menu and the row's own activation both answer one click |
|
||||
| `comments::a_double_click_on_a_replace_text_opens_its_one_window` | the group's window doesn't open on the double-click | the second press goes to the canvas tool, not the comment part |
|
||||
| `comments::closing_a_pop_up_saves_its_typed_text` | typing and closing aren't one undo step | the pop-up's close commits the text as a separate edit |
|
||||
| `content::added_picture_resizes_repeatedly_and_drags_back_from_out_of_bounds_without_smear` | edge texels smear across the out-of-bounds half | texture sampling/clamping of the cached picture while dragged out of the page |
|
||||
|
||||
Reference in New Issue
Block a user