termcast 1.3.19 → 1.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.d.ts +104 -0
- package/dist/ai.d.ts.map +1 -0
- package/dist/ai.js +135 -0
- package/dist/ai.js.map +1 -0
- package/dist/apis/browser-extension.d.ts +18 -0
- package/dist/apis/browser-extension.d.ts.map +1 -0
- package/dist/apis/browser-extension.js +14 -0
- package/dist/apis/browser-extension.js.map +1 -0
- package/dist/apis/localstorage.d.ts.map +1 -1
- package/dist/apis/localstorage.js +4 -7
- package/dist/apis/localstorage.js.map +1 -1
- package/dist/apis/oauth.d.ts.map +1 -1
- package/dist/apis/oauth.js +5 -1
- package/dist/apis/oauth.js.map +1 -1
- package/dist/apis/preferences.d.ts.map +1 -1
- package/dist/apis/preferences.js +38 -19
- package/dist/apis/preferences.js.map +1 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +2 -1
- package/dist/build.js.map +1 -1
- package/dist/cache.d.ts +32 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +205 -0
- package/dist/cache.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +69 -33
- package/dist/cli.js.map +1 -1
- package/dist/clipboard.d.ts +36 -0
- package/dist/clipboard.d.ts.map +1 -0
- package/dist/clipboard.js +154 -0
- package/dist/clipboard.js.map +1 -0
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +24 -6
- package/dist/compile.js.map +1 -1
- package/dist/components/actions.d.ts.map +1 -1
- package/dist/components/actions.js +56 -30
- package/dist/components/actions.js.map +1 -1
- package/dist/components/detail.d.ts.map +1 -1
- package/dist/components/detail.js +4 -0
- package/dist/components/detail.js.map +1 -1
- package/dist/components/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown.js +38 -15
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/extension-preferences.d.ts.map +1 -1
- package/dist/components/extension-preferences.js +40 -13
- package/dist/components/extension-preferences.js.map +1 -1
- package/dist/components/form/checkbox.d.ts.map +1 -1
- package/dist/components/form/checkbox.js +5 -3
- package/dist/components/form/checkbox.js.map +1 -1
- package/dist/components/form/date-picker.d.ts.map +1 -1
- package/dist/components/form/date-picker.js +5 -3
- package/dist/components/form/date-picker.js.map +1 -1
- package/dist/components/form/description.d.ts.map +1 -1
- package/dist/components/form/description.js +2 -2
- package/dist/components/form/description.js.map +1 -1
- package/dist/components/form/dropdown.d.ts.map +1 -1
- package/dist/components/form/dropdown.js +84 -80
- package/dist/components/form/dropdown.js.map +1 -1
- package/dist/components/form/file-autocomplete.d.ts +3 -6
- package/dist/components/form/file-autocomplete.d.ts.map +1 -1
- package/dist/components/form/file-autocomplete.js +61 -66
- package/dist/components/form/file-autocomplete.js.map +1 -1
- package/dist/components/form/file-picker.d.ts.map +1 -1
- package/dist/components/form/file-picker.js +33 -30
- package/dist/components/form/file-picker.js.map +1 -1
- package/dist/components/form/form-end.d.ts.map +1 -1
- package/dist/components/form/form-end.js +21 -1
- package/dist/components/form/form-end.js.map +1 -1
- package/dist/components/form/form-type-only.d.ts +174 -0
- package/dist/components/form/form-type-only.d.ts.map +1 -0
- package/dist/components/form/form-type-only.js +2 -0
- package/dist/components/form/form-type-only.js.map +1 -0
- package/dist/components/form/index.d.ts +3 -1
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +100 -28
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/password-field.d.ts.map +1 -1
- package/dist/components/form/password-field.js +5 -3
- package/dist/components/form/password-field.js.map +1 -1
- package/dist/components/form/text-area.d.ts.map +1 -1
- package/dist/components/form/text-area.js +5 -3
- package/dist/components/form/text-area.js.map +1 -1
- package/dist/components/form/text-field.d.ts.map +1 -1
- package/dist/components/form/text-field.js +6 -4
- package/dist/components/form/text-field.js.map +1 -1
- package/dist/components/form/types.d.ts +5 -0
- package/dist/components/form/types.d.ts.map +1 -1
- package/dist/components/form/use-form-handling.d.ts +4 -0
- package/dist/components/form/use-form-handling.d.ts.map +1 -0
- package/dist/components/form/use-form-handling.js +37 -0
- package/dist/components/form/use-form-handling.js.map +1 -0
- package/dist/components/form/with-left-border.d.ts +2 -1
- package/dist/components/form/with-left-border.d.ts.map +1 -1
- package/dist/components/form/with-left-border.js +27 -3
- package/dist/components/form/with-left-border.js.map +1 -1
- package/dist/components/icon.d.ts +1 -0
- package/dist/components/icon.d.ts.map +1 -1
- package/dist/components/icon.js +24 -8
- package/dist/components/icon.js.map +1 -1
- package/dist/components/list.d.ts +2 -2
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +140 -62
- package/dist/components/list.js.map +1 -1
- package/dist/components/loading-bar.d.ts.map +1 -1
- package/dist/components/loading-bar.js +2 -2
- package/dist/components/loading-bar.js.map +1 -1
- package/dist/components/loading-text.d.ts +8 -0
- package/dist/components/loading-text.d.ts.map +1 -0
- package/dist/components/loading-text.js +58 -0
- package/dist/components/loading-text.js.map +1 -0
- package/dist/descendants.js +1 -1
- package/dist/descendants.js.map +1 -1
- package/dist/dev-ui.d.ts +7 -0
- package/dist/dev-ui.d.ts.map +1 -0
- package/dist/dev-ui.js +118 -0
- package/dist/dev-ui.js.map +1 -0
- package/dist/environment.d.ts +63 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/environment.js +189 -0
- package/dist/environment.js.map +1 -0
- package/dist/examples/datepicker.d.ts +2 -0
- package/dist/examples/datepicker.d.ts.map +1 -0
- package/dist/examples/datepicker.js +344 -0
- package/dist/examples/datepicker.js.map +1 -0
- package/dist/examples/file-autocomplete.vitest.d.ts +2 -0
- package/dist/examples/file-autocomplete.vitest.d.ts.map +1 -0
- package/dist/examples/file-autocomplete.vitest.js +223 -0
- package/dist/examples/file-autocomplete.vitest.js.map +1 -0
- package/dist/examples/form-basic-arrow-keys.vitest.d.ts +2 -0
- package/dist/examples/form-basic-arrow-keys.vitest.d.ts.map +1 -0
- package/dist/examples/form-basic-arrow-keys.vitest.js +46 -0
- package/dist/examples/form-basic-arrow-keys.vitest.js.map +1 -0
- package/dist/examples/form-basic.vitest.d.ts +2 -0
- package/dist/examples/form-basic.vitest.d.ts.map +1 -0
- package/dist/examples/form-basic.vitest.js +630 -0
- package/dist/examples/form-basic.vitest.js.map +1 -0
- package/dist/examples/form-dropdown-with-sections.d.ts +2 -0
- package/dist/examples/form-dropdown-with-sections.d.ts.map +1 -0
- package/dist/examples/form-dropdown-with-sections.js +13 -0
- package/dist/examples/form-dropdown-with-sections.js.map +1 -0
- package/dist/examples/form-dropdown-with-sections.vitest.d.ts +2 -0
- package/dist/examples/form-dropdown-with-sections.vitest.d.ts.map +1 -0
- package/dist/examples/form-dropdown-with-sections.vitest.js +75 -0
- package/dist/examples/form-dropdown-with-sections.vitest.js.map +1 -0
- package/dist/examples/form-dropdown.vitest.d.ts +2 -0
- package/dist/examples/form-dropdown.vitest.d.ts.map +1 -0
- package/dist/examples/form-dropdown.vitest.js +854 -0
- package/dist/examples/form-dropdown.vitest.js.map +1 -0
- package/dist/examples/form-multiselect-dropdown.d.ts +2 -0
- package/dist/examples/form-multiselect-dropdown.d.ts.map +1 -0
- package/dist/examples/form-multiselect-dropdown.js +13 -0
- package/dist/examples/form-multiselect-dropdown.js.map +1 -0
- package/dist/examples/form-scroll.d.ts.map +1 -1
- package/dist/examples/form-scroll.js +7 -1
- package/dist/examples/form-scroll.js.map +1 -1
- package/dist/examples/form-scroll.vitest.d.ts +2 -0
- package/dist/examples/form-scroll.vitest.d.ts.map +1 -0
- package/dist/examples/form-scroll.vitest.js +211 -0
- package/dist/examples/form-scroll.vitest.js.map +1 -0
- package/dist/examples/form-tagpicker.vitest.d.ts +2 -0
- package/dist/examples/form-tagpicker.vitest.d.ts.map +1 -0
- package/dist/examples/form-tagpicker.vitest.js +736 -0
- package/dist/examples/form-tagpicker.vitest.js.map +1 -0
- package/dist/examples/internal/descendants-filtering.js +1 -1
- package/dist/examples/internal/descendants-filtering.js.map +1 -1
- package/dist/examples/internal/descendants.js +1 -1
- package/dist/examples/internal/descendants.js.map +1 -1
- package/dist/examples/internal/nested-boxes.d.ts +2 -0
- package/dist/examples/internal/nested-boxes.d.ts.map +1 -0
- package/dist/examples/internal/nested-boxes.js +7 -0
- package/dist/examples/internal/nested-boxes.js.map +1 -0
- package/dist/examples/internal/rhf-custom-ref.js +2 -2
- package/dist/examples/internal/rhf-custom-ref.js.map +1 -1
- package/dist/examples/internal/scrollbox-demo.js +3 -22
- package/dist/examples/internal/scrollbox-demo.js.map +1 -1
- package/dist/examples/internal/scrollbox-descendants.d.ts +2 -0
- package/dist/examples/internal/scrollbox-descendants.d.ts.map +1 -0
- package/dist/examples/internal/scrollbox-descendants.js +83 -0
- package/dist/examples/internal/scrollbox-descendants.js.map +1 -0
- package/dist/examples/internal/scrollbox-with-descendants.js +4 -8
- package/dist/examples/internal/scrollbox-with-descendants.js.map +1 -1
- package/dist/examples/internal/simple-scrollbox.vitest.d.ts +2 -0
- package/dist/examples/internal/simple-scrollbox.vitest.d.ts.map +1 -0
- package/dist/examples/internal/simple-scrollbox.vitest.js +96 -0
- package/dist/examples/internal/simple-scrollbox.vitest.js.map +1 -0
- package/dist/examples/internal/unicode-square-repro.d.ts +2 -0
- package/dist/examples/internal/unicode-square-repro.d.ts.map +1 -0
- package/dist/examples/internal/unicode-square-repro.js +7 -0
- package/dist/examples/internal/unicode-square-repro.js.map +1 -0
- package/dist/examples/list-detail-metadata.d.ts +2 -0
- package/dist/examples/list-detail-metadata.d.ts.map +1 -0
- package/dist/examples/list-detail-metadata.js +8 -0
- package/dist/examples/list-detail-metadata.js.map +1 -0
- package/dist/examples/list-dropdown-default.vitest.d.ts +2 -0
- package/dist/examples/list-dropdown-default.vitest.d.ts.map +1 -0
- package/dist/examples/list-dropdown-default.vitest.js +234 -0
- package/dist/examples/list-dropdown-default.vitest.js.map +1 -0
- package/dist/examples/list-fetch-data.vitest.d.ts +2 -0
- package/dist/examples/list-fetch-data.vitest.d.ts.map +1 -0
- package/dist/examples/list-fetch-data.vitest.js +111 -0
- package/dist/examples/list-fetch-data.vitest.js.map +1 -0
- package/dist/examples/list-filter-navigation.d.ts +2 -0
- package/dist/examples/list-filter-navigation.d.ts.map +1 -0
- package/dist/examples/list-filter-navigation.js +8 -0
- package/dist/examples/list-filter-navigation.js.map +1 -0
- package/dist/examples/list-scrollbox.vitest.d.ts +2 -0
- package/dist/examples/list-scrollbox.vitest.d.ts.map +1 -0
- package/dist/examples/list-scrollbox.vitest.js +93 -0
- package/dist/examples/list-scrollbox.vitest.js.map +1 -0
- package/dist/examples/list-with-detail-long.d.ts +2 -0
- package/dist/examples/list-with-detail-long.d.ts.map +1 -0
- package/dist/examples/list-with-detail-long.js +53 -0
- package/dist/examples/list-with-detail-long.js.map +1 -0
- package/dist/examples/list-with-detail.vitest.d.ts +2 -0
- package/dist/examples/list-with-detail.vitest.d.ts.map +1 -0
- package/dist/examples/list-with-detail.vitest.js +434 -0
- package/dist/examples/list-with-detail.vitest.js.map +1 -0
- package/dist/examples/list-with-dropdown.vitest.d.ts +2 -0
- package/dist/examples/list-with-dropdown.vitest.d.ts.map +1 -0
- package/dist/examples/list-with-dropdown.vitest.js +337 -0
- package/dist/examples/list-with-dropdown.vitest.js.map +1 -0
- package/dist/examples/list-with-sections.js +5 -1
- package/dist/examples/list-with-sections.js.map +1 -1
- package/dist/examples/list-with-sections.vitest.d.ts +2 -0
- package/dist/examples/list-with-sections.vitest.d.ts.map +1 -0
- package/dist/examples/list-with-sections.vitest.js +601 -0
- package/dist/examples/list-with-sections.vitest.js.map +1 -0
- package/dist/examples/scrollbox-vertical-centering.d.ts +6 -0
- package/dist/examples/scrollbox-vertical-centering.d.ts.map +1 -0
- package/dist/examples/scrollbox-vertical-centering.js +17 -0
- package/dist/examples/scrollbox-vertical-centering.js.map +1 -0
- package/dist/examples/simple-file-picker.vitest.d.ts +2 -0
- package/dist/examples/simple-file-picker.vitest.d.ts.map +1 -0
- package/dist/examples/simple-file-picker.vitest.js +678 -0
- package/dist/examples/simple-file-picker.vitest.js.map +1 -0
- package/dist/examples/simple-grid.vitest.d.ts +2 -0
- package/dist/examples/simple-grid.vitest.d.ts.map +1 -0
- package/dist/examples/simple-grid.vitest.js +521 -0
- package/dist/examples/simple-grid.vitest.js.map +1 -0
- package/dist/examples/simple-navigation.js +10 -4
- package/dist/examples/simple-navigation.js.map +1 -1
- package/dist/examples/simple-navigation.vitest.d.ts +2 -0
- package/dist/examples/simple-navigation.vitest.d.ts.map +1 -0
- package/dist/examples/simple-navigation.vitest.js +718 -0
- package/dist/examples/simple-navigation.vitest.js.map +1 -0
- package/dist/examples/store.vitest.d.ts +2 -0
- package/dist/examples/store.vitest.d.ts.map +1 -0
- package/dist/examples/store.vitest.js +69 -0
- package/dist/examples/store.vitest.js.map +1 -0
- package/dist/extensions/dev.d.ts +4 -2
- package/dist/extensions/dev.d.ts.map +1 -1
- package/dist/extensions/dev.js +61 -10
- package/dist/extensions/dev.js.map +1 -1
- package/dist/extensions/dev.vitest.d.ts +2 -0
- package/dist/extensions/dev.vitest.d.ts.map +1 -0
- package/dist/extensions/dev.vitest.js +197 -0
- package/dist/extensions/dev.vitest.js.map +1 -0
- package/dist/extensions/home.d.ts.map +1 -1
- package/dist/extensions/home.js +3 -0
- package/dist/extensions/home.js.map +1 -1
- package/dist/home-command.d.ts +8 -0
- package/dist/home-command.d.ts.map +1 -0
- package/dist/home-command.js +181 -0
- package/dist/home-command.js.map +1 -0
- package/dist/hover-repro.d.ts +2 -0
- package/dist/hover-repro.d.ts.map +1 -0
- package/dist/hover-repro.js +20 -0
- package/dist/hover-repro.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/dialog.d.ts +1 -0
- package/dist/internal/dialog.d.ts.map +1 -1
- package/dist/internal/dialog.js +27 -18
- package/dist/internal/dialog.js.map +1 -1
- package/dist/internal/navigation.d.ts +9 -1
- package/dist/internal/navigation.d.ts.map +1 -1
- package/dist/internal/navigation.js +5 -5
- package/dist/internal/navigation.js.map +1 -1
- package/dist/internal/offscreen.d.ts +6 -0
- package/dist/internal/offscreen.d.ts.map +1 -0
- package/dist/internal/offscreen.js +10 -0
- package/dist/internal/offscreen.js.map +1 -0
- package/dist/internal/providers.d.ts.map +1 -1
- package/dist/internal/providers.js +2 -2
- package/dist/internal/providers.js.map +1 -1
- package/dist/internal/scrollbox.d.ts +1 -10
- package/dist/internal/scrollbox.d.ts.map +1 -1
- package/dist/internal/scrollbox.js +2 -1
- package/dist/internal/scrollbox.js.map +1 -1
- package/dist/localstorage.d.ts +13 -0
- package/dist/localstorage.d.ts.map +1 -0
- package/dist/localstorage.js +190 -0
- package/dist/localstorage.js.map +1 -0
- package/dist/oauth.d.ts +142 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +551 -0
- package/dist/oauth.js.map +1 -0
- package/dist/preferences.d.ts +23 -0
- package/dist/preferences.d.ts.map +1 -0
- package/dist/preferences.js +105 -0
- package/dist/preferences.js.map +1 -0
- package/dist/state.d.ts +2 -0
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +3 -0
- package/dist/state.js.map +1 -1
- package/dist/store.d.ts +21 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +84 -0
- package/dist/store.js.map +1 -0
- package/dist/swift-loader.d.ts +3 -0
- package/dist/swift-loader.d.ts.map +1 -0
- package/dist/swift-loader.js +193 -0
- package/dist/swift-loader.js.map +1 -0
- package/dist/swift-runtime.d.ts +2 -0
- package/dist/swift-runtime.d.ts.map +1 -0
- package/dist/swift-runtime.js +27 -0
- package/dist/swift-runtime.js.map +1 -0
- package/dist/toast.d.ts +44 -0
- package/dist/toast.d.ts.map +1 -0
- package/dist/toast.js +221 -0
- package/dist/toast.js.map +1 -0
- package/dist/utils/file-system.d.ts +9 -0
- package/dist/utils/file-system.d.ts.map +1 -1
- package/dist/utils/file-system.js +49 -0
- package/dist/utils/file-system.js.map +1 -1
- package/dist/utils/run-command.d.ts +25 -1
- package/dist/utils/run-command.d.ts.map +1 -1
- package/dist/utils/run-command.js +47 -4
- package/dist/utils/run-command.js.map +1 -1
- package/dist/window.d.ts +12 -0
- package/dist/window.d.ts.map +1 -0
- package/dist/window.js +48 -0
- package/dist/window.js.map +1 -0
- package/package.json +13 -11
- package/src/apis/browser-extension.tsx +29 -0
- package/src/apis/localstorage.test.ts +14 -6
- package/src/apis/localstorage.tsx +8 -5
- package/src/apis/oauth.tsx +5 -1
- package/src/apis/preferences.tsx +48 -22
- package/src/build.test.tsx +52 -0
- package/src/build.tsx +2 -1
- package/src/cli.tsx +80 -39
- package/src/compile.tsx +24 -6
- package/src/components/actions.tsx +94 -32
- package/src/components/detail.tsx +4 -0
- package/src/components/dropdown.tsx +47 -14
- package/src/components/extension-preferences.tsx +44 -16
- package/src/components/form/checkbox.tsx +12 -6
- package/src/components/form/date-picker.tsx +12 -6
- package/src/components/form/description.tsx +7 -2
- package/src/components/form/dropdown.tsx +131 -119
- package/src/components/form/file-autocomplete.tsx +90 -108
- package/src/components/form/file-picker.tsx +54 -43
- package/src/components/form/form-end.tsx +23 -2
- package/src/components/form/index.tsx +152 -34
- package/src/components/form/password-field.tsx +12 -6
- package/src/components/form/text-area.tsx +13 -6
- package/src/components/form/text-field.tsx +13 -6
- package/src/components/form/types.tsx +6 -0
- package/src/components/form/with-left-border.tsx +41 -8
- package/src/components/icon.tsx +27 -8
- package/src/components/list.tsx +193 -74
- package/src/components/loading-bar.tsx +3 -2
- package/src/components/loading-text.tsx +79 -0
- package/src/descendants.tsx +1 -0
- package/src/examples/file-autocomplete.vitest.tsx +130 -125
- package/src/examples/form-basic.vitest.tsx +376 -176
- package/src/examples/form-dropdown.vitest.tsx +126 -126
- package/src/examples/form-scroll.tsx +2 -0
- package/src/examples/form-scroll.vitest.tsx +58 -58
- package/src/examples/form-tagpicker.vitest.tsx +99 -99
- package/src/examples/internal/descendants-filtering.tsx +1 -0
- package/src/examples/internal/descendants.tsx +1 -0
- package/src/examples/internal/rhf-custom-ref.tsx +2 -0
- package/src/examples/internal/scrollbox-demo.tsx +3 -27
- package/src/examples/internal/scrollbox-with-descendants.tsx +4 -7
- package/src/examples/internal/simple-scrollbox.vitest.tsx +7 -5
- package/src/examples/list-detail-metadata.tsx +49 -0
- package/src/examples/list-detail-metadata.vitest.tsx +88 -0
- package/src/examples/list-dropdown-default.vitest.tsx +51 -51
- package/src/examples/list-fetch-data.vitest.tsx +4 -4
- package/src/examples/list-scrollbox.vitest.tsx +73 -14
- package/src/examples/list-with-detail-long.tsx +70 -0
- package/src/examples/list-with-detail.vitest.tsx +198 -92
- package/src/examples/list-with-dropdown.vitest.tsx +53 -53
- package/src/examples/list-with-sections.tsx +1 -0
- package/src/examples/list-with-sections.vitest.tsx +213 -89
- package/src/examples/list-with-toast.vitest.tsx +4 -4
- package/src/examples/simple-file-picker.vitest.tsx +61 -471
- package/src/examples/simple-grid.vitest.tsx +238 -233
- package/src/examples/simple-navigation.tsx +15 -7
- package/src/examples/simple-navigation.vitest.tsx +121 -210
- package/src/examples/store.vitest.tsx +1 -1
- package/src/examples/swift-extension.vitest.tsx +148 -0
- package/src/examples/synonyms.vitest.tsx +159 -0
- package/src/extensions/dev.tsx +74 -7
- package/src/extensions/dev.vitest.tsx +97 -31
- package/src/extensions/home.tsx +6 -0
- package/src/index.tsx +3 -0
- package/src/internal/dialog.tsx +43 -30
- package/src/internal/navigation.tsx +3 -1
- package/src/internal/offscreen.tsx +15 -0
- package/src/internal/providers.tsx +4 -2
- package/src/internal/scrollbox.tsx +4 -8
- package/src/keyboard.test.tsx +69 -0
- package/src/state.tsx +7 -0
- package/src/swift-loader.tsx +239 -0
- package/src/swift-runtime.tsx +36 -0
- package/src/utils/file-system.ts +61 -0
- package/src/utils/run-command.tsx +75 -6
|
@@ -0,0 +1,718 @@
|
|
|
1
|
+
import { test, expect, afterEach, beforeEach } from 'vitest';
|
|
2
|
+
import { launchTerminal } from 'tuistory/src';
|
|
3
|
+
let session;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
session = await launchTerminal({
|
|
6
|
+
command: 'bun',
|
|
7
|
+
args: ['src/examples/simple-navigation.tsx'],
|
|
8
|
+
cols: 70,
|
|
9
|
+
rows: 25,
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
afterEach(() => {
|
|
13
|
+
session?.close();
|
|
14
|
+
});
|
|
15
|
+
test('navigation between main and detail views', async () => {
|
|
16
|
+
await session.text({
|
|
17
|
+
waitFor: (text) => {
|
|
18
|
+
// wait for main view to show up
|
|
19
|
+
return /Navigation Example/i.test(text);
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
// Small delay to ensure all items are rendered
|
|
23
|
+
await session.waitIdle();
|
|
24
|
+
const initialSnapshot = await session.text();
|
|
25
|
+
expect(initialSnapshot).toMatchInlineSnapshot(`
|
|
26
|
+
"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
Navigation Example ─────────────────────────────────────────────
|
|
30
|
+
|
|
31
|
+
Main view
|
|
32
|
+
|
|
33
|
+
Items
|
|
34
|
+
›First Item Navigate to first detail
|
|
35
|
+
Second Item Navigate to second detail
|
|
36
|
+
Third Item Navigate to third detail
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
↵ select ↑↓ navigate ^k actions"
|
|
50
|
+
`);
|
|
51
|
+
// Navigate to second item
|
|
52
|
+
await session.press('down');
|
|
53
|
+
const afterDownSnapshot = await session.text();
|
|
54
|
+
expect(afterDownSnapshot).toMatchInlineSnapshot(`
|
|
55
|
+
"
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
Navigation Example ─────────────────────────────────────────────
|
|
59
|
+
|
|
60
|
+
Main view
|
|
61
|
+
|
|
62
|
+
Items
|
|
63
|
+
First Item Navigate to first detail
|
|
64
|
+
›Second Item Navigate to second detail
|
|
65
|
+
Third Item Navigate to third detail
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
↵ select ↑↓ navigate ^k actions"
|
|
79
|
+
`);
|
|
80
|
+
// Press Enter to open actions panel
|
|
81
|
+
await session.press('enter');
|
|
82
|
+
const actionsOpenSnapshot = await session.text();
|
|
83
|
+
expect(actionsOpenSnapshot).toMatchInlineSnapshot(`
|
|
84
|
+
"
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
Navigation Example ─────────────────────────────────────────────
|
|
88
|
+
|
|
89
|
+
Main view
|
|
90
|
+
|
|
91
|
+
Items
|
|
92
|
+
┃ ┃
|
|
93
|
+
┃ esc ┃
|
|
94
|
+
┃ ┃
|
|
95
|
+
┃ Search actions... ┃
|
|
96
|
+
┃ ┃
|
|
97
|
+
┃ ›Open Details ┃
|
|
98
|
+
┃ Copy Title ┃
|
|
99
|
+
┃ ┃
|
|
100
|
+
┃ ┃
|
|
101
|
+
┃ ┃
|
|
102
|
+
┃ ┃
|
|
103
|
+
┃ ┃
|
|
104
|
+
┃ ┃
|
|
105
|
+
┃ ┃
|
|
106
|
+
┃ ┃
|
|
107
|
+
┃ ┃
|
|
108
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
109
|
+
┃ ┃"
|
|
110
|
+
`);
|
|
111
|
+
// Press Enter again to select "Open Details" action
|
|
112
|
+
await session.press('enter');
|
|
113
|
+
const detailViewSnapshot = await session.text({
|
|
114
|
+
waitFor: (text) => {
|
|
115
|
+
// wait for detail view to show up
|
|
116
|
+
return /Detail: Second Item/i.test(text);
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
expect(detailViewSnapshot).toMatchInlineSnapshot(`
|
|
120
|
+
"
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
Detail: Second Item ────────────────────────────────────────────
|
|
124
|
+
|
|
125
|
+
Detail view - Press ESC to go back
|
|
126
|
+
|
|
127
|
+
Details
|
|
128
|
+
›This is the detail view for Second Item Press Enter to go back
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
↵ select ↑↓ navigate ^k actions"
|
|
144
|
+
`);
|
|
145
|
+
// Press ESC to go back to main view
|
|
146
|
+
await session.press('esc');
|
|
147
|
+
const backToMainSnapshot = await session.text({
|
|
148
|
+
waitFor: (text) => {
|
|
149
|
+
// wait for main view to show up again
|
|
150
|
+
return /Navigation Example/i.test(text);
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
expect(backToMainSnapshot).toMatchInlineSnapshot(`
|
|
154
|
+
"
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
Navigation Example ─────────────────────────────────────────────
|
|
158
|
+
|
|
159
|
+
Main view
|
|
160
|
+
|
|
161
|
+
Items
|
|
162
|
+
›First Item Navigate to first detail
|
|
163
|
+
Second Item Navigate to second detail
|
|
164
|
+
Third Item Navigate to third detail
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
↵ select ↑↓ navigate ^k actions"
|
|
178
|
+
`);
|
|
179
|
+
// Navigate down to third item (we're back at first item after ESC)
|
|
180
|
+
await session.press('down');
|
|
181
|
+
await session.press('down');
|
|
182
|
+
const thirdItemSnapshot = await session.text();
|
|
183
|
+
expect(thirdItemSnapshot).toMatchInlineSnapshot(`
|
|
184
|
+
"
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
Navigation Example ─────────────────────────────────────────────
|
|
188
|
+
|
|
189
|
+
Main view
|
|
190
|
+
|
|
191
|
+
Items
|
|
192
|
+
First Item Navigate to first detail
|
|
193
|
+
Second Item Navigate to second detail
|
|
194
|
+
›Third Item Navigate to third detail
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
↵ select ↑↓ navigate ^k actions"
|
|
208
|
+
`);
|
|
209
|
+
// Open action panel for third item
|
|
210
|
+
await session.press('enter');
|
|
211
|
+
const thirdActionsSnapshot = await session.text();
|
|
212
|
+
expect(thirdActionsSnapshot).toMatchInlineSnapshot(`
|
|
213
|
+
"
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
Navigation Example ─────────────────────────────────────────────
|
|
217
|
+
|
|
218
|
+
Main view
|
|
219
|
+
|
|
220
|
+
Items
|
|
221
|
+
┃ ┃
|
|
222
|
+
┃ esc ┃
|
|
223
|
+
┃ ┃
|
|
224
|
+
┃ Search actions... ┃
|
|
225
|
+
┃ ┃
|
|
226
|
+
┃ ›Open Details ┃
|
|
227
|
+
┃ Copy Title ┃
|
|
228
|
+
┃ ┃
|
|
229
|
+
┃ ┃
|
|
230
|
+
┃ ┃
|
|
231
|
+
┃ ┃
|
|
232
|
+
┃ ┃
|
|
233
|
+
┃ ┃
|
|
234
|
+
┃ ┃
|
|
235
|
+
┃ ┃
|
|
236
|
+
┃ ┃
|
|
237
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
238
|
+
┃ ┃"
|
|
239
|
+
`);
|
|
240
|
+
// Navigate to detail
|
|
241
|
+
await session.press('enter');
|
|
242
|
+
const thirdDetailSnapshot = await session.text({
|
|
243
|
+
waitFor: (text) => {
|
|
244
|
+
return /Detail: Third Item/i.test(text);
|
|
245
|
+
},
|
|
246
|
+
});
|
|
247
|
+
expect(thirdDetailSnapshot).toMatchInlineSnapshot(`
|
|
248
|
+
"
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
Detail: Third Item ─────────────────────────────────────────────
|
|
252
|
+
|
|
253
|
+
Detail view - Press ESC to go back
|
|
254
|
+
|
|
255
|
+
Details
|
|
256
|
+
›This is the detail view for Third Item Press Enter to go back o
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
↵ select ↑↓ navigate ^k actions"
|
|
272
|
+
`);
|
|
273
|
+
// Use Enter to open actions and go back
|
|
274
|
+
await session.press('enter');
|
|
275
|
+
const thirdDetailActionsSnapshot = await session.text();
|
|
276
|
+
expect(thirdDetailActionsSnapshot).toMatchInlineSnapshot(`
|
|
277
|
+
"
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
Detail: Third Item ─────────────────────────────────────────────
|
|
281
|
+
|
|
282
|
+
Detail view - Press ESC to go back
|
|
283
|
+
|
|
284
|
+
Details
|
|
285
|
+
┃ ┃
|
|
286
|
+
┃ esc ┃
|
|
287
|
+
┃ ┃
|
|
288
|
+
┃ Search actions... ┃
|
|
289
|
+
┃ ┃
|
|
290
|
+
┃ ›Go Back ┃
|
|
291
|
+
┃ Copy Title ┃
|
|
292
|
+
┃ ┃
|
|
293
|
+
┃ ┃
|
|
294
|
+
┃ ┃
|
|
295
|
+
┃ ┃
|
|
296
|
+
┃ ┃
|
|
297
|
+
┃ ┃
|
|
298
|
+
┃ ┃
|
|
299
|
+
┃ ┃
|
|
300
|
+
┃ ┃
|
|
301
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
302
|
+
┃ ┃"
|
|
303
|
+
`);
|
|
304
|
+
// Select "Go Back" action
|
|
305
|
+
await session.press('enter');
|
|
306
|
+
const backFromThirdSnapshot = await session.text({
|
|
307
|
+
waitFor: (text) => {
|
|
308
|
+
return /Navigation Example/i.test(text);
|
|
309
|
+
},
|
|
310
|
+
});
|
|
311
|
+
expect(backFromThirdSnapshot).toMatchInlineSnapshot(`
|
|
312
|
+
"
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
Navigation Example ─────────────────────────────────────────────
|
|
316
|
+
|
|
317
|
+
Main view
|
|
318
|
+
|
|
319
|
+
Items
|
|
320
|
+
›First Item Navigate to first detail
|
|
321
|
+
Second Item Navigate to second detail
|
|
322
|
+
Third Item Navigate to third detail
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
↵ select ↑↓ navigate ^k actions"
|
|
336
|
+
`);
|
|
337
|
+
}, 15000);
|
|
338
|
+
test('navigation with actions panel', async () => {
|
|
339
|
+
await session.text({
|
|
340
|
+
waitFor: (text) => {
|
|
341
|
+
// wait for main view to show up
|
|
342
|
+
return /Navigation Example/i.test(text);
|
|
343
|
+
},
|
|
344
|
+
});
|
|
345
|
+
// Open actions panel with ctrl+k
|
|
346
|
+
await session.press(['ctrl', 'k']);
|
|
347
|
+
const actionsOpenSnapshot = await session.text();
|
|
348
|
+
expect(actionsOpenSnapshot).toMatchInlineSnapshot(`
|
|
349
|
+
"
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
Navigation Example ─────────────────────────────────────────────
|
|
353
|
+
|
|
354
|
+
Main view
|
|
355
|
+
|
|
356
|
+
Items
|
|
357
|
+
┃ ┃
|
|
358
|
+
┃ esc ┃
|
|
359
|
+
┃ ┃
|
|
360
|
+
┃ Search actions... ┃
|
|
361
|
+
┃ ┃
|
|
362
|
+
┃ ›Open Details ┃
|
|
363
|
+
┃ Copy Title ┃
|
|
364
|
+
┃ ┃
|
|
365
|
+
┃ ┃
|
|
366
|
+
┃ ┃
|
|
367
|
+
┃ ┃
|
|
368
|
+
┃ ┃
|
|
369
|
+
┃ ┃
|
|
370
|
+
┃ ┃
|
|
371
|
+
┃ ┃
|
|
372
|
+
┃ ┃
|
|
373
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
374
|
+
┃ ┃"
|
|
375
|
+
`);
|
|
376
|
+
// Navigate down in actions panel
|
|
377
|
+
await session.press('down');
|
|
378
|
+
const secondActionSnapshot = await session.text();
|
|
379
|
+
expect(secondActionSnapshot).toMatchInlineSnapshot(`
|
|
380
|
+
"
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
Navigation Example ─────────────────────────────────────────────
|
|
384
|
+
|
|
385
|
+
Main view
|
|
386
|
+
|
|
387
|
+
Items
|
|
388
|
+
┃ ┃
|
|
389
|
+
┃ esc ┃
|
|
390
|
+
┃ ┃
|
|
391
|
+
┃ Search actions... ┃
|
|
392
|
+
┃ ┃
|
|
393
|
+
┃ Open Details ┃
|
|
394
|
+
┃ ›Copy Title ┃
|
|
395
|
+
┃ ┃
|
|
396
|
+
┃ ┃
|
|
397
|
+
┃ ┃
|
|
398
|
+
┃ ┃
|
|
399
|
+
┃ ┃
|
|
400
|
+
┃ ┃
|
|
401
|
+
┃ ┃
|
|
402
|
+
┃ ┃
|
|
403
|
+
┃ ┃
|
|
404
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
405
|
+
┃ ┃"
|
|
406
|
+
`);
|
|
407
|
+
// Select the Copy Title action
|
|
408
|
+
await session.press('enter');
|
|
409
|
+
const afterCopySnapshot = await session.text();
|
|
410
|
+
expect(afterCopySnapshot).toMatchInlineSnapshot(`
|
|
411
|
+
"
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
Navigation Example ─────────────────────────────────────────────
|
|
415
|
+
|
|
416
|
+
Main view
|
|
417
|
+
|
|
418
|
+
Items
|
|
419
|
+
›First Item Navigate to first detail
|
|
420
|
+
Second Item Navigate to second detail
|
|
421
|
+
Third Item Navigate to third detail
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
↵ select ↑↓ ┌────────────────────────────────────┐
|
|
435
|
+
│ ✓ Copied to Clipboard - First Item │
|
|
436
|
+
└────────────────────────────────────┘"
|
|
437
|
+
`);
|
|
438
|
+
// Navigate to second item and open its detail
|
|
439
|
+
await session.press('down');
|
|
440
|
+
await session.press('enter');
|
|
441
|
+
await session.press('enter');
|
|
442
|
+
const secondDetailSnapshot = await session.text({
|
|
443
|
+
waitFor: (text) => {
|
|
444
|
+
return /Detail: Second Item/i.test(text);
|
|
445
|
+
},
|
|
446
|
+
});
|
|
447
|
+
expect(secondDetailSnapshot).toMatchInlineSnapshot(`
|
|
448
|
+
"
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
Detail: Second Item ────────────────────────────────────────────
|
|
452
|
+
|
|
453
|
+
Detail view - Press ESC to go back
|
|
454
|
+
|
|
455
|
+
Details
|
|
456
|
+
›This is the detail view for Second Item Press Enter to go back
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
↵ select ↑↓ ┌────────────────────────────────────┐
|
|
472
|
+
│ ✓ Copied to Clipboard - First Item │
|
|
473
|
+
└────────────────────────────────────┘"
|
|
474
|
+
`);
|
|
475
|
+
// Open actions panel in detail view
|
|
476
|
+
await session.press(['ctrl', 'k']);
|
|
477
|
+
const detailActionsSnapshot = await session.text();
|
|
478
|
+
expect(detailActionsSnapshot).toMatchInlineSnapshot(`
|
|
479
|
+
"
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
Detail: Second Item ────────────────────────────────────────────
|
|
483
|
+
|
|
484
|
+
Detail view - Press ESC to go back
|
|
485
|
+
|
|
486
|
+
Details
|
|
487
|
+
┃ ┃
|
|
488
|
+
┃ esc ┃
|
|
489
|
+
┃ ┃
|
|
490
|
+
┃ Search actions... ┃
|
|
491
|
+
┃ ┃
|
|
492
|
+
┃ ›Go Back ┃
|
|
493
|
+
┃ Copy Title ┃
|
|
494
|
+
┃ ┃
|
|
495
|
+
┃ ┃
|
|
496
|
+
┃ ┃
|
|
497
|
+
┃ ┃
|
|
498
|
+
┃ ┃
|
|
499
|
+
┃ ┃
|
|
500
|
+
┃ ┃
|
|
501
|
+
┃ ┃
|
|
502
|
+
┃ ┃
|
|
503
|
+
┃ ↵ select ↑↓ navigate ┃
|
|
504
|
+
┃ ┃"
|
|
505
|
+
`);
|
|
506
|
+
// Select Go Back action
|
|
507
|
+
await session.press('enter');
|
|
508
|
+
const backViaActionSnapshot = await session.text({
|
|
509
|
+
waitFor: (text) => {
|
|
510
|
+
return /Navigation Example/i.test(text);
|
|
511
|
+
},
|
|
512
|
+
});
|
|
513
|
+
expect(backViaActionSnapshot).toMatchInlineSnapshot(`
|
|
514
|
+
"
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
Navigation Example ─────────────────────────────────────────────
|
|
518
|
+
|
|
519
|
+
Main view
|
|
520
|
+
|
|
521
|
+
Items
|
|
522
|
+
›First Item Navigate to first detail
|
|
523
|
+
Second Item Navigate to second detail
|
|
524
|
+
Third Item Navigate to third detail
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
↵ select ↑↓ ┌────────────────────────────────────┐
|
|
538
|
+
│ ✓ Copied to Clipboard - First Item │
|
|
539
|
+
└────────────────────────────────────┘"
|
|
540
|
+
`);
|
|
541
|
+
}, 15000);
|
|
542
|
+
test('search functionality in main and detail views', async () => {
|
|
543
|
+
await session.text({
|
|
544
|
+
waitFor: (text) => {
|
|
545
|
+
// wait for main view to show up
|
|
546
|
+
return /Main view/i.test(text);
|
|
547
|
+
},
|
|
548
|
+
});
|
|
549
|
+
// Type in search bar
|
|
550
|
+
await session.type('second');
|
|
551
|
+
const searchMainSnapshot = await session.text({
|
|
552
|
+
waitFor: (text) => {
|
|
553
|
+
return /second/i.test(text);
|
|
554
|
+
},
|
|
555
|
+
});
|
|
556
|
+
expect(searchMainSnapshot).toMatchInlineSnapshot(`
|
|
557
|
+
"
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
Navigation Example ─────────────────────────────────────────────
|
|
561
|
+
|
|
562
|
+
second
|
|
563
|
+
|
|
564
|
+
Second Item Navigate to second detail
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
↵ select ↑↓ navigate ^k actions"
|
|
581
|
+
`);
|
|
582
|
+
// Clear search
|
|
583
|
+
await session.press('backspace');
|
|
584
|
+
await session.press('backspace');
|
|
585
|
+
await session.press('backspace');
|
|
586
|
+
await session.press('backspace');
|
|
587
|
+
await session.press('backspace');
|
|
588
|
+
await session.press('backspace');
|
|
589
|
+
const clearedSearchSnapshot = await session.text();
|
|
590
|
+
expect(clearedSearchSnapshot).toMatchInlineSnapshot(`
|
|
591
|
+
"
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
Navigation Example ─────────────────────────────────────────────
|
|
595
|
+
|
|
596
|
+
Main view
|
|
597
|
+
|
|
598
|
+
Items
|
|
599
|
+
›First Item Navigate to first detail
|
|
600
|
+
Second Item Navigate to second detail
|
|
601
|
+
Third Item Navigate to third detail
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
↵ select ↑↓ navigate ^k actions"
|
|
615
|
+
`);
|
|
616
|
+
// Open actions for first item
|
|
617
|
+
await session.press('enter');
|
|
618
|
+
// Navigate to first item detail
|
|
619
|
+
await session.press('enter');
|
|
620
|
+
const firstDetailSnapshot = await session.text({
|
|
621
|
+
waitFor: (text) => {
|
|
622
|
+
return /Detail: First Item/i.test(text);
|
|
623
|
+
},
|
|
624
|
+
});
|
|
625
|
+
expect(firstDetailSnapshot).toMatchInlineSnapshot(`
|
|
626
|
+
"
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
Detail: First Item ─────────────────────────────────────────────
|
|
630
|
+
|
|
631
|
+
Detail view - Press ESC to go back
|
|
632
|
+
|
|
633
|
+
Details
|
|
634
|
+
›This is the detail view for First Item Press Enter to go back o
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
↵ select ↑↓ navigate ^k actions"
|
|
650
|
+
`);
|
|
651
|
+
// Type in detail view search bar
|
|
652
|
+
await session.type('test');
|
|
653
|
+
const searchDetailSnapshot = await session.text({
|
|
654
|
+
waitFor: (text) => {
|
|
655
|
+
return /test/i.test(text);
|
|
656
|
+
},
|
|
657
|
+
});
|
|
658
|
+
expect(searchDetailSnapshot).toMatchInlineSnapshot(`
|
|
659
|
+
"
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
Detail: First Item ─────────────────────────────────────────────
|
|
663
|
+
|
|
664
|
+
test
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
↵ select ↑↓ navigate ^k actions"
|
|
683
|
+
`);
|
|
684
|
+
// Press ESC to go back
|
|
685
|
+
await session.press('esc');
|
|
686
|
+
const finalMainSnapshot = await session.text({
|
|
687
|
+
waitFor: (text) => {
|
|
688
|
+
return /Navigation Example/i.test(text);
|
|
689
|
+
},
|
|
690
|
+
});
|
|
691
|
+
expect(finalMainSnapshot).toMatchInlineSnapshot(`
|
|
692
|
+
"
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
Navigation Example ─────────────────────────────────────────────
|
|
696
|
+
|
|
697
|
+
Main view
|
|
698
|
+
|
|
699
|
+
Items
|
|
700
|
+
›First Item Navigate to first detail
|
|
701
|
+
Second Item Navigate to second detail
|
|
702
|
+
Third Item Navigate to third detail
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
↵ select ↑↓ navigate ^k actions"
|
|
716
|
+
`);
|
|
717
|
+
}, 10000);
|
|
718
|
+
//# sourceMappingURL=simple-navigation.vitest.js.map
|