|
| 1 | + |
| 2 | +function OAUp() |
| 3 | + apple2.PressOA() |
| 4 | + apple2.UpArrowKey() |
| 5 | + emu.wait(1/60) |
| 6 | + apple2.ReleaseOA() |
| 7 | +end |
| 8 | + |
| 9 | +test.Step( |
| 10 | + "Open enclosing folder", |
| 11 | + function() |
| 12 | + a2d.OpenPath("/A2.DESKTOP/APPLE.MENU", true) |
| 13 | + a2d.CycleWindows() |
| 14 | + test.ExpectEqualsIgnoreCase(a2dtest.GetFrontWindowTitle(), "A2.DESKTOP", "volume window should be on top") |
| 15 | + a2d.CloseWindow() |
| 16 | + test.ExpectEquals(a2dtest.GetWindowCount(), 1, "one window should be open") |
| 17 | + |
| 18 | + OAUp() |
| 19 | + test.ExpectEquals(a2dtest.GetWindowCount(), 2, "two windows should be open") |
| 20 | + test.ExpectEqualsIgnoreCase(a2dtest.GetFrontWindowTitle(), "A2.DESKTOP", "volume window should be open again") |
| 21 | + test.Snap("verify folder icon is selected") |
| 22 | + |
| 23 | + OAUp() |
| 24 | + test.ExpectEquals(a2dtest.GetWindowCount(), 2, "two windows should be open") |
| 25 | + test.Snap("verify volume icon is selected") |
| 26 | + |
| 27 | + a2d.CloseAllWindows() |
| 28 | +end) |
| 29 | + |
| 30 | +test.Step( |
| 31 | + "Reactivate existing window", |
| 32 | + function() |
| 33 | + a2d.OpenPath("/A2.DESKTOP/APPLE.MENU", true) |
| 34 | + test.ExpectEquals(a2dtest.GetWindowCount(), 2, "two windows should be open") |
| 35 | + |
| 36 | + OAUp() |
| 37 | + test.ExpectEquals(a2dtest.GetWindowCount(), 2, "two windows should be open") |
| 38 | + test.ExpectEqualsIgnoreCase(a2dtest.GetFrontWindowTitle(), "A2.DESKTOP", "volume window should be open again") |
| 39 | + test.Snap("verify folder icon is selected") |
| 40 | + |
| 41 | + OAUp() |
| 42 | + test.ExpectEquals(a2dtest.GetWindowCount(), 2, "two windows should be open") |
| 43 | + test.Snap("verify volume icon is selected") |
| 44 | + |
| 45 | + a2d.CloseAllWindows() |
| 46 | +end) |
| 47 | + |
| 48 | + |
| 49 | +test.Step( |
| 50 | + "View change", |
| 51 | + function() |
| 52 | + a2d.OpenPath("/A2.DESKTOP/APPLE.MENU", true) |
| 53 | + a2d.CycleWindows() |
| 54 | + test.ExpectEqualsIgnoreCase(a2dtest.GetFrontWindowTitle(), "A2.DESKTOP", "volume window should be on top") |
| 55 | + a2d.InvokeMenuItem(a2d.VIEW_MENU, a2d.VIEW_BY_NAME) |
| 56 | + a2d.CycleWindows() |
| 57 | + test.ExpectEqualsIgnoreCase(a2dtest.GetFrontWindowTitle(), "APPLE.MENU", "folder window should be on top") |
| 58 | + |
| 59 | + OAUp() |
| 60 | + test.ExpectEquals(a2dtest.GetWindowCount(), 2, "two windows should be open") |
| 61 | + test.ExpectEqualsIgnoreCase(a2dtest.GetFrontWindowTitle(), "A2.DESKTOP", "volume window should be open again") |
| 62 | + test.Snap("verify folder icon is selected") |
| 63 | + |
| 64 | + OAUp() |
| 65 | + test.ExpectEquals(a2dtest.GetWindowCount(), 2, "two windows should be open") |
| 66 | + test.Snap("verify volume icon is selected") |
| 67 | + |
| 68 | + a2d.CloseAllWindows() |
| 69 | +end) |
| 70 | + |
| 71 | +test.Step( |
| 72 | + "Icon selection with keyboard", |
| 73 | + function() |
| 74 | + a2d.OpenPath("/A2.DESKTOP/APPLE.MENU", true) |
| 75 | + |
| 76 | + OAUp() |
| 77 | + test.ExpectEquals(a2dtest.GetWindowCount(), 2, "two windows should be open") |
| 78 | + test.ExpectEqualsIgnoreCase(a2dtest.GetFrontWindowTitle(), "A2.DESKTOP", "volume window should be open again") |
| 79 | + test.Snap("verify folder icon is selected") |
| 80 | + |
| 81 | + apple2.RightArrowKey() |
| 82 | + a2d.WaitForRepaint() |
| 83 | + test.Snap("verify single icon is selected") |
| 84 | + |
| 85 | + a2d.CloseAllWindows() |
| 86 | +end) |
| 87 | + |
| 88 | +test.Step( |
| 89 | + "Icon selection with keyboard with window cycling", |
| 90 | + function() |
| 91 | + a2d.OpenPath("/A2.DESKTOP/APPLE.MENU") |
| 92 | + |
| 93 | + OAUp() |
| 94 | + test.ExpectEquals(a2dtest.GetWindowCount(), 2, "two windows should be open") |
| 95 | + test.ExpectEqualsIgnoreCase(a2dtest.GetFrontWindowTitle(), "A2.DESKTOP", "volume window should be open again") |
| 96 | + test.Snap("verify folder icon is selected") |
| 97 | + |
| 98 | + apple2.RightArrowKey() |
| 99 | + a2d.WaitForRepaint() |
| 100 | + test.Snap("verify single icon is selected") |
| 101 | + |
| 102 | + a2d.CloseAllWindows() |
| 103 | +end) |
| 104 | + |
0 commit comments