|
| 1 | +--[[ BEGINCONFIG ======================================== |
| 2 | +
|
| 3 | +MODELARGS="-sl2 mouse -sl7 cffa2" |
| 4 | +DISKARGS="-hard1 $HARDIMG -hard2 res/tests.hdv" |
| 5 | +
|
| 6 | +======================================== ENDCONFIG ]]-- |
| 7 | + |
| 8 | +test.Step( |
| 9 | + "Search all volumes", |
| 10 | + function() |
| 11 | + a2d.CloseAllWindows() |
| 12 | + a2d.InvokeMenuItem(a2d.APPLE_MENU, a2d.FIND_FILES) |
| 13 | + apple2.Type("PRODOS") |
| 14 | + a2d.DialogOK() |
| 15 | + emu.wait(10) |
| 16 | + test.Snap("verify all volumes searched") |
| 17 | + a2d.DialogCancel() |
| 18 | +end) |
| 19 | + |
| 20 | +test.Step( |
| 21 | + "Search open volume", |
| 22 | + function() |
| 23 | + a2d.OpenPath("/A2.DESKTOP") |
| 24 | + a2d.InvokeMenuItem(a2d.APPLE_MENU, a2d.FIND_FILES) |
| 25 | + apple2.Type("PRODOS") |
| 26 | + a2d.DialogOK() |
| 27 | + emu.wait(10) |
| 28 | + test.Snap("verify only open volume searched") |
| 29 | + a2d.DialogCancel() |
| 30 | +end) |
| 31 | + |
| 32 | +test.Step( |
| 33 | + "Search open volume", |
| 34 | + function() |
| 35 | + a2d.OpenPath("/A2.DESKTOP/EXTRAS") |
| 36 | + a2d.InvokeMenuItem(a2d.APPLE_MENU, a2d.FIND_FILES) |
| 37 | + apple2.Type("PRODOS") |
| 38 | + a2d.DialogOK() |
| 39 | + emu.wait(10) |
| 40 | + test.Snap("verify only open folder searched") |
| 41 | + a2d.DialogCancel() |
| 42 | +end) |
| 43 | + |
| 44 | +test.Step( |
| 45 | + "OA+O on selection", |
| 46 | + function() |
| 47 | + a2d.OpenPath("/A2.DESKTOP") |
| 48 | + a2d.InvokeMenuItem(a2d.APPLE_MENU, a2d.FIND_FILES) |
| 49 | + apple2.Type("CAL*") |
| 50 | + a2d.DialogOK() |
| 51 | + emu.wait(10) |
| 52 | + apple2.DownArrowKey() -- select first result |
| 53 | + a2d.OAShortcut("O") |
| 54 | + a2d.WaitForRepaint() |
| 55 | + test.Snap("verify window opened and file selected") |
| 56 | +end) |
| 57 | + |
| 58 | +test.Step( |
| 59 | + "SA+O on selection", |
| 60 | + function() |
| 61 | + a2d.OpenPath("/A2.DESKTOP") |
| 62 | + a2d.InvokeMenuItem(a2d.APPLE_MENU, a2d.FIND_FILES) |
| 63 | + apple2.Type("CAL*") |
| 64 | + a2d.DialogOK() |
| 65 | + emu.wait(10) |
| 66 | + apple2.DownArrowKey() -- select first result |
| 67 | + a2d.SAShortcut("O") |
| 68 | + a2d.WaitForRepaint() |
| 69 | + test.Snap("verify window opened and file selected") |
| 70 | +end) |
| 71 | + |
| 72 | +test.Step( |
| 73 | + "Double-click on selection in inactive window", |
| 74 | + function() |
| 75 | + a2d.OpenPath("/A2.DESKTOP/APPLE.MENU", true) -- leave parent open |
| 76 | + a2d.CycleWindows() -- put volume in foreground |
| 77 | + a2d.InvokeMenuItem(a2d.APPLE_MENU, a2d.FIND_FILES) |
| 78 | + apple2.Type("CAL*") |
| 79 | + a2d.DialogOK() |
| 80 | + emu.wait(10) |
| 81 | + a2d.InMouseKeysMode(function(m) |
| 82 | + m.MoveToApproximately(100,60) |
| 83 | + m.DoubleClick() |
| 84 | + end) |
| 85 | + a2d.WaitForRepaint() |
| 86 | + test.Snap("verify window activated and file selected") |
| 87 | +end) |
| 88 | + |
| 89 | +test.Step( |
| 90 | + "Deeply nested", |
| 91 | + function() |
| 92 | + a2d.OpenPath("/TESTS/FIND.FILES") |
| 93 | + a2d.InvokeMenuItem(a2d.APPLE_MENU, a2d.FIND_FILES) |
| 94 | + apple2.Type("*") |
| 95 | + a2d.DialogOK() |
| 96 | + emu.wait(10) |
| 97 | + test.Snap("verify no crash") |
| 98 | +end) |
| 99 | + |
| 100 | +test.Step( |
| 101 | + "Long pathnames", |
| 102 | + function() |
| 103 | + a2d.RenamePath("/TESTS", "ABCDEF123456789") |
| 104 | + a2d.OpenPath("/ABCDEF123456789") |
| 105 | + a2d.InvokeMenuItem(a2d.APPLE_MENU, a2d.FIND_FILES) |
| 106 | + apple2.Type("*") |
| 107 | + a2d.DialogOK() |
| 108 | + emu.wait(10) |
| 109 | + test.Snap("verify no crash") |
| 110 | + a2d.RenamePath("/ABCDEF123456789", "/TESTS") |
| 111 | +end) |
| 112 | + |
| 113 | +test.Step( |
| 114 | + "Selection", |
| 115 | + function() |
| 116 | + a2d.OpenPath("/TESTS/FOLDER") |
| 117 | + a2d.InvokeMenuItem(a2d.APPLE_MENU, a2d.FIND_FILES) |
| 118 | + apple2.Type("*") |
| 119 | + a2d.DialogOK() |
| 120 | + emu.wait(10) |
| 121 | + apple2.DownArrowKey() |
| 122 | + apple2.ReturnKey() |
| 123 | + emu.wait(10) |
| 124 | + apple2.DownArrowKey() |
| 125 | + test.Snap("verify only one entry appears highlighted") |
| 126 | +end) |
| 127 | + |
| 128 | + |
| 129 | + |
0 commit comments