├── .gitignore ├── .gitmodules ├── .npmrc ├── README.md ├── package.json ├── packages ├── dev-scripts │ ├── bin │ │ ├── build.sh │ │ ├── gitclean.sh │ │ ├── make_dist.sh │ │ └── util.sh │ ├── package.json │ └── scripts │ │ └── changelog.cjs ├── siesta-example-browser │ ├── .gitignore │ ├── LICENSE.md │ ├── README.md │ ├── index.ts │ ├── package-lock.json │ ├── package.json │ ├── src │ │ └── module.ts │ ├── tests │ │ ├── index.ts │ │ └── summer.t.ts │ ├── tsconfig.json │ └── tslint.json ├── siesta-example-deno │ ├── .gitignore │ ├── LICENSE.md │ ├── README.md │ ├── index.ts │ ├── package-lock.json │ ├── package.json │ ├── src │ │ └── module.ts │ ├── tests │ │ ├── index.ts │ │ └── summer.t.ts │ ├── tsconfig.json │ └── tslint.json ├── siesta-example-isomorphic │ ├── .gitignore │ ├── LICENSE.md │ ├── README.md │ ├── index.ts │ ├── package-lock.json │ ├── package.json │ ├── src │ │ └── module.ts │ ├── tests │ │ ├── index.ts │ │ └── summer.t.ts │ ├── tsconfig.json │ └── tslint.json ├── siesta-example-nodejs │ ├── .gitignore │ ├── LICENSE.md │ ├── README.md │ ├── index.ts │ ├── package-lock.json │ ├── package.json │ ├── src │ │ └── module.ts │ ├── tests │ │ ├── index.ts │ │ └── summer.t.ts │ ├── tsconfig.json │ └── tslint.json └── siesta │ ├── .gitignore │ ├── .npmignore │ ├── CHANGELOG.md │ ├── LICENSE.md │ ├── README.md │ ├── bin │ ├── siesta.ts │ └── siesta_deno.ts │ ├── browser.ts │ ├── deno.ts │ ├── examples │ ├── browser │ │ ├── README.md │ │ ├── import_map.importmap │ │ ├── package.json │ │ ├── src │ │ │ └── module.ts │ │ ├── tests │ │ │ ├── basic │ │ │ │ └── basic_test.t.ts │ │ │ ├── index.ts │ │ │ └── module │ │ │ │ ├── delay.t.ts │ │ │ │ ├── summer.t.ts │ │ │ │ └── zoomer.t.ts │ │ └── tsconfig.json │ ├── deno │ │ ├── README.md │ │ ├── siesta_deno.ts │ │ ├── src │ │ │ └── module.ts │ │ └── tests │ │ │ ├── basic │ │ │ └── basic_test.t.ts │ │ │ ├── index.ts │ │ │ └── module │ │ │ ├── delay.t.ts │ │ │ ├── summer.t.ts │ │ │ └── zoomer.t.ts │ ├── isomorphic │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ └── module.ts │ │ ├── tests │ │ │ ├── basic │ │ │ │ └── basic_test.t.ts │ │ │ ├── index.ts │ │ │ └── module │ │ │ │ ├── delay.t.ts │ │ │ │ ├── summer.t.ts │ │ │ │ └── zoomer.t.ts │ │ └── tsconfig.json │ ├── nodejs │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ └── module.ts │ │ ├── tests │ │ │ ├── basic │ │ │ │ └── basic_test.t.ts │ │ │ ├── index.ts │ │ │ └── module │ │ │ │ ├── delay.t.ts │ │ │ │ ├── summer.t.ts │ │ │ │ └── zoomer.t.ts │ │ └── tsconfig.json │ └── theming │ │ ├── index.ts │ │ └── theme │ │ ├── equality.t.ts │ │ ├── exception.t.ts │ │ ├── general.t.ts │ │ ├── likeness.t.ts │ │ └── log_messages.t.ts │ ├── htmlreport.rollup.config.js │ ├── index.ts │ ├── licenses.txt │ ├── misc │ ├── client.js │ ├── client.ts │ ├── iframe.html │ ├── index.html │ ├── playground │ │ ├── diff │ │ │ ├── diff-text.tsx │ │ │ ├── diff.html │ │ │ └── diff.ts │ │ └── serial │ │ │ ├── serial-text.tsx │ │ │ ├── serial.html │ │ │ └── serial.ts │ ├── server.js │ ├── server.ts │ ├── test.html │ ├── test1.js │ ├── test1.ts │ ├── test2.js │ ├── test2.ts │ └── web-dev-server.config.mjs │ ├── nodejs.ts │ ├── package.json │ ├── react.ts │ ├── resources │ ├── blank.html │ ├── cert │ │ ├── ca-certificate.pem │ │ ├── ca-key.pem │ │ ├── certificate.pem │ │ ├── client-certificate.pem │ │ ├── client-key.pem │ │ └── key.pem │ ├── dashboard │ │ ├── index.html │ │ └── index.ts │ ├── docs_src │ │ ├── README.md │ │ └── styling.css │ ├── html_report │ │ ├── index.html │ │ └── index.ts │ ├── images │ │ ├── readme_header.png │ │ └── readme_header.svg │ └── styling │ │ ├── browser │ │ ├── css │ │ │ ├── material_icons.scss │ │ │ ├── reset.scss │ │ │ └── styling.scss │ │ ├── fonts │ │ │ ├── fontawesome5 │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── attribution.js │ │ │ │ ├── css │ │ │ │ │ ├── all.css │ │ │ │ │ ├── brands.css │ │ │ │ │ ├── fontawesome.css │ │ │ │ │ ├── regular.css │ │ │ │ │ ├── solid.css │ │ │ │ │ ├── svg-with-js.css │ │ │ │ │ └── v4-shims.css │ │ │ │ └── webfonts │ │ │ │ │ ├── fa-brands-400.eot │ │ │ │ │ ├── fa-brands-400.svg │ │ │ │ │ ├── fa-brands-400.ttf │ │ │ │ │ ├── fa-brands-400.woff │ │ │ │ │ ├── fa-brands-400.woff2 │ │ │ │ │ ├── fa-regular-400.eot │ │ │ │ │ ├── fa-regular-400.svg │ │ │ │ │ ├── fa-regular-400.ttf │ │ │ │ │ ├── fa-regular-400.woff │ │ │ │ │ ├── fa-regular-400.woff2 │ │ │ │ │ ├── fa-solid-900.eot │ │ │ │ │ ├── fa-solid-900.svg │ │ │ │ │ ├── fa-solid-900.ttf │ │ │ │ │ ├── fa-solid-900.woff │ │ │ │ │ └── fa-solid-900.woff2 │ │ │ ├── jetbrains_mono │ │ │ │ ├── JetBrainsMono-Bold.woff2 │ │ │ │ ├── JetBrainsMono-BoldItalic.woff2 │ │ │ │ ├── JetBrainsMono-ExtraBold.woff2 │ │ │ │ ├── JetBrainsMono-ExtraBoldItalic.woff2 │ │ │ │ ├── JetBrainsMono-ExtraLight.woff2 │ │ │ │ ├── JetBrainsMono-ExtraLightItalic.woff2 │ │ │ │ ├── JetBrainsMono-Italic.woff2 │ │ │ │ ├── JetBrainsMono-Light.woff2 │ │ │ │ ├── JetBrainsMono-LightItalic.woff2 │ │ │ │ ├── JetBrainsMono-Medium.woff2 │ │ │ │ ├── JetBrainsMono-MediumItalic.woff2 │ │ │ │ ├── JetBrainsMono-Regular.woff2 │ │ │ │ ├── JetBrainsMono-Thin.woff2 │ │ │ │ └── JetBrainsMono-ThinItalic.woff2 │ │ │ └── material_icons │ │ │ │ └── material_icons_outlined.woff2 │ │ └── images │ │ │ ├── domcontainer-bg.png │ │ │ ├── logo_on_transparent.svg │ │ │ ├── mouse-pointer-solid.svg │ │ │ └── siesta_logo_on_transparent.svg │ │ ├── common │ │ └── _colors.scss │ │ └── terminal │ │ ├── _styling.scss │ │ ├── theme_accessible.scss │ │ ├── theme_dark.scss │ │ ├── theme_light.scss │ │ └── theme_universal.scss │ ├── rollup.config.js │ ├── scripts │ ├── build.sh │ ├── build_docs.sh │ ├── build_sencha_tests.sh │ ├── bundle.sh │ ├── bundle_html_report.sh │ ├── changelog.cjs │ ├── compile_themes.ts │ ├── do_release.sh │ ├── make_dist.sh │ ├── publish.sh │ ├── publish_docs.sh │ ├── release.sh │ ├── run_tests.sh │ ├── tweak_dts.sh │ ├── util.sh │ └── web_install.ts │ ├── sencha.ts │ ├── src │ ├── Importer.ts │ ├── benchmark │ │ └── Benchmark.ts │ ├── chronograph-jsx │ │ ├── ChronoGraphJSX.ts │ │ ├── Component.ts │ │ └── ElementReactivity.ts │ ├── class │ │ ├── Base.ts │ │ └── Mixin.ts │ ├── compare_deep │ │ ├── DeepDiff.scss │ │ ├── DeepDiff.tsx │ │ ├── DeepDiffFuzzyMatcher.tsx │ │ ├── DeepDiffRendering.tsx │ │ ├── DeepDiffXmlRendererDifference.ts │ │ ├── JsonDeepDiffComponent.scss │ │ └── JsonDeepDiffComponent.tsx │ ├── context │ │ ├── ExecutionContext.ts │ │ ├── ExecutionContextBrowser.ts │ │ ├── ExecutionContextDeno.ts │ │ └── ExecutionContextNode.ts │ ├── environment │ │ └── Debug.ts │ ├── guides │ │ ├── auto_waiting │ │ │ ├── auto_waiting.md │ │ │ └── auto_waiting.ts │ │ ├── code_coverage │ │ │ ├── code_coverage.jpg │ │ │ ├── code_coverage.md │ │ │ └── code_coverage.ts │ │ ├── getting_started_browser │ │ │ ├── getting_started_browser.md │ │ │ ├── getting_started_browser.ts │ │ │ └── getting_started_browser_1.jpg │ │ ├── getting_started_deno │ │ │ ├── getting_started_deno.md │ │ │ ├── getting_started_deno.ts │ │ │ └── getting_started_deno_1.jpg │ │ ├── getting_started_nodejs │ │ │ ├── getting_started_nodejs.md │ │ │ ├── getting_started_nodejs.ts │ │ │ └── getting_started_nodejs_1.jpg │ │ ├── getting_started_sencha │ │ │ ├── getting_started_sencha.md │ │ │ ├── getting_started_sencha.ts │ │ │ └── getting_started_sencha_1.jpg │ │ ├── key_names │ │ │ ├── key_names.md │ │ │ └── key_names.ts │ │ ├── reports │ │ │ ├── reports.jpg │ │ │ ├── reports.md │ │ │ └── reports.ts │ │ ├── siesta_project │ │ │ ├── siesta_project.md │ │ │ └── siesta_project.ts │ │ ├── siesta_test_advanced │ │ │ ├── siesta_test_advanced.md │ │ │ └── siesta_test_advanced.ts │ │ └── siesta_test_basics │ │ │ ├── siesta_test_basics.md │ │ │ └── siesta_test_basics.ts │ ├── hook │ │ └── Hook.ts │ ├── iterator │ │ └── Iterator.ts │ ├── jsx │ │ ├── Colorer.ts │ │ ├── ColorerDeno.ts │ │ ├── ColorerNodejs.ts │ │ ├── ColorerNoop.ts │ │ ├── RenderBlock.ts │ │ ├── TextJSX.ts │ │ ├── Tree.ts │ │ ├── UL.ts │ │ ├── XmlElement.tsx │ │ └── XmlRenderer.ts │ ├── logger │ │ ├── Logger.ts │ │ ├── LoggerConsole.ts │ │ └── LoggerHookable.ts │ ├── rpc │ │ ├── media │ │ │ ├── Media.ts │ │ │ ├── MediaBrowserMessagePort.ts │ │ │ ├── MediaBrowserWebSocketChild.ts │ │ │ ├── MediaNodeIpc.ts │ │ │ ├── MediaNodeWebSocketParent.ts │ │ │ ├── MediaSameContext.ts │ │ │ ├── MediaSerializable.ts │ │ │ └── MediaWebWorker.ts │ │ ├── port │ │ │ ├── Port.ts │ │ │ ├── PortEvaluate.ts │ │ │ └── PortHandshake.ts │ │ └── server │ │ │ └── ServerNodeWebSocket.ts │ ├── serializable │ │ └── Serializable.ts │ ├── serializer │ │ ├── Serial.tsx │ │ ├── SerialComponent.scss │ │ ├── SerialComponent.tsx │ │ └── SerialRendering.tsx │ ├── siesta │ │ ├── common │ │ │ ├── Environment.ts │ │ │ ├── IsolationLevel.ts │ │ │ └── LUID.ts │ │ ├── context │ │ │ ├── Context.ts │ │ │ ├── ContextBrowser.ts │ │ │ ├── ContextBrowserIframe.ts │ │ │ ├── ContextDashboardIframe.ts │ │ │ ├── ContextDenoWorker.ts │ │ │ ├── ContextNodeChildProcess.ts │ │ │ ├── ContextPlaywright.ts │ │ │ ├── ContextPuppeteer.ts │ │ │ ├── ContextSameContext.ts │ │ │ └── context_provider │ │ │ │ ├── ContextProvider.ts │ │ │ │ ├── ContextProviderBrowserIframe.ts │ │ │ │ ├── ContextProviderDashboardIframe.ts │ │ │ │ ├── ContextProviderDenoWorker.ts │ │ │ │ ├── ContextProviderNodeChildProcess.ts │ │ │ │ ├── ContextProviderNodePlaywright.ts │ │ │ │ ├── ContextProviderNodePuppeteer.ts │ │ │ │ ├── ContextProviderSameContext.ts │ │ │ │ ├── ContextProviderTargetBrowser.ts │ │ │ │ └── deno_worker_seed.ts │ │ ├── launcher │ │ │ ├── DashboardConnector.ts │ │ │ ├── Dispatcher.ts │ │ │ ├── DispatcherNodejs.ts │ │ │ ├── Launcher.tsx │ │ │ ├── LauncherBrowser.ts │ │ │ ├── LauncherDeno.tsx │ │ │ ├── LauncherDescriptorNodejs.tsx │ │ │ ├── LauncherError.tsx │ │ │ ├── LauncherNodejs.tsx │ │ │ ├── LauncherTerminal.tsx │ │ │ ├── ProjectExtractor.ts │ │ │ ├── Queue.ts │ │ │ ├── TestLaunchResult.ts │ │ │ └── Types.ts │ │ ├── option │ │ │ └── Option.tsx │ │ ├── project │ │ │ ├── Project.ts │ │ │ ├── ProjectBrowser.tsx │ │ │ ├── ProjectDeno.ts │ │ │ ├── ProjectDescriptor.ts │ │ │ ├── ProjectDescriptorBrowser.ts │ │ │ ├── ProjectNodejs.ts │ │ │ └── ProjectTerminal.ts │ │ ├── react │ │ │ ├── ProjectDescriptorReact.ts │ │ │ ├── ProjectReact.ts │ │ │ ├── TestDescriptorReact.ts │ │ │ └── TestReact.tsx │ │ ├── reporter │ │ │ ├── ConsoleXmlRenderer.ts │ │ │ ├── Reporter.tsx │ │ │ ├── ReporterBrowser.ts │ │ │ ├── ReporterDeno.ts │ │ │ ├── ReporterDenoTerminal.tsx │ │ │ ├── ReporterNodejs.ts │ │ │ ├── ReporterNodejsTerminal.tsx │ │ │ ├── ReporterTerminal.tsx │ │ │ ├── Spinner.ts │ │ │ ├── Terminal.ts │ │ │ ├── TerminalDeno.ts │ │ │ ├── TerminalNodejs.ts │ │ │ └── styling │ │ │ │ ├── theme_accessible.ts │ │ │ │ ├── theme_dark.ts │ │ │ │ ├── theme_light.ts │ │ │ │ └── theme_universal.ts │ │ ├── runtime │ │ │ ├── Runtime.ts │ │ │ ├── RuntimeBrowser.ts │ │ │ ├── RuntimeDeno.ts │ │ │ └── RuntimeNodejs.ts │ │ ├── sencha │ │ │ ├── ProjectDescriptorSencha.ts │ │ │ ├── ProjectSencha.ts │ │ │ ├── TestDescriptorSencha.ts │ │ │ ├── TestSencha.tsx │ │ │ ├── TestSenchaPre.tsx │ │ │ └── assertion │ │ │ │ ├── AssertionComponent.tsx │ │ │ │ ├── AssertionFormField.tsx │ │ │ │ └── AssertionGrid.tsx │ │ ├── simulate │ │ │ ├── SimulatorKeyboard.ts │ │ │ ├── SimulatorMouse.ts │ │ │ ├── SimulatorPlaywright.ts │ │ │ ├── Types.ts │ │ │ └── UserAgent.tsx │ │ ├── test │ │ │ ├── Expectation.tsx │ │ │ ├── Spy.ts │ │ │ ├── Test.ts │ │ │ ├── TestBrowser.tsx │ │ │ ├── TestDeno.ts │ │ │ ├── TestDescriptor.ts │ │ │ ├── TestDescriptorBrowser.ts │ │ │ ├── TestDescriptorDeno.ts │ │ │ ├── TestDescriptorNodejs.ts │ │ │ ├── TestNodejs.ts │ │ │ ├── TestResult.tsx │ │ │ ├── TestResultReactive.tsx │ │ │ ├── assertion │ │ │ │ ├── AssertionAsync.tsx │ │ │ │ ├── AssertionCompare.tsx │ │ │ │ ├── AssertionElement.tsx │ │ │ │ ├── AssertionException.tsx │ │ │ │ ├── AssertionFunction.tsx │ │ │ │ ├── AssertionGeneral.tsx │ │ │ │ ├── AssertionObservable.tsx │ │ │ │ └── AssertionType.tsx │ │ │ ├── browser │ │ │ │ └── TextSelectionHelpers.ts │ │ │ ├── nodejs │ │ │ │ └── TestNodejs.ts │ │ │ └── port │ │ │ │ ├── LaunchTest.ts │ │ │ │ ├── TestLauncherBrowserChild.tsx │ │ │ │ ├── TestLauncherBrowserParent.tsx │ │ │ │ ├── TestLauncherChild.tsx │ │ │ │ ├── TestLauncherParent.tsx │ │ │ │ ├── TestReporterChild.ts │ │ │ │ └── TestReporterParent.ts │ │ └── ui │ │ │ ├── Dashboard.scss │ │ │ ├── Dashboard.tsx │ │ │ ├── DashboardCore.tsx │ │ │ ├── MouseCursorVisualizer.ts │ │ │ ├── ProjectPlanComponent.scss │ │ │ ├── ProjectPlanComponent.tsx │ │ │ ├── RippleEffectManager.scss │ │ │ ├── RippleEffectManager.ts │ │ │ ├── TestLaunchInfo.ts │ │ │ ├── components │ │ │ ├── ResizeObserverComponent.tsx │ │ │ ├── Splitter.scss │ │ │ ├── Splitter.tsx │ │ │ ├── TreeComponent.scss │ │ │ └── TreeComponent.tsx │ │ │ ├── html_report │ │ │ ├── HTMLReportDashboard.tsx │ │ │ └── HTMLReportLaunchInfoComponent.tsx │ │ │ └── test_result │ │ │ ├── GotExpectComponent.tsx │ │ │ ├── LaunchInfoComponent.scss │ │ │ ├── LaunchInfoComponent.tsx │ │ │ ├── LaunchInfoComponentCore.tsx │ │ │ ├── TestOverlay.scss │ │ │ ├── TestOverlay.tsx │ │ │ ├── TestResult.scss │ │ │ ├── TestResult.tsx │ │ │ ├── Translator.scss │ │ │ └── Translator.tsx │ ├── tree │ │ ├── TreeNode.ts │ │ └── TreeNodeMapped.ts │ ├── util │ │ ├── Helpers.ts │ │ ├── Path.ts │ │ ├── PromiseSync.ts │ │ ├── Queued.ts │ │ ├── Rect.ts │ │ ├── String.ts │ │ ├── TimeHelpers.ts │ │ ├── Typeguards.ts │ │ └── Uniqable.ts │ ├── util_browser │ │ ├── Coordinates.ts │ │ ├── Dom.ts │ │ ├── PlaywrightHelpers.ts │ │ ├── Scroll.ts │ │ ├── TextSelection.ts │ │ └── Typeguards.ts │ ├── util_deno │ │ └── TerminalDeno.ts │ └── util_nodejs │ │ ├── FileSystem.ts │ │ └── Terminal.ts │ ├── tests │ ├── compare_deep │ │ ├── deep_diff.t.ts │ │ ├── deep_diff_matchers.t.ts │ │ ├── deep_diff_rendering.t.ts │ │ └── deep_diff_rendering_max_width.t.ts │ ├── hook │ │ └── hook.t.ts │ ├── index.html │ ├── index.ts │ ├── jsx │ │ ├── tree.t.tsx │ │ ├── ul.t.tsx │ │ └── xml_element_streaming_rendering.t.tsx │ ├── options │ │ └── parse_options.t.ts │ ├── rpc │ │ ├── port.t.ts │ │ └── port_scoped.t.ts │ ├── serializer │ │ └── streaming_serializer_rendering.t.tsx │ ├── siesta │ │ ├── @helpers.ts │ │ ├── assertions │ │ │ ├── assertion_async.t.ts │ │ │ ├── assertion_compare.t.ts │ │ │ ├── assertion_exception.t.ts │ │ │ ├── assertion_function.t.ts │ │ │ ├── assertion_type.t.ts │ │ │ ├── expectation.t.ts │ │ │ └── silent.t.ts │ │ ├── before_after_each.t.ts │ │ ├── global_test.t.ts │ │ ├── snooze_tests.t.ts │ │ ├── test │ │ │ ├── exception_handling.t.ts │ │ │ ├── source_point.t.ts │ │ │ └── spies.t.ts │ │ ├── test_descriptor.t.ts │ │ └── todo_tests.t.ts │ ├── tree │ │ └── treenode.t.ts │ └── util │ │ ├── promise_sync.t.ts │ │ ├── queued.t.ts │ │ ├── rect.t.ts │ │ └── uniqable.t.ts │ ├── tests_browser │ ├── @helpers.ts │ ├── chronograph_jsx │ │ ├── component.t.tsx │ │ ├── plain_jsx.t.tsx │ │ └── web_component.t.tsx │ ├── compare_deep │ │ └── deep_diff.t.ts │ ├── index.html │ ├── index.ts │ ├── react │ │ └── query.t.ts │ ├── sencha │ │ ├── @my-app │ │ │ ├── .gitignore │ │ │ ├── Readme.md │ │ │ ├── app.js │ │ │ ├── app.json │ │ │ ├── app │ │ │ │ ├── desktop │ │ │ │ │ ├── overrides │ │ │ │ │ │ └── Readme.md │ │ │ │ │ ├── sass │ │ │ │ │ │ ├── src.scss │ │ │ │ │ │ └── var.scss │ │ │ │ │ └── src │ │ │ │ │ │ ├── Application.js │ │ │ │ │ │ ├── Application.scss │ │ │ │ │ │ ├── model │ │ │ │ │ │ └── Readme.md │ │ │ │ │ │ ├── store │ │ │ │ │ │ └── Readme.md │ │ │ │ │ │ ├── util │ │ │ │ │ │ └── Readme.md │ │ │ │ │ │ └── view │ │ │ │ │ │ ├── home │ │ │ │ │ │ ├── HomeView.js │ │ │ │ │ │ ├── HomeView.scss │ │ │ │ │ │ ├── HomeViewController.js │ │ │ │ │ │ └── HomeViewModel.js │ │ │ │ │ │ ├── main │ │ │ │ │ │ ├── MainView.js │ │ │ │ │ │ ├── MainView.scss │ │ │ │ │ │ ├── MainViewController.js │ │ │ │ │ │ ├── MainViewModel.js │ │ │ │ │ │ ├── center │ │ │ │ │ │ │ ├── CenterView.js │ │ │ │ │ │ │ └── CenterView.scss │ │ │ │ │ │ ├── detail │ │ │ │ │ │ │ ├── DetailView.js │ │ │ │ │ │ │ └── DetailView.scss │ │ │ │ │ │ ├── footer │ │ │ │ │ │ │ ├── FooterView.js │ │ │ │ │ │ │ └── FooterView.scss │ │ │ │ │ │ ├── header │ │ │ │ │ │ │ ├── HeaderView.js │ │ │ │ │ │ │ └── HeaderView.scss │ │ │ │ │ │ └── nav │ │ │ │ │ │ │ ├── NavView.js │ │ │ │ │ │ │ ├── NavView.scss │ │ │ │ │ │ │ ├── NavViewController.js │ │ │ │ │ │ │ ├── bottom │ │ │ │ │ │ │ ├── BottomView.js │ │ │ │ │ │ │ └── BottomView.scss │ │ │ │ │ │ │ ├── menu │ │ │ │ │ │ │ ├── MenuView.js │ │ │ │ │ │ │ └── MenuView.scss │ │ │ │ │ │ │ └── top │ │ │ │ │ │ │ ├── TopView.js │ │ │ │ │ │ │ └── TopView.scss │ │ │ │ │ │ └── personnel │ │ │ │ │ │ ├── PersonnelView.js │ │ │ │ │ │ ├── PersonnelView.scss │ │ │ │ │ │ ├── PersonnelViewController.js │ │ │ │ │ │ ├── PersonnelViewModel.js │ │ │ │ │ │ └── PersonnelViewStore.js │ │ │ │ └── shared │ │ │ │ │ ├── overrides │ │ │ │ │ └── Readme.md │ │ │ │ │ ├── sass │ │ │ │ │ ├── src.scss │ │ │ │ │ └── var.scss │ │ │ │ │ └── src │ │ │ │ │ ├── model │ │ │ │ │ └── Readme.md │ │ │ │ │ ├── store │ │ │ │ │ └── Readme.md │ │ │ │ │ ├── util │ │ │ │ │ └── Shared.js │ │ │ │ │ └── view │ │ │ │ │ └── Readme.md │ │ │ ├── build.xml │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── packages │ │ │ │ └── Readme.md │ │ │ ├── resources │ │ │ │ └── desktop │ │ │ │ │ ├── 5.jpg │ │ │ │ │ ├── Readme.md │ │ │ │ │ └── menu.json │ │ │ ├── webpack.config.js │ │ │ └── workspace.json │ │ ├── assertion │ │ │ ├── assertion_component.t.ts │ │ │ └── assertion_form_field.t.ts │ │ ├── cmd_app.t.ts │ │ ├── modern │ │ │ └── components │ │ │ │ └── interaction.t.ts │ │ ├── query.t.ts │ │ └── simulation │ │ │ ├── keyboard │ │ │ └── type.t.ts │ │ │ └── mouse │ │ │ └── click.t.ts │ ├── serializer │ │ └── serializer_xml.t.tsx │ ├── siesta │ │ ├── assertions │ │ │ ├── assertion_element.t.ts │ │ │ ├── assertion_observable.t.ts │ │ │ └── silent.t.ts │ │ └── test │ │ │ ├── page.html │ │ │ ├── pageUrl.t.ts │ │ │ ├── preload.t.ts │ │ │ ├── preload_file.css │ │ │ ├── preload_file.ts │ │ │ └── preload_file_module.ts │ ├── simulation │ │ ├── keyboard │ │ │ ├── backspace_delete.t.ts │ │ │ ├── caret_position.t.ts │ │ │ ├── change_event.t.ts │ │ │ ├── content_editable.t.ts │ │ │ ├── enter_in_form.t.ts │ │ │ ├── modifier_keys.t.ts │ │ │ ├── readonly.t.ts │ │ │ ├── tabbing.t.ts │ │ │ ├── text_selection.t.ts │ │ │ ├── type.t.ts │ │ │ ├── type_iframe.t.ts │ │ │ └── web_component.t.ts │ │ ├── mouse │ │ │ ├── click.t.ts │ │ │ ├── click_change_target.t.ts │ │ │ ├── click_iframe.t.ts │ │ │ ├── click_svg.t.ts │ │ │ ├── drag.t.ts │ │ │ ├── focus.t.ts │ │ │ ├── modifier_keys.t.ts │ │ │ ├── mouse_move.t.ts │ │ │ ├── mouse_over.t.ts │ │ │ ├── offset.t.ts │ │ │ ├── pointer_events.t.ts │ │ │ ├── scroll_into_view.t.ts │ │ │ ├── transformed_element.t.ts │ │ │ ├── wait_for_target.t.ts │ │ │ └── web_component.t.ts │ │ └── targeting │ │ │ ├── actionability_checks.t.ts │ │ │ └── query.t.ts │ └── util │ │ ├── coordinates │ │ ├── filter_path.t.ts │ │ └── offset.t.ts │ │ ├── dom │ │ └── element_from_point.t.ts │ │ └── scroll │ │ ├── scroll_element_into_view.t.ts │ │ └── scroll_element_into_view_2.t.ts │ ├── tests_deno │ ├── @sample_test_suites │ │ ├── browser │ │ │ ├── index.ts │ │ │ ├── test_1.t.ts │ │ │ └── test_2.t.ts │ │ ├── deno │ │ │ ├── index.ts │ │ │ ├── test_1.t.ts │ │ │ └── test_2.t.ts │ │ └── isomorphic │ │ │ ├── index.ts │ │ │ ├── test_1.t.ts │ │ │ └── test_2.t.ts │ ├── index.ts │ └── plan │ │ └── project_plan.t.ts │ ├── tests_nodejs │ ├── @sample_test_suites │ │ ├── browser │ │ │ ├── index.ts │ │ │ ├── test_1.t.ts │ │ │ └── test_2.t.ts │ │ ├── deno │ │ │ ├── index.ts │ │ │ ├── test_1.t.ts │ │ │ └── test_2.t.ts │ │ ├── isomorphic │ │ │ ├── index.ts │ │ │ ├── test_1.t.ts │ │ │ └── test_2.t.ts │ │ └── nodejs │ │ │ ├── index.ts │ │ │ ├── test_1.t.ts │ │ │ └── test_2.t.ts │ ├── @src │ │ └── suite_launch_helpers.ts │ ├── index.ts │ ├── jsx │ │ └── streaming_rendering.t.tsx │ ├── plan │ │ └── project_plan.t.ts │ ├── serializer │ │ └── serializer_xml.t.tsx │ └── suite_launching │ │ ├── suite_launching_browser.t.ts │ │ ├── suite_launching_deno.t.ts │ │ ├── suite_launching_isomorphic.t.ts │ │ └── suite_launching_nodejs.t.ts │ ├── tsconfig.json │ ├── tslint.json │ ├── web_modules │ ├── import-map.json │ ├── minimatch.d.ts │ ├── minimatch.js │ ├── sizzle_original.js │ └── sizzle_patched.js │ └── workspace ├── pnpm-lock.yaml ├── pnpm-workspace.yaml └── scripts ├── compile.sh ├── make_dist.sh └── sync_dist.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # IDE related files 2 | /.idea 3 | /.vscode 4 | 5 | # dependencies 6 | /node_modules 7 | 8 | # temporarily used for releases 9 | /packages/DIST 10 | /SIESTA_DIST 11 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "packages/chained-iterator"] 2 | path = packages/chained-iterator 3 | url = git@github.com:canonic-epicure/chained-iterator.git 4 | [submodule "packages/typescript-mixin-class"] 5 | path = packages/typescript-mixin-class 6 | url = git@github.com:canonic-epicure/typescript-mixin-class.git 7 | [submodule "packages/typescript-serializable-mixin"] 8 | path = packages/typescript-serializable-mixin 9 | url = git@github.com:canonic-epicure/typescript-serializable-mixin.git 10 | [submodule "packages/chronograph"] 11 | path = packages/chronograph 12 | url = git@github.com:bryntum/chronograph.git 13 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | link-workspace-packages=false 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ./packages/siesta/README.md -------------------------------------------------------------------------------- /packages/dev-scripts/bin/gitclean.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # exit if any of command has failed 4 | set -e 5 | 6 | DIR="$( cd "$( dirname "$0" )" && pwd )" 7 | 8 | git clean -f -x -d -e 'node_modules' -e '.idea' ./ 9 | -------------------------------------------------------------------------------- /packages/dev-scripts/bin/make_dist.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # exit if any of command has failed 4 | set -e 5 | 6 | DIR="$( cd "$( dirname "$0" )" && pwd )" 7 | . "$DIR"/util.sh 8 | 9 | ignore_changes="" 10 | name="DIST" 11 | 12 | while getopts "in:" opt; do 13 | case "$opt" in 14 | n) name="$OPTARG" 15 | ;; 16 | i) ignore_changes="true" 17 | ;; 18 | esac 19 | done 20 | 21 | if [[ -z $ignore_changes ]]; then 22 | exit_if_git_repo_has_changes "." 23 | fi 24 | 25 | #-------------------------------------------------------------- 26 | 27 | DIST="./$name" 28 | 29 | echo ">> Making clean checkout in $DIST" 30 | 31 | rm -rf "$DIST" 32 | 33 | git worktree prune 34 | 35 | git worktree add "$DIST" --no-checkout --detach 36 | 37 | current="$(pwd)" 38 | 39 | ( 40 | cd "$DIST" 41 | 42 | git checkout HEAD 43 | 44 | rm -rf "$DIST/.git" 45 | 46 | ln -s "$current/node_modules" "node_modules" 47 | ) 48 | 49 | -------------------------------------------------------------------------------- /packages/dev-scripts/bin/util.sh: -------------------------------------------------------------------------------- 1 | git_repo_has_changes() ( 2 | ( 3 | cd "$1" 4 | 5 | if [[ `git status --porcelain` ]]; then 6 | echo 'true' 7 | else 8 | echo 'false' 9 | fi 10 | ) 11 | ) 12 | 13 | 14 | exit_if_git_repo_has_changes() ( 15 | if [[ $(git_repo_has_changes "$1") == 'true' ]]; then 16 | echo ">> Repository has changes, exit" 17 | exit 1 18 | fi 19 | ) 20 | 21 | 22 | dependency_repo_is_on_released_tag() ( 23 | ( 24 | cd "$1" 25 | 26 | if [ ! -f "package.json" ]; then 27 | echo '>> `dependency_repo_is_on_released_tag` should be pointed to the package root (folder with `package.json`)' 28 | exit 1 29 | fi 30 | 31 | VERSION=$(node -e "require('./package.json').version") 32 | TAG=$(git describe --tag) 33 | 34 | if [[ "v$VERSION" == "$TAG" ]]; then 35 | dummy=1 36 | else 37 | echo ">> Package at $(pwd) has unpublished commits" 38 | fi 39 | ) 40 | ) 41 | -------------------------------------------------------------------------------- /packages/dev-scripts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dev-scripts", 3 | "version": "0.0.0", 4 | "description": "Internal scripts", 5 | "author": "Nickolay Platonov, Bryntum", 6 | "license": "MIT", 7 | 8 | "directories": { 9 | "bin" : "bin" 10 | }, 11 | "devDependencies": { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/dev-scripts/scripts/changelog.cjs: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | 4 | const prependZero = (int, minLength) => { 5 | const str = String(int) 6 | 7 | return '0000000'.slice(0, minLength - str.length) + str 8 | } 9 | 10 | const version = require('../../chained-iterator/package.json').version 11 | 12 | const updateVersion = () => { 13 | const versionTime = new Date() 14 | 15 | let changelog = fs.readFileSync('CHANGELOG.md', 'utf8') 16 | 17 | changelog = changelog.replace(/\{\{ \$NEXT \}\}/m, getVersionStr(version, versionTime)) 18 | 19 | fs.writeFileSync('CHANGELOG.md', changelog, 'utf8') 20 | 21 | console.log(versionTime.getTime()) 22 | } 23 | 24 | 25 | const updateVersionAndStartNew = (newVersion, newVersionTime) => { 26 | let changelog = fs.readFileSync('CHANGELOG.md', 'utf8') 27 | 28 | const version = (newVersion || version).replace(/^v/, '') 29 | const time = new Date(newVersionTime) || new Date() 30 | 31 | changelog = changelog.replace(/^(.*?)\{\{ \$NEXT \}\}/m, `$1{{ $NEXT }}\n\n$1${ getVersionStr(version, time) }`) 32 | 33 | fs.writeFileSync('CHANGELOG.md', changelog, 'utf8') 34 | } 35 | 36 | const getVersionStr = (version, now) => { 37 | return `${version} ${now.getFullYear()}-${ prependZero(now.getMonth() + 1, 2) }-${ prependZero(now.getDate(), 2) } ${ prependZero(now.getHours(), 2) }:${ prependZero(now.getMinutes(), 2) }` 38 | } 39 | 40 | module.exports = { 41 | updateVersion, 42 | updateVersionAndStartNew 43 | } 44 | -------------------------------------------------------------------------------- /packages/siesta-example-browser/.gitignore: -------------------------------------------------------------------------------- 1 | # IDE related files 2 | /.idea 3 | /.vscode 4 | 5 | # coverage report 6 | /coverage 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # files generated by TypeScript 12 | /src/**/*.js 13 | /src/**/*.jsx 14 | /src/**/*.js.map 15 | /src/**/*.d.ts 16 | /tests/**/*.js 17 | /tests/**/*.js.map 18 | /tests/**/*.d.ts 19 | /index.js 20 | /index.js.map 21 | /index.d.ts 22 | 23 | -------------------------------------------------------------------------------- /packages/siesta-example-browser/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Nickolay Platonov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/siesta-example-browser/README.md: -------------------------------------------------------------------------------- 1 | Chained iterator 2 | =============== 3 | 4 | 5 | COPYRIGHT AND LICENSE 6 | ================= 7 | 8 | MIT License 9 | 10 | Copyright (c) 2021 Nickolay Platonov 11 | -------------------------------------------------------------------------------- /packages/siesta-example-browser/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src/module.js' 2 | -------------------------------------------------------------------------------- /packages/siesta-example-browser/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "siesta-example-isomorphic", 3 | "version": "0.0.1", 4 | "description": "Sample Siesta isomorphic test suite", 5 | "main": "index.js", 6 | "module": "index.js", 7 | "type": "module", 8 | "scripts": { 9 | "start": "npx wds --node-resolve", 10 | "test": "npx siesta http://localhost:8000/tests/index.js" 11 | }, 12 | "keywords": [], 13 | "author": "Bryntum, Nickolay Platonov", 14 | "license": "MIT", 15 | "dependencies": {}, 16 | "devDependencies": { 17 | "@bryntum/siesta": "^6.0.0-alpha-5", 18 | "tslint": "^6.1.3", 19 | "typescript": "^4.3.5", 20 | "@web/dev-server": "^0.1.28" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/siesta-example-browser/src/module.ts: -------------------------------------------------------------------------------- 1 | export const delay = (timeout : number) : Promise => new Promise(resolve => setTimeout(resolve, timeout)) 2 | 3 | export async function summer (a : number, b : number) : Promise { 4 | await delay(10) 5 | 6 | return a + b 7 | } 8 | 9 | export type Zoomer = { name : string, age : number } 10 | 11 | export function zoomer (name : string, age : number) : Zoomer { 12 | return { name, age } 13 | } 14 | -------------------------------------------------------------------------------- /packages/siesta-example-browser/tests/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "@bryntum/siesta/browser.js" 2 | 3 | const project = Project.new({ 4 | title : 'Chained iterator test suite', 5 | 6 | testDescriptor : {} 7 | }) 8 | 9 | project.plan( 10 | 'summer.t.js' 11 | ) 12 | 13 | project.start() 14 | -------------------------------------------------------------------------------- /packages/siesta-example-browser/tests/summer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "@bryntum/siesta/browser.js" 2 | import { summer } from "../src/module.js" 3 | 4 | it('Using `summer` should work', async (t : Test) => { 5 | t.is(await summer(1, 1), 2, "Correct summer result #1") 6 | 7 | t.expect(await summer(1, 2)).toBe(3) 8 | 9 | t.expect(await summer(2, 3)).toBe(5) 10 | }) 11 | -------------------------------------------------------------------------------- /packages/siesta-example-browser/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions" : { 3 | "strict" : true, 4 | "experimentalDecorators" : true, 5 | 6 | "noImplicitThis" : true, 7 | "strictBindCallApply" : true, 8 | // https://github.com/microsoft/TypeScript/issues/29872#issuecomment-868535962 9 | "strictPropertyInitialization" : false, 10 | 11 | "target" : "es2017", 12 | "sourceMap" : false, 13 | 14 | "lib" : [ 15 | "esnext", 16 | "dom" 17 | ], 18 | 19 | "module" : "esnext", 20 | "moduleResolution" : "node", 21 | 22 | "allowSyntheticDefaultImports" : true 23 | }, 24 | 25 | "include" : [ 26 | "index.ts", 27 | "src/**/*.ts", 28 | "tests/**/*.ts", 29 | ], 30 | 31 | "exclude" : [ 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /packages/siesta-example-deno/.gitignore: -------------------------------------------------------------------------------- 1 | # IDE related files 2 | /.idea 3 | /.vscode 4 | 5 | # coverage report 6 | /coverage 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # files generated by TypeScript 12 | /src/**/*.js 13 | /src/**/*.jsx 14 | /src/**/*.js.map 15 | /src/**/*.d.ts 16 | /tests/**/*.js 17 | /tests/**/*.js.map 18 | /tests/**/*.d.ts 19 | /index.js 20 | /index.js.map 21 | /index.d.ts 22 | 23 | -------------------------------------------------------------------------------- /packages/siesta-example-deno/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Nickolay Platonov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/siesta-example-deno/README.md: -------------------------------------------------------------------------------- 1 | Chained iterator 2 | =============== 3 | 4 | 5 | COPYRIGHT AND LICENSE 6 | ================= 7 | 8 | MIT License 9 | 10 | Copyright (c) 2021 Nickolay Platonov 11 | -------------------------------------------------------------------------------- /packages/siesta-example-deno/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src/module.js' 2 | -------------------------------------------------------------------------------- /packages/siesta-example-deno/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "siesta-example-isomorphic", 3 | "version": "0.0.1", 4 | "description": "Sample Siesta isomorphic test suite", 5 | "main": "index.js", 6 | "module": "index.js", 7 | "type": "module", 8 | "scripts": { 9 | "test": "deno run -A --unstable --no-check tests/index.js" 10 | }, 11 | "keywords": [], 12 | "author": "Bryntum, Nickolay Platonov", 13 | "license": "MIT", 14 | "dependencies": {}, 15 | "devDependencies": { 16 | "@bryntum/siesta": "^6.0.0-alpha-5", 17 | "tslint": "^6.1.3", 18 | "typescript": "^4.3.5" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/siesta-example-deno/src/module.ts: -------------------------------------------------------------------------------- 1 | export const delay = (timeout : number) : Promise => new Promise(resolve => setTimeout(resolve, timeout)) 2 | 3 | export async function summer (a : number, b : number) : Promise { 4 | await delay(10) 5 | 6 | return a + b 7 | } 8 | 9 | export type Zoomer = { name : string, age : number } 10 | 11 | export function zoomer (name : string, age : number) : Zoomer { 12 | return { name, age } 13 | } 14 | -------------------------------------------------------------------------------- /packages/siesta-example-deno/tests/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../node_modules/@bryntum/siesta/deno.js" 2 | 3 | const project = Project.new({ 4 | title : 'Chained iterator test suite', 5 | 6 | testDescriptor : {} 7 | }) 8 | 9 | project.start() 10 | -------------------------------------------------------------------------------- /packages/siesta-example-deno/tests/summer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "../node_modules/@bryntum/siesta/deno.js" 2 | import { summer } from "../src/module.js" 3 | 4 | it('Using `summer` should work', async (t : Test) => { 5 | t.is(await summer(1, 1), 2, "Correct summer result #1") 6 | 7 | t.expect(await summer(1, 2)).toBe(3) 8 | 9 | t.expect(await summer(2, 3)).toBe(5) 10 | }) 11 | -------------------------------------------------------------------------------- /packages/siesta-example-deno/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions" : { 3 | "strict" : true, 4 | "experimentalDecorators" : true, 5 | 6 | "noImplicitThis" : true, 7 | "strictBindCallApply" : true, 8 | // https://github.com/microsoft/TypeScript/issues/29872#issuecomment-868535962 9 | "strictPropertyInitialization" : false, 10 | 11 | "target" : "es2017", 12 | "sourceMap" : false, 13 | 14 | "lib" : [ 15 | "esnext" 16 | ], 17 | 18 | "module" : "esnext", 19 | "moduleResolution" : "node", 20 | 21 | "allowSyntheticDefaultImports" : true 22 | }, 23 | 24 | "include" : [ 25 | "index.ts", 26 | "src/**/*.ts", 27 | "tests/**/*.ts", 28 | ], 29 | 30 | "exclude" : [ 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /packages/siesta-example-isomorphic/.gitignore: -------------------------------------------------------------------------------- 1 | # IDE related files 2 | /.idea 3 | /.vscode 4 | 5 | # coverage report 6 | /coverage 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # files generated by TypeScript 12 | /src/**/*.js 13 | /src/**/*.jsx 14 | /src/**/*.js.map 15 | /src/**/*.d.ts 16 | /tests/**/*.js 17 | /tests/**/*.js.map 18 | /tests/**/*.d.ts 19 | /index.js 20 | /index.js.map 21 | /index.d.ts 22 | 23 | -------------------------------------------------------------------------------- /packages/siesta-example-isomorphic/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Nickolay Platonov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/siesta-example-isomorphic/README.md: -------------------------------------------------------------------------------- 1 | Chained iterator 2 | =============== 3 | 4 | 5 | COPYRIGHT AND LICENSE 6 | ================= 7 | 8 | MIT License 9 | 10 | Copyright (c) 2021 Nickolay Platonov 11 | -------------------------------------------------------------------------------- /packages/siesta-example-isomorphic/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src/module.js' 2 | -------------------------------------------------------------------------------- /packages/siesta-example-isomorphic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "siesta-example-isomorphic", 3 | "version": "0.0.1", 4 | "description": "Sample Siesta isomorphic test suite", 5 | "main": "index.js", 6 | "module": "index.js", 7 | "type": "module", 8 | "scripts": { 9 | "start": "npx wds --node-resolve", 10 | "test_node": "node ./tests/index.js", 11 | "test_browser": "npx siesta http://localhost:8000/tests/index.js", 12 | "test_deno": "deno run -A --unstable --no-check tests/index.js" 13 | }, 14 | "keywords": [], 15 | "author": "Bryntum, Nickolay Platonov", 16 | "license": "MIT", 17 | "dependencies": {}, 18 | "devDependencies": { 19 | "@bryntum/siesta": "^6.0.0-alpha-5", 20 | "tslint": "^6.1.3", 21 | "typescript": "^4.3.5", 22 | "@web/dev-server": "^0.1.28" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/siesta-example-isomorphic/src/module.ts: -------------------------------------------------------------------------------- 1 | export const delay = (timeout : number) : Promise => new Promise(resolve => setTimeout(resolve, timeout)) 2 | 3 | export async function summer (a : number, b : number) : Promise { 4 | await delay(10) 5 | 6 | return a + b 7 | } 8 | 9 | export type Zoomer = { name : string, age : number } 10 | 11 | export function zoomer (name : string, age : number) : Zoomer { 12 | return { name, age } 13 | } 14 | -------------------------------------------------------------------------------- /packages/siesta-example-isomorphic/tests/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../node_modules/@bryntum/siesta/index.js" 2 | 3 | const project = Project.new({ 4 | title : 'Chained iterator test suite', 5 | 6 | testDescriptor : {} 7 | }) 8 | 9 | project.plan( 10 | 'summer.t.js' 11 | ) 12 | 13 | project.start() 14 | -------------------------------------------------------------------------------- /packages/siesta-example-isomorphic/tests/summer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "../node_modules/@bryntum/siesta/index.js" 2 | import { summer } from "../src/module.js" 3 | 4 | it('Using `summer` should work', async (t : Test) => { 5 | t.is(await summer(1, 1), 2, "Correct summer result #1") 6 | 7 | t.expect(await summer(1, 2)).toBe(3) 8 | 9 | t.expect(await summer(2, 3)).toBe(5) 10 | }) 11 | -------------------------------------------------------------------------------- /packages/siesta-example-isomorphic/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions" : { 3 | "strict" : true, 4 | "experimentalDecorators" : true, 5 | 6 | "noImplicitThis" : true, 7 | "strictBindCallApply" : true, 8 | // https://github.com/microsoft/TypeScript/issues/29872#issuecomment-868535962 9 | "strictPropertyInitialization" : false, 10 | 11 | "target" : "es2017", 12 | "sourceMap" : false, 13 | 14 | "lib" : [ 15 | "esnext" 16 | ], 17 | 18 | "module" : "esnext", 19 | "moduleResolution" : "node", 20 | 21 | "allowSyntheticDefaultImports" : true 22 | }, 23 | 24 | "include" : [ 25 | "index.ts", 26 | "src/**/*.ts", 27 | "tests/**/*.ts", 28 | ], 29 | 30 | "exclude" : [ 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /packages/siesta-example-nodejs/.gitignore: -------------------------------------------------------------------------------- 1 | # IDE related files 2 | /.idea 3 | /.vscode 4 | 5 | # coverage report 6 | /coverage 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # files generated by TypeScript 12 | /src/**/*.js 13 | /src/**/*.jsx 14 | /src/**/*.js.map 15 | /src/**/*.d.ts 16 | /tests/**/*.js 17 | /tests/**/*.js.map 18 | /tests/**/*.d.ts 19 | /index.js 20 | /index.js.map 21 | /index.d.ts 22 | 23 | -------------------------------------------------------------------------------- /packages/siesta-example-nodejs/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Nickolay Platonov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/siesta-example-nodejs/README.md: -------------------------------------------------------------------------------- 1 | Chained iterator 2 | =============== 3 | 4 | 5 | COPYRIGHT AND LICENSE 6 | ================= 7 | 8 | MIT License 9 | 10 | Copyright (c) 2021 Nickolay Platonov 11 | -------------------------------------------------------------------------------- /packages/siesta-example-nodejs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src/module.js' 2 | -------------------------------------------------------------------------------- /packages/siesta-example-nodejs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "siesta-example-isomorphic", 3 | "version": "0.0.1", 4 | "description": "Sample Siesta isomorphic test suite", 5 | "main": "index.js", 6 | "module": "index.js", 7 | "type": "module", 8 | "scripts": { 9 | "test": "node ./tests/index.js" 10 | }, 11 | "keywords": [], 12 | "author": "Bryntum, Nickolay Platonov", 13 | "license": "MIT", 14 | "dependencies": {}, 15 | "devDependencies": { 16 | "@bryntum/siesta": "^6.0.0-alpha-5", 17 | "tslint": "^6.1.3", 18 | "typescript": "^4.3.5" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/siesta-example-nodejs/src/module.ts: -------------------------------------------------------------------------------- 1 | export const delay = (timeout : number) : Promise => new Promise(resolve => setTimeout(resolve, timeout)) 2 | 3 | export async function summer (a : number, b : number) : Promise { 4 | await delay(10) 5 | 6 | return a + b 7 | } 8 | 9 | export type Zoomer = { name : string, age : number } 10 | 11 | export function zoomer (name : string, age : number) : Zoomer { 12 | return { name, age } 13 | } 14 | -------------------------------------------------------------------------------- /packages/siesta-example-nodejs/tests/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "@bryntum/siesta/nodejs.js" 2 | 3 | const project = Project.new({ 4 | title : 'Chained iterator test suite', 5 | 6 | testDescriptor : {} 7 | }) 8 | 9 | project.start() 10 | -------------------------------------------------------------------------------- /packages/siesta-example-nodejs/tests/summer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "@bryntum/siesta/nodejs.js" 2 | import { summer } from "../src/module.js" 3 | 4 | it('Using `summer` should work', async (t : Test) => { 5 | t.is(await summer(1, 1), 2, "Correct summer result #1") 6 | 7 | t.expect(await summer(1, 2)).toBe(3) 8 | 9 | t.expect(await summer(2, 3)).toBe(5) 10 | }) 11 | -------------------------------------------------------------------------------- /packages/siesta-example-nodejs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions" : { 3 | "strict" : true, 4 | "experimentalDecorators" : true, 5 | 6 | "noImplicitThis" : true, 7 | "strictBindCallApply" : true, 8 | // https://github.com/microsoft/TypeScript/issues/29872#issuecomment-868535962 9 | "strictPropertyInitialization" : false, 10 | 11 | "target" : "es2017", 12 | "sourceMap" : false, 13 | 14 | "lib" : [ 15 | "esnext" 16 | ], 17 | 18 | "module" : "esnext", 19 | "moduleResolution" : "node", 20 | 21 | "allowSyntheticDefaultImports" : true 22 | }, 23 | 24 | "include" : [ 25 | "index.ts", 26 | "src/**/*.ts", 27 | "tests/**/*.ts", 28 | ], 29 | 30 | "exclude" : [ 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /packages/siesta/.npmignore: -------------------------------------------------------------------------------- 1 | /scripts 2 | /workspace 3 | /tests* 4 | /misc 5 | /*rollup.config.js 6 | /src/**/*.js 7 | /resources/styling/**/*.scss 8 | /resources/styling/**/*.css.map 9 | -------------------------------------------------------------------------------- /packages/siesta/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Release history for Siesta: 2 | 3 | ## v6.0.0-beta-1 2022-03-23 14:39 4 | 5 | ## v6.0.0-alpha-5 2021-12-21 09:21 6 | 7 | ## v6.0.0-alpha-4 2021-11-01 12:37 8 | 9 | #### FEATURES / ENHANCEMENTS 10 | 11 | - Added simulation of user actions for browser tests 12 | 13 | #### API CHANGES 14 | 15 | - None 16 | 17 | #### BUG FIXES 18 | 19 | - Lots of small fixes 20 | 21 | 22 | ## 6.0.0-alpha-3 2021-07-01 15:41 23 | 24 | #### FEATURES / ENHANCEMENTS 25 | 26 | - Removed the hidden dependency on the `@types/node` 27 | 28 | #### API CHANGES 29 | 30 | - None 31 | 32 | #### BUG FIXES 33 | 34 | - None 35 | 36 | 37 | ## 6.0.0-alpha-2 2021-06-08 16:26 38 | 39 | Refining the release process 40 | 41 | 42 | ## 6.0.0-alpha-1 2021-06-07 11:48 43 | 44 | Initial alpha release. 45 | 46 | -------------------------------------------------------------------------------- /packages/siesta/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2009-2021 Bryntum, Nickolay Platonov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/siesta/bin/siesta.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { LauncherNodejs } from "../src/siesta/launcher/LauncherNodejs.js" 4 | 5 | LauncherNodejs.run() 6 | -------------------------------------------------------------------------------- /packages/siesta/bin/siesta_deno.ts: -------------------------------------------------------------------------------- 1 | import { LauncherDeno } from "../src/siesta/launcher/LauncherDeno.js" 2 | 3 | LauncherDeno.run() 4 | -------------------------------------------------------------------------------- /packages/siesta/browser.ts: -------------------------------------------------------------------------------- 1 | export { TestBrowser, TestBrowser as Test, it, iit, xit, describe, ddescribe, xdescribe } from "./src/siesta/test/TestBrowser.js" 2 | 3 | export { beforeEach, afterEach, expect } from "./src/siesta/test/Test.js" 4 | 5 | export { ProjectBrowser, ProjectBrowser as Project } from "./src/siesta/project/ProjectBrowser.js" 6 | -------------------------------------------------------------------------------- /packages/siesta/deno.ts: -------------------------------------------------------------------------------- 1 | export { TestDeno, TestDeno as Test, it, iit, xit, describe, ddescribe, xdescribe } from "./src/siesta/test/TestDeno.js" 2 | 3 | export { beforeEach, afterEach, expect } from "./src/siesta/test/Test.js" 4 | 5 | export { ProjectDeno, ProjectDeno as Project } from "./src/siesta/project/ProjectDeno.js" 6 | -------------------------------------------------------------------------------- /packages/siesta/examples/browser/import_map.importmap: -------------------------------------------------------------------------------- 1 | { 2 | "imports": { 3 | "siesta/" : "./node_modules/siesta/" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/siesta/examples/browser/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "awesome-isomorphic-app", 3 | "version": "1.0.0", 4 | "description": "Awesome isomorphic application, tested with Siesta", 5 | "type": "module", 6 | "engines": { 7 | "node": ">=12.21.0" 8 | }, 9 | "devDependencies": { 10 | "@bryntum/siesta": "../../", 11 | "typescript": "^4.2.3", 12 | "vite": "^2.3.3" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/siesta/examples/browser/src/module.ts: -------------------------------------------------------------------------------- 1 | export const delay = (timeout : number) : Promise => new Promise(resolve => setTimeout(resolve, timeout)) 2 | 3 | export async function summer (a : number, b : number) : Promise { 4 | await delay(10) 5 | 6 | return a + b 7 | } 8 | 9 | export type Zoomer = { name : string, age : number } 10 | 11 | export function zoomer (name : string, age : number) : Zoomer { 12 | return { name, age } 13 | } 14 | -------------------------------------------------------------------------------- /packages/siesta/examples/browser/tests/basic/basic_test.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "@bryntum/siesta/index.js" 2 | 3 | it('Basic Siesta Node.js test', async (t : Test) => { 4 | t.true(true, "That's true") 5 | 6 | t.true(false, "That's not true") 7 | }) 8 | 9 | 10 | it('Deep equality should work', async (t : Test) => { 11 | t.equal([ 1, 2, 3 ], [ 3, 2, 1 ], "Arrays are deeply equal") 12 | 13 | t.expect( 14 | { receivedKey : 'receivedValue', commonKey : 'commonValue' } 15 | ).toEqual( 16 | { expectedKey : 'expectedValue', commonKey : 'commonValue' } 17 | ) 18 | }) 19 | -------------------------------------------------------------------------------- /packages/siesta/examples/browser/tests/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "@bryntum/siesta/index.js" 2 | 3 | const project = Project.new({ 4 | title : 'Awesome isomorphic project test suite', 5 | }) 6 | 7 | // currently, isomorphic project does not have access to file system 8 | // it needs to list all test files manually 9 | project.plan( 10 | { 11 | filename : 'basic', 12 | 13 | items : [ 14 | 'basic_test.t.js' 15 | ] 16 | }, 17 | { 18 | filename : 'module', 19 | 20 | items : [ 21 | 'delay.t.js', 22 | 'summer.t.js', 23 | 'zoomer.t.js' 24 | ] 25 | } 26 | ) 27 | 28 | project.start() 29 | -------------------------------------------------------------------------------- /packages/siesta/examples/browser/tests/module/delay.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "@bryntum/siesta/index.js" 2 | import { delay } from "../../src/module.js" 3 | 4 | it('Using `delay` should work', async (t : Test) => { 5 | const start = Date.now() 6 | 7 | const time = 100 8 | 9 | await delay(time) 10 | 11 | const end = Date.now() 12 | 13 | t.isGreaterOrEqual(end - start, time, `Should await at least the ${ time }ms`) 14 | 15 | t.expect(end - start).toBeGreaterOrEqualThan(time) 16 | }) 17 | 18 | -------------------------------------------------------------------------------- /packages/siesta/examples/browser/tests/module/summer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "@bryntum/siesta/index.js" 2 | import { summer } from "../../src/module.js" 3 | 4 | it('Using `summer` should work', async (t : Test) => { 5 | t.is(await summer(1, 1), 2, "Correct summer result #1") 6 | 7 | t.expect(await summer(1, 2)).toBe(3) 8 | 9 | t.expect(await summer(2, 3)).toBe(5) 10 | }) 11 | 12 | -------------------------------------------------------------------------------- /packages/siesta/examples/browser/tests/module/zoomer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "@bryntum/siesta/index.js" 2 | import { zoomer } from "../../src/module.js" 3 | 4 | it('Using `zoomer` should work', async (t : Test) => { 5 | 6 | t.equal(zoomer('Myers Courtney', 35), { name : 'Courtney Myers', age : 35 }) 7 | }) 8 | 9 | -------------------------------------------------------------------------------- /packages/siesta/examples/browser/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions" : { 3 | "strict" : true, 4 | "experimentalDecorators" : true, 5 | 6 | "noImplicitThis" : true, 7 | "strictBindCallApply" : true, 8 | // https://github.com/microsoft/TypeScript/issues/29872#issuecomment-868535962 9 | "strictPropertyInitialization" : false, 10 | 11 | "target" : "es2017", 12 | "sourceMap" : false, 13 | 14 | "lib" : [ 15 | "esnext" 16 | ], 17 | 18 | "module" : "esnext", 19 | "moduleResolution" : "node", 20 | 21 | "allowSyntheticDefaultImports" : true 22 | }, 23 | 24 | "include" : [ 25 | "src/**/*.ts", 26 | "tests/**/*.ts", 27 | ], 28 | 29 | "exclude" : [ 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /packages/siesta/examples/deno/siesta_deno.ts: -------------------------------------------------------------------------------- 1 | // in your app it will probably look like: 2 | // export * from "https://deno.land/x/siesta@v6.0.0-alpha-0/deno.ts" 3 | 4 | export * from "../../deno.js" 5 | 6 | -------------------------------------------------------------------------------- /packages/siesta/examples/deno/src/module.ts: -------------------------------------------------------------------------------- 1 | export const delay = (timeout : number) : Promise => new Promise(resolve => setTimeout(resolve, timeout)) 2 | 3 | export async function summer (a : number, b : number) : Promise { 4 | await delay(10) 5 | 6 | return a + b 7 | } 8 | 9 | export type Zoomer = { name : string, age : number } 10 | 11 | export function zoomer (name : string, age : number) : Zoomer { 12 | return { name, age } 13 | } 14 | -------------------------------------------------------------------------------- /packages/siesta/examples/deno/tests/basic/basic_test.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "../../siesta_deno.ts" 2 | 3 | it('Basic Siesta Deno test', async (t : Test) => { 4 | t.true(true, "That's true") 5 | 6 | t.true(false, "That's not true") 7 | }) 8 | 9 | 10 | it('Deep equality should work', async (t : Test) => { 11 | t.equal([ 1, 2, 3 ], [ 3, 2, 1 ], "Arrays are deeply equal") 12 | 13 | t.expect( 14 | { receivedKey : 'receivedValue', commonKey : 'commonValue' } 15 | ).toEqual( 16 | { expectedKey : 'expectedValue', commonKey : 'commonValue' } 17 | ) 18 | }) 19 | -------------------------------------------------------------------------------- /packages/siesta/examples/deno/tests/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../siesta_deno.ts" 2 | 3 | const project = Project.new({ 4 | title : 'Awesome Deno project test suite', 5 | }) 6 | 7 | // by default, tests from the project directory are planned 8 | // project.planDir('.') 9 | 10 | project.start() 11 | -------------------------------------------------------------------------------- /packages/siesta/examples/deno/tests/module/delay.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "../../siesta_deno.ts" 2 | import { delay } from "../../src/module.ts" 3 | 4 | it('Using `delay` should work', async (t : Test) => { 5 | const start = Date.now() 6 | 7 | const time = 100 8 | 9 | await delay(time) 10 | 11 | const end = Date.now() 12 | 13 | t.isGreaterOrEqual(end - start, time, `Should await at least the ${ time }ms`) 14 | 15 | t.expect(end - start).toBeGreaterOrEqualThan(time) 16 | }) 17 | 18 | -------------------------------------------------------------------------------- /packages/siesta/examples/deno/tests/module/summer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "../../siesta_deno.ts" 2 | import { summer } from "../../src/module.ts" 3 | 4 | it('Using `summer` should work', async (t : Test) => { 5 | t.is(await summer(1, 1), 2, "Correct summer result #1") 6 | 7 | t.expect(await summer(1, 2)).toBe(3) 8 | 9 | t.expect(await summer(2, 3)).toBe(5) 10 | }) 11 | 12 | -------------------------------------------------------------------------------- /packages/siesta/examples/deno/tests/module/zoomer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "../../siesta_deno.ts" 2 | import { zoomer } from "../../src/module.ts" 3 | 4 | it('Using `zoomer` should work', async (t : Test) => { 5 | 6 | t.equal(zoomer('Myers Courtney', 35), { name : 'Courtney Myers', age : 35 }) 7 | }) 8 | 9 | -------------------------------------------------------------------------------- /packages/siesta/examples/isomorphic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "awesome-isomorphic-app", 3 | "version": "1.0.0", 4 | "description": "Awesome isomorphic application, tested with Siesta", 5 | "main": "index.js", 6 | "module": "index.js", 7 | "type": "module", 8 | "engines": { 9 | "node": ">=12.21.0" 10 | }, 11 | "devDependencies": { 12 | "@bryntum/siesta": "../../" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/siesta/examples/isomorphic/src/module.ts: -------------------------------------------------------------------------------- 1 | export const delay = (timeout : number) : Promise => new Promise(resolve => setTimeout(resolve, timeout)) 2 | 3 | export async function summer (a : number, b : number) : Promise { 4 | await delay(10) 5 | 6 | return a + b 7 | } 8 | 9 | export type Zoomer = { name : string, age : number } 10 | 11 | export function zoomer (name : string, age : number) : Zoomer { 12 | return { name, age } 13 | } 14 | -------------------------------------------------------------------------------- /packages/siesta/examples/isomorphic/tests/basic/basic_test.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "../../../../index.js" 2 | 3 | it('Basic Siesta Node.js test', async (t : Test) => { 4 | t.true(true, "That's true") 5 | 6 | t.true(false, "That's not true") 7 | }) 8 | 9 | 10 | it('Deep equality should work', async (t : Test) => { 11 | t.equal([ 1, 2, 3 ], [ 3, 2, 1 ], "Arrays are deeply equal") 12 | 13 | t.expect( 14 | { receivedKey : 'receivedValue', commonKey : 'commonValue' } 15 | ).toEqual( 16 | { expectedKey : 'expectedValue', commonKey : 'commonValue' } 17 | ) 18 | }) 19 | -------------------------------------------------------------------------------- /packages/siesta/examples/isomorphic/tests/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../../../index.js" 2 | 3 | const project = Project.new({ 4 | title : 'Awesome isomorphic project test suite', 5 | }) 6 | 7 | // currently, isomorphic project does not have access to file system 8 | // it needs to list all test files manually 9 | project.plan( 10 | { 11 | url : 'basic', 12 | 13 | items : [ 14 | 'basic_test.t.js' 15 | ] 16 | }, 17 | { 18 | url : 'module', 19 | 20 | items : [ 21 | 'delay.t.js', 22 | 'summer.t.js', 23 | 'zoomer.t.js' 24 | ] 25 | } 26 | ) 27 | 28 | project.start() 29 | -------------------------------------------------------------------------------- /packages/siesta/examples/isomorphic/tests/module/delay.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "../../../../index.js" 2 | import { delay } from "../../src/module.js" 3 | 4 | it('Using `delay` should work', async (t : Test) => { 5 | const start = Date.now() 6 | 7 | const time = 100 8 | 9 | await delay(time) 10 | 11 | const end = Date.now() 12 | 13 | t.isGreaterOrEqual(end - start, time, `Should await at least the ${ time }ms`) 14 | 15 | t.expect(end - start).toBeGreaterOrEqualThan(time) 16 | }) 17 | 18 | -------------------------------------------------------------------------------- /packages/siesta/examples/isomorphic/tests/module/summer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "../../../../index.js" 2 | import { summer } from "../../src/module.js" 3 | 4 | it('Using `summer` should work', async (t : Test) => { 5 | t.is(await summer(1, 1), 2, "Correct summer result #1") 6 | 7 | t.expect(await summer(1, 2)).toBe(3) 8 | 9 | t.expect(await summer(2, 3)).toBe(5) 10 | }) 11 | 12 | -------------------------------------------------------------------------------- /packages/siesta/examples/isomorphic/tests/module/zoomer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "../../../../index.js" 2 | import { zoomer } from "../../src/module.js" 3 | 4 | it('Using `zoomer` should work', async (t : Test) => { 5 | 6 | t.equal(zoomer('Myers Courtney', 35), { name : 'Courtney Myers', age : 35 }) 7 | }) 8 | 9 | -------------------------------------------------------------------------------- /packages/siesta/examples/isomorphic/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions" : { 3 | "strict" : true, 4 | "experimentalDecorators" : true, 5 | 6 | "noImplicitThis" : true, 7 | "strictBindCallApply" : true, 8 | // https://github.com/microsoft/TypeScript/issues/29872#issuecomment-868535962 9 | "strictPropertyInitialization" : false, 10 | 11 | "target" : "es2017", 12 | "sourceMap" : false, 13 | 14 | "lib" : [ 15 | "esnext" 16 | ], 17 | 18 | "module" : "esnext", 19 | "moduleResolution" : "node", 20 | 21 | "allowSyntheticDefaultImports" : true 22 | }, 23 | 24 | "include" : [ 25 | "src/**/*.ts", 26 | "tests/**/*.ts", 27 | ], 28 | 29 | "exclude" : [ 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /packages/siesta/examples/nodejs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "awesome-nodejs-app", 3 | "version": "1.0.0", 4 | "description": "Awesome Node.js application, tested with Siesta", 5 | "main": "index.js", 6 | "module": "index.js", 7 | "type": "module", 8 | "engines": { 9 | "node": ">=12.21.0" 10 | }, 11 | "dependencies": {}, 12 | "devDependencies": { 13 | "typescript": "^4.2.3", 14 | "@bryntum/siesta": "../../" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/siesta/examples/nodejs/src/module.ts: -------------------------------------------------------------------------------- 1 | export const delay = (timeout : number) : Promise => new Promise(resolve => setTimeout(resolve, timeout)) 2 | 3 | export async function summer (a : number, b : number) : Promise { 4 | await delay(10) 5 | 6 | return a + b 7 | } 8 | 9 | export type Zoomer = { name : string, age : number } 10 | 11 | export function zoomer (name : string, age : number) : Zoomer { 12 | return { name, age } 13 | } 14 | -------------------------------------------------------------------------------- /packages/siesta/examples/nodejs/tests/basic/basic_test.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "@bryntum/siesta/nodejs.js" 2 | 3 | it('Basic Siesta Node.js test', async (t : Test) => { 4 | t.true(true, "That's true") 5 | 6 | t.true(false, "That's not true") 7 | }) 8 | 9 | 10 | it('Deep equality should work', async (t : Test) => { 11 | t.equal([ 1, 2, 3 ], [ 3, 2, 1 ], "Arrays are deeply equal") 12 | 13 | t.expect( 14 | { receivedKey : 'receivedValue', commonKey : 'commonValue' } 15 | ).toEqual( 16 | { expectedKey : 'expectedValue', commonKey : 'commonValue' } 17 | ) 18 | }) 19 | -------------------------------------------------------------------------------- /packages/siesta/examples/nodejs/tests/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "@bryntum/siesta/nodejs.js" 2 | 3 | const project = Project.new({ 4 | title : 'Awesome Node.js project test suite', 5 | }) 6 | 7 | // by default, tests from the project directory are planned 8 | // project.planDir('.') 9 | 10 | project.start() 11 | -------------------------------------------------------------------------------- /packages/siesta/examples/nodejs/tests/module/delay.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "@bryntum/siesta/nodejs.js" 2 | import { delay } from "../../src/module.js" 3 | 4 | it('Using `delay` should work', async (t : Test) => { 5 | const start = Date.now() 6 | 7 | const time = 100 8 | 9 | await delay(time) 10 | 11 | const end = Date.now() 12 | 13 | t.isGreaterOrEqual(end - start, time, `Should await at least the ${ time }ms`) 14 | 15 | t.expect(end - start).toBeGreaterOrEqualThan(time) 16 | }) 17 | 18 | -------------------------------------------------------------------------------- /packages/siesta/examples/nodejs/tests/module/summer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "@bryntum/siesta/nodejs.js" 2 | import { summer } from "../../src/module.js" 3 | 4 | it('Using `summer` should work', async (t : Test) => { 5 | t.is(await summer(1, 1), 2, "Correct summer result #1") 6 | 7 | t.expect(await summer(1, 2)).toBe(3) 8 | 9 | t.expect(await summer(2, 3)).toBe(5) 10 | }) 11 | 12 | -------------------------------------------------------------------------------- /packages/siesta/examples/nodejs/tests/module/zoomer.t.ts: -------------------------------------------------------------------------------- 1 | import { it, Test } from "@bryntum/siesta/nodejs.js" 2 | import { zoomer } from "../../src/module.js" 3 | 4 | it('Using `zoomer` should work', async (t : Test) => { 5 | 6 | t.equal(zoomer('Myers Courtney', 35), { name : 'Courtney Myers', age : 35 }) 7 | }) 8 | 9 | -------------------------------------------------------------------------------- /packages/siesta/examples/nodejs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions" : { 3 | "strict" : true, 4 | "experimentalDecorators" : true, 5 | 6 | "noImplicitThis" : true, 7 | "strictBindCallApply" : true, 8 | // https://github.com/microsoft/TypeScript/issues/29872#issuecomment-868535962 9 | "strictPropertyInitialization" : false, 10 | 11 | "target" : "es2017", 12 | "sourceMap" : false, 13 | 14 | "lib" : [ 15 | "esnext" 16 | ], 17 | 18 | "module" : "esnext", 19 | "moduleResolution" : "node", 20 | 21 | "allowSyntheticDefaultImports" : true 22 | }, 23 | 24 | "include" : [ 25 | "src/**/*.ts", 26 | "tests/**/*.ts", 27 | ], 28 | 29 | "exclude" : [ 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /packages/siesta/examples/theming/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../../index.js" 2 | 3 | /* 4 | This project contains various examples of failing assertions. 5 | Its main purpose is to be able to review the theming of the 6 | output easily, which might be useful if you want to create 7 | a custom theme. 8 | */ 9 | 10 | const project = Project.new({ 11 | title : 'Theming example', 12 | }) 13 | 14 | project.plan( 15 | { 16 | url : 'theme', 17 | 18 | items : [ 19 | 'equality.t.js', 20 | 'exception.t.js', 21 | 'general.t.js', 22 | 'likeness.t.js', 23 | 'log_messages.t.js', 24 | ] 25 | }, 26 | ) 27 | 28 | project.start() 29 | -------------------------------------------------------------------------------- /packages/siesta/examples/theming/theme/equality.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | 3 | it('Theming of the equality assertions', async t => { 4 | 5 | t.is(11, 18) 6 | 7 | t.is({ abc : 'def' }, { ghi : 'jkl'}) 8 | 9 | t.equal( 10 | { 11 | map : new Map([ [ { key1 : 'value1' }, 1 ] ]), 12 | array : [ 'unequal', 'equal', 'extra' ], 13 | unexpected : 'unexpected' 14 | }, 15 | { 16 | map : new Map([ [ { key1 : 'value1' }, 1 ], [ { key2 : 'value2' }, 1 ] ]), 17 | array : [ 'UNEQUAL', 'equal' ], 18 | expected : 'expected' 19 | } 20 | ) 21 | }) 22 | 23 | -------------------------------------------------------------------------------- /packages/siesta/examples/theming/theme/exception.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | 3 | it('Theming of the `throws/doesNotThrow` assertions', async t => { 4 | 5 | t.throws(() => { 6 | throw new Error("Error") 7 | }, 'Errorz') 8 | 9 | t.doesNotThrow(() => { 10 | throw new Error("Errorz") 11 | }) 12 | 13 | t.doesNotThrow(() => { 14 | throw new Error("Errorz") 15 | }) 16 | }) 17 | 18 | -------------------------------------------------------------------------------- /packages/siesta/examples/theming/theme/general.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | 3 | it('Theming of various assertions', async t => { 4 | t.isInstanceOf(new Map(), Set, 'Map is instance of Set') 5 | }) 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/siesta/examples/theming/theme/likeness.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | 3 | it('Theming of the `like`assertion', async t => { 4 | 5 | t.like('Fobz', /fo/i, '`like` should work') 6 | 7 | t.like('Fobz', /foo/i, '`like` should work') 8 | 9 | t.like('Fobz', 'Fobx', '`like` should work') 10 | 11 | t.like('Fobz', 'Fob', '`like` should work') 12 | }) 13 | 14 | -------------------------------------------------------------------------------- /packages/siesta/examples/theming/theme/log_messages.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | 3 | 4 | it('Theming of the log messages (need to set the --log-level option to the appropriate value to see all of them)', async t => { 5 | t.error("Error message") 6 | 7 | t.warn("Warning message") 8 | 9 | t.log("Log message") 10 | 11 | t.debug("Debug message") 12 | 13 | t.info("Info message") 14 | }) 15 | -------------------------------------------------------------------------------- /packages/siesta/htmlreport.rollup.config.js: -------------------------------------------------------------------------------- 1 | import defaultConfig from './rollup.config.js' 2 | 3 | defaultConfig.input = [ 4 | 'resources/html_report/index.js' 5 | ] 6 | 7 | defaultConfig.output.dir = 'dist_html_report' 8 | 9 | export default defaultConfig 10 | -------------------------------------------------------------------------------- /packages/siesta/index.ts: -------------------------------------------------------------------------------- 1 | export { Test, it, iit, xit, describe, ddescribe, xdescribe, beforeEach, afterEach, expect } from "./src/siesta/test/Test.js" 2 | import { Test, it, iit, xit, describe, ddescribe, xdescribe, beforeEach, afterEach, expect } from "./src/siesta/test/Test.js" 3 | 4 | export { Project } from "./src/siesta/project/Project.js" 5 | 6 | export const siestaPackageRootUrl : string = import.meta.url.replace(/[^/]*$/, '') 7 | 8 | // backward compat 9 | export const StartTest = (func : (t : Test) => any) => { 10 | return it('Root', func) 11 | } 12 | -------------------------------------------------------------------------------- /packages/siesta/misc/client.ts: -------------------------------------------------------------------------------- 1 | import { MediaBrowserWebSocketChild } from "../src/rpc/media/MediaBrowserWebSocketChild.js" 2 | import { SimulatorPlaywrightClient } from "../src/siesta/simulate/SimulatorPlaywright.js" 3 | import { delay } from "../src/util/TimeHelpers.js" 4 | import { awaitDomReady } from "../src/util_browser/Dom.js" 5 | 6 | 7 | const connect = async (wsPort : number) => { 8 | await awaitDomReady() 9 | 10 | // const div = document.getElementById('canvas') 11 | // 12 | // div.addEventListener('mousemove', () => console.log("MOUSE ENTER")) 13 | 14 | const port = SimulatorPlaywrightClient.new() 15 | const media = MediaBrowserWebSocketChild.new({ wsHost : '127.0.0.1', wsPort : wsPort }) 16 | 17 | port.media = media 18 | 19 | port.handshakeType = 'parent_first' 20 | 21 | await port.connect() 22 | 23 | await delay(1000) 24 | 25 | await port.simulateMouseMove([ 50, 50 ]) 26 | 27 | await delay(500) 28 | } 29 | 30 | console.log("FROM CLIENT") 31 | 32 | // @ts-ignore 33 | window.connect = port => { 34 | connect(port) 35 | } 36 | 37 | // // @ts-ignore 38 | // console.log('HAS CONNECT: ', window.connect !== undefined) 39 | // 40 | // 41 | // document.addEventListener('load', () => { 42 | // // @ts-ignore 43 | // console.log('HAS CONNECT: ', window.connect !== undefined) 44 | // }) 45 | -------------------------------------------------------------------------------- /packages/siesta/misc/iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/siesta/misc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /packages/siesta/misc/playground/diff/diff.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/siesta/misc/playground/serial/serial-text.tsx: -------------------------------------------------------------------------------- 1 | // import { ColorerNodejs } from "../../../src/jsx/ColorerNodejs.js" 2 | // import { RenderCanvas } from "../../../src/jsx/RenderBlock.js" 3 | // import { TextJSX } from "../../../src/jsx/TextJSX.js" 4 | // import { styles } from "../../../src/siesta/reporter/styling/theme_universal.js" 5 | // import { serialize } from "./serial.js" 6 | // import { SerialElement, XmlRendererSerial } from "../../../src/serializer/SerialRendering.js" 7 | // 8 | // const serial = serialize([ 1, 2 ] ) 9 | // 10 | // const comp = SerialElement.new({ 11 | // serialization : serial 12 | // }) 13 | // 14 | // const renderer = XmlRendererSerial.new({ 15 | // prettyPrint : true, 16 | // 17 | // styles : styles, 18 | // colorerClass : ColorerNodejs 19 | // }) 20 | // 21 | // 22 | // console.log(renderer.render(comp, RenderCanvas.new({ maxWidth : 100 }))) 23 | -------------------------------------------------------------------------------- /packages/siesta/misc/playground/serial/serial.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/siesta/misc/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/siesta/misc/test1.js: -------------------------------------------------------------------------------- 1 | import { TEST2 } from "./test2.js"; 2 | console.log('test1', TEST2); 3 | export const TEST1 = true; 4 | -------------------------------------------------------------------------------- /packages/siesta/misc/test1.ts: -------------------------------------------------------------------------------- 1 | import { TEST2 } from "./test2.js" 2 | 3 | console.log('test1', TEST2) 4 | 5 | export const TEST1 = true 6 | -------------------------------------------------------------------------------- /packages/siesta/misc/test2.js: -------------------------------------------------------------------------------- 1 | console.log('test2'); 2 | export const TEST2 = true; 3 | -------------------------------------------------------------------------------- /packages/siesta/misc/test2.ts: -------------------------------------------------------------------------------- 1 | console.log('test2') 2 | 3 | export const TEST2 = true 4 | -------------------------------------------------------------------------------- /packages/siesta/misc/web-dev-server.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins : [ 3 | { 4 | name : 'allow-cors', 5 | transform (context) { 6 | context.response.set('Access-Control-Allow-Origin', '*') 7 | }, 8 | }, 9 | ], 10 | }; 11 | -------------------------------------------------------------------------------- /packages/siesta/nodejs.ts: -------------------------------------------------------------------------------- 1 | export { TestNodejs, TestNodejs as Test, it, iit, xit, describe, ddescribe, xdescribe } from "./src/siesta/test/TestNodejs.js" 2 | 3 | export { beforeEach, afterEach, expect } from "./src/siesta/test/Test.js" 4 | 5 | export { ProjectNodejs, ProjectNodejs as Project } from "./src/siesta/project/ProjectNodejs.js" 6 | -------------------------------------------------------------------------------- /packages/siesta/react.ts: -------------------------------------------------------------------------------- 1 | export { TestReact, TestReact as TestBrowser, TestReact as Test, it, iit, xit, describe, ddescribe, xdescribe } from "./src/siesta/react/TestReact.js" 2 | 3 | export { beforeEach, afterEach, expect } from "./src/siesta/test/Test.js" 4 | 5 | export { ProjectReact, ProjectReact as ProjectBrowser, ProjectReact as Project } from "./src/siesta/react/ProjectReact.js" 6 | -------------------------------------------------------------------------------- /packages/siesta/resources/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/siesta/resources/cert/ca-certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBtTCCAVoCCQCXqK2FegDgiDAKBggqhkjOPQQDAjBhMQswCQYDVQQGEwJJVDEQ 3 | MA4GA1UECAwHUGVydWdpYTEQMA4GA1UEBwwHRm9saWdubzETMBEGA1UECgwKd2Vi 4 | c29ja2V0czELMAkGA1UECwwCd3MxDDAKBgNVBAMMA2NhMTAgFw0yMTA1MjYxOTA1 5 | MjdaGA8yMTIxMDUwMjE5MDUyN1owYTELMAkGA1UEBhMCSVQxEDAOBgNVBAgMB1Bl 6 | cnVnaWExEDAOBgNVBAcMB0ZvbGlnbm8xEzARBgNVBAoMCndlYnNvY2tldHMxCzAJ 7 | BgNVBAsMAndzMQwwCgYDVQQDDANjYTEwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC 8 | AASHE75QDQN6XNo/711YSbckaa8r4lt0hGkgtADaBFT9Qn9gcm5omapePZT76Ff9 9 | rwjMcS+YPXS7J7bk+QHLihJMMAoGCCqGSM49BAMCA0kAMEYCIQCUMdUih+sE0ZTu 10 | ORlcKiM8DKyiKkGU4Ty+dslz6nVJjAIhAMcSy0SBsBDgsai1s9aCmAGJXCijNb6g 11 | vfWaatgq+ma2 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /packages/siesta/resources/cert/ca-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIAa/Onpk27cLkqzje69Bac8yG+LTBXIPWT8yGlyjEFbboAoGCCqGSM49 3 | AwEHoUQDQgAEhxO+UA0DelzaP+9dWEm3JGmvK+JbdIRpILQA2gRU/UJ/YHJuaJmq 4 | Xj2U++hX/a8IzHEvmD10uye25PkBy4oSTA== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /packages/siesta/resources/cert/certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBujCCAWACCQDjKdAMt3mZhDAKBggqhkjOPQQDAjBkMQswCQYDVQQGEwJJVDEQ 3 | MA4GA1UECAwHUGVydWdpYTEQMA4GA1UEBwwHRm9saWdubzETMBEGA1UECgwKd2Vi 4 | c29ja2V0czELMAkGA1UECwwCd3MxDzANBgNVBAMMBnNlcnZlcjAgFw0yMTA1MjYx 5 | OTEwMjlaGA8yMTIxMDUwMjE5MTAyOVowZDELMAkGA1UEBhMCSVQxEDAOBgNVBAgM 6 | B1BlcnVnaWExEDAOBgNVBAcMB0ZvbGlnbm8xEzARBgNVBAoMCndlYnNvY2tldHMx 7 | CzAJBgNVBAsMAndzMQ8wDQYDVQQDDAZzZXJ2ZXIwWTATBgcqhkjOPQIBBggqhkjO 8 | PQMBBwNCAAQKhyRhdSVOecbJU4O5XkB/iGodbnCOqmchs4TXmE3Prv5SrNDhODDv 9 | rOWTXwR3/HrrdNfOzPdb54amu8POwpohMAoGCCqGSM49BAMCA0gAMEUCIHMRUSPl 10 | 8FGkDLl8KF1A+SbT2ds3zUOLdYvj30Z2SKSVAiEA84U/R1ly9wf5Rzv93sTHI99o 11 | KScsr/PHN8rT2pop5pk= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /packages/siesta/resources/cert/client-certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBtzCCAV0CCQDDIX2dKuKP0zAKBggqhkjOPQQDAjBhMQswCQYDVQQGEwJJVDEQ 3 | MA4GA1UECAwHUGVydWdpYTEQMA4GA1UEBwwHRm9saWdubzETMBEGA1UECgwKd2Vi 4 | c29ja2V0czELMAkGA1UECwwCd3MxDDAKBgNVBAMMA2NhMTAgFw0yMTA1MjYxOTE3 5 | NDJaGA8yMTIxMDUwMjE5MTc0MlowZDELMAkGA1UEBhMCSVQxEDAOBgNVBAgMB1Bl 6 | cnVnaWExEDAOBgNVBAcMB0ZvbGlnbm8xEzARBgNVBAoMCndlYnNvY2tldHMxCzAJ 7 | BgNVBAsMAndzMQ8wDQYDVQQDDAZhZ2VudDEwWTATBgcqhkjOPQIBBggqhkjOPQMB 8 | BwNCAATwHlNS2b13TMhBTSWBXAn6TEPxrsvG93ZZyUlmrEMOXSMX2hI7sv660YNj 9 | +eGyE2CV33XsQxV3TUqi51fUjIu8MAoGCCqGSM49BAMCA0gAMEUCIQCxsqBre+Do 10 | jnfg6XmCaB0fywNzcDlvdoVNuNAWfVNrSAIgDQmbM0mXZaSAkf4sgtKdXnpE3vrb 11 | MElb457Bi3B+rkE= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /packages/siesta/resources/cert/client-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIKVGskK0UR86WwMo5H0+hNAFGRBYsEevK3ye4y1YberVoAoGCCqGSM49 3 | AwEHoUQDQgAE8B5TUtm9d0zIQU0lgVwJ+kxD8a7Lxvd2WclJZqxDDl0jF9oSO7L+ 4 | utGDY/nhshNgld917EMVd01KoudX1IyLvA== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /packages/siesta/resources/cert/key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIIjLz7YEWIrsGem2+YV8eJhHhetsjYIrjuqJLbdG7B3zoAoGCCqGSM49 3 | AwEHoUQDQgAECockYXUlTnnGyVODuV5Af4hqHW5wjqpnIbOE15hNz67+UqzQ4Tgw 4 | 76zlk18Ed/x663TXzsz3W+eGprvDzsKaIQ== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /packages/siesta/resources/dashboard/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/siesta/resources/dashboard/index.ts: -------------------------------------------------------------------------------- 1 | import { MediaBrowserWebSocketChild } from "../../src/rpc/media/MediaBrowserWebSocketChild.js" 2 | import { Dashboard } from "../../src/siesta/ui/Dashboard.js" 3 | 4 | 5 | // TODO move this inside the dashboard itself ? 6 | const connect = async (wsPort : number) => { 7 | const dashboard = Dashboard.new() 8 | 9 | const port = dashboard.connector 10 | 11 | const media = MediaBrowserWebSocketChild.new({ wsHost : '127.0.0.1', wsPort : wsPort }) 12 | 13 | port.media = media 14 | 15 | port.handshakeType = 'parent_first' 16 | 17 | await port.connect() 18 | } 19 | 20 | connect(Number(new URL(location.href).searchParams.get('port'))) 21 | -------------------------------------------------------------------------------- /packages/siesta/resources/docs_src/styling.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | line-height: 1.1em; 3 | } 4 | 5 | :root { 6 | --light-code-background: #eeeeee; 7 | } 8 | -------------------------------------------------------------------------------- /packages/siesta/resources/html_report/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/siesta/resources/images/readme_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/images/readme_header.png -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/css/material_icons.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Material Icons'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: url(../fonts/material_icons/material_icons_outlined.woff2); 6 | } 7 | 8 | .mdi { 9 | font-family: 'Material Icons'; 10 | font-weight: 100; 11 | font-style: normal; 12 | font-size: 24px; /* Preferred icon size */ 13 | display: inline-block; 14 | line-height: 1; 15 | text-transform: none; 16 | letter-spacing: normal; 17 | word-wrap: normal; 18 | white-space: nowrap; 19 | direction: ltr; 20 | vertical-align: text-bottom; 21 | 22 | /* Support for all WebKit browsers. */ 23 | -webkit-font-smoothing: antialiased; 24 | /* Support for Safari and Chrome. */ 25 | text-rendering: optimizeLegibility; 26 | 27 | /* Support for Firefox. */ 28 | -moz-osx-font-smoothing: grayscale; 29 | 30 | /* Support for IE. */ 31 | font-feature-settings: 'liga'; 32 | } 33 | 34 | /* Rules for sizing the icon. */ 35 | .mdi.md-18 { font-size: 18px; } 36 | .mdi.md-24 { font-size: 24px; } 37 | .mdi.md-36 { font-size: 36px; } 38 | .mdi.md-48 { font-size: 48px; } 39 | 40 | /* Rules for using icons as black on a light background. */ 41 | .mdi.md-dark { color: rgba(0, 0, 0, 0.54); } 42 | .mdi.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); } 43 | 44 | /* Rules for using icons as white on a dark background. */ 45 | .mdi.md-light { color: rgba(255, 255, 255, 1); } 46 | .mdi.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); } 47 | -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/css/reset.scss: -------------------------------------------------------------------------------- 1 | @use '../../../../node_modules/bulma/bulma.sass'; 2 | @use '../../common/_colors.scss' as *; 3 | @use './material_icons.scss'; 4 | 5 | @import '../fonts/fontawesome5/css/all.css'; 6 | 7 | html { 8 | width: 100%; 9 | height: 100%; 10 | } 11 | 12 | body { 13 | width: 100%; 14 | height: 100%; 15 | 16 | margin: 0; 17 | 18 | color: $deccent; 19 | background-color: #fefefe; 20 | 21 | font-weight: 100; 22 | } 23 | 24 | // region scrollbar 25 | ::-webkit-scrollbar { 26 | width: 0.7rem; 27 | height: 0.7rem; 28 | } 29 | 30 | ::-webkit-scrollbar-thumb { 31 | background: #e5e5e5; 32 | // think it looks cooler as square 33 | //border-radius: 0px; 34 | } 35 | 36 | ::-webkit-scrollbar-track { 37 | background: #fff; 38 | } 39 | // endregion 40 | 41 | 42 | @font-face { 43 | font-family: "JetBrains Mono"; 44 | src: url(../fonts/jetbrains_mono/JetBrainsMono-Light.woff2); 45 | } 46 | 47 | .input { 48 | border-radius: 0; 49 | height: 2.1em; 50 | 51 | &:active, &:focus { 52 | border-color: #b5b5b5 !important; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/attribution.js: -------------------------------------------------------------------------------- 1 | console.log(`Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com 2 | License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 3 | `) -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/css/brands.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face { 6 | font-family: 'Font Awesome 5 Brands'; 7 | font-style: normal; 8 | font-weight: 400; 9 | font-display: block; 10 | src: url("../webfonts/fa-brands-400.eot"); 11 | src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); } 12 | 13 | .fab { 14 | font-family: 'Font Awesome 5 Brands'; 15 | font-weight: 400; } 16 | -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/css/regular.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face { 6 | font-family: 'Font Awesome 5 Free'; 7 | font-style: normal; 8 | font-weight: 400; 9 | font-display: block; 10 | src: url("../webfonts/fa-regular-400.eot"); 11 | src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); } 12 | 13 | .far { 14 | font-family: 'Font Awesome 5 Free'; 15 | font-weight: 400; } 16 | -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/css/solid.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | @font-face { 6 | font-family: 'Font Awesome 5 Free'; 7 | font-style: normal; 8 | font-weight: 900; 9 | font-display: block; 10 | src: url("../webfonts/fa-solid-900.eot"); 11 | src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); } 12 | 13 | .fa, 14 | .fas { 15 | font-family: 'Font Awesome 5 Free'; 16 | font-weight: 900; } 17 | -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/fontawesome5/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Bold.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-BoldItalic.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-ExtraBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-ExtraBold.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-ExtraBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-ExtraBoldItalic.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-ExtraLight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-ExtraLight.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-ExtraLightItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-ExtraLightItalic.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Italic.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Light.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-LightItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-LightItalic.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Medium.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-MediumItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-MediumItalic.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Regular.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-Thin.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-ThinItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/jetbrains_mono/JetBrainsMono-ThinItalic.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/fonts/material_icons/material_icons_outlined.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/fonts/material_icons/material_icons_outlined.woff2 -------------------------------------------------------------------------------- /packages/siesta/resources/styling/browser/images/domcontainer-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/resources/styling/browser/images/domcontainer-bg.png -------------------------------------------------------------------------------- /packages/siesta/resources/styling/terminal/theme_accessible.scss: -------------------------------------------------------------------------------- 1 | @use "sass:color"; 2 | 3 | @use '../common/_colors.scss' as *; 4 | 5 | @use '_styling.scss'; 6 | -------------------------------------------------------------------------------- /packages/siesta/resources/styling/terminal/theme_dark.scss: -------------------------------------------------------------------------------- 1 | @use '_styling.scss'; 2 | -------------------------------------------------------------------------------- /packages/siesta/resources/styling/terminal/theme_light.scss: -------------------------------------------------------------------------------- 1 | @use "sass:color"; 2 | 3 | @use '../common/_colors.scss' as * with ( 4 | $primary_fail: color.scale(#e76f51, $saturation: 75%), 5 | $secondary_fail: color.scale(#f4a261, $saturation: 75%), 6 | $secondary_pass: color.scale(#e9c46a, $saturation: 75%), 7 | $primary_pass: color.scale(#2a9d8f, $saturation: 75%), 8 | $deccent: color.scale(#264653, $saturation: 75%), 9 | ); 10 | 11 | @use '_styling.scss'; 12 | -------------------------------------------------------------------------------- /packages/siesta/resources/styling/terminal/theme_universal.scss: -------------------------------------------------------------------------------- 1 | @use "sass:color"; 2 | 3 | @use '../common/_colors.scss' as * with ( 4 | $primary_fail: color.scale(#e76f51, $saturation: 75%), 5 | $secondary_fail: color.scale(#f4a261, $saturation: 75%), 6 | $secondary_pass: color.scale(#e9c46a, $saturation: 75%), 7 | $primary_pass: color.scale(#2a9d8f, $saturation: 75%), 8 | $deccent: color.scale(#264653, $saturation: 75%), 9 | ); 10 | 11 | @use '_styling.scss'; 12 | -------------------------------------------------------------------------------- /packages/siesta/scripts/build_sencha_tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # exit if any of command has failed 4 | set -e 5 | # enable **, ! in globs 6 | shopt -s globstar extglob 7 | 8 | DIR="$( cd "$( dirname "$0" )" && pwd )" 9 | cd "$DIR/.." 10 | 11 | #release="" 12 | #docs="" 13 | #embed_references="" 14 | #bundle="" 15 | # 16 | #while getopts "rdeb" opt; do 17 | # case "$opt" in 18 | # r) release="-d" 19 | # ;; 20 | # d) docs="true" 21 | # ;; 22 | # e) embed_references="true" 23 | # ;; 24 | # b) bundle="true" 25 | # ;; 26 | # esac 27 | #done 28 | 29 | echo ">> Building the Sencha testing app" 30 | 31 | ( 32 | cd tests_browser/sencha/@my-app 33 | npm i 34 | npm run build:testing 35 | ) 36 | -------------------------------------------------------------------------------- /packages/siesta/scripts/bundle.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # exit if any of command has failed 4 | set -e 5 | # enable **, ! in globs 6 | shopt -s globstar extglob 7 | 8 | DIR="$( cd "$( dirname "$0" )" && pwd )" 9 | cd "$DIR/.." 10 | 11 | BUNDLES_FOLDER="dist" 12 | 13 | clean="" 14 | 15 | while getopts "c" opt; do 16 | case "$opt" in 17 | c) clean="true" 18 | ;; 19 | esac 20 | done 21 | 22 | echo ">> Generating & embedding bundles with Rollup" 23 | 24 | rm -rf "$BUNDLES_FOLDER" && npx rollup -c 25 | 26 | rsync -I -r "$BUNDLES_FOLDER"/ ./ 27 | 28 | if [[ -n $clean ]]; then 29 | rm -rf "$BUNDLES_FOLDER" 30 | fi 31 | -------------------------------------------------------------------------------- /packages/siesta/scripts/bundle_html_report.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # TODO 4 | # right now, the bundle size for html report is pretty much the same as for the main distribution 5 | # somehow the launcher code is pulled in 6 | # need to reduce it, not critical though 7 | 8 | # exit if any of command has failed 9 | set -e 10 | # enable **, ! in globs 11 | shopt -s globstar extglob 12 | 13 | DIR="$( cd "$( dirname "$0" )" && pwd )" 14 | cd "$DIR/.." 15 | 16 | BUNDLES_FOLDER="dist_html_report" 17 | 18 | clean="" 19 | 20 | while getopts "c" opt; do 21 | case "$opt" in 22 | c) clean="true" 23 | ;; 24 | esac 25 | done 26 | 27 | echo ">> Generating & embedding HTML report bundles with Rollup" 28 | 29 | rm -rf "$BUNDLES_FOLDER" && npx rollup -c htmlreport.rollup.config.js 30 | 31 | rm -rf "./resources/html_report/dist/" 32 | 33 | rsync -I -r "$BUNDLES_FOLDER"/ ./resources/html_report/dist/ 34 | 35 | if [[ -n $clean ]]; then 36 | rm -rf "$BUNDLES_FOLDER" 37 | fi 38 | -------------------------------------------------------------------------------- /packages/siesta/scripts/changelog.cjs: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | 4 | const prependZero = (int, minLength) => { 5 | const str = String(int) 6 | 7 | return '0000000'.slice(0, minLength - str.length) + str 8 | } 9 | 10 | const defaultVersion = require('../package.json').version 11 | 12 | const updateVersion = (newVersion) => { 13 | const versionTime = new Date() 14 | const changelog = fs.readFileSync('CHANGELOG.md', 'utf8') 15 | 16 | const lines = changelog.split('\n') 17 | 18 | const version = newVersion || defaultVersion 19 | 20 | lines.splice(2, 0, getVersionStr(version, versionTime), '') 21 | 22 | fs.writeFileSync('CHANGELOG.md', lines.join('\n'), 'utf8') 23 | } 24 | 25 | const getVersionStr = (version, now) => { 26 | return `## ${version} ${ now.getFullYear() }-${ prependZero(now.getMonth() + 1, 2) }-${ prependZero(now.getDate(), 2) } ${ prependZero(now.getHours(), 2) }:${ prependZero(now.getMinutes(), 2) }` 27 | } 28 | 29 | module.exports = { 30 | updateVersion 31 | } 32 | -------------------------------------------------------------------------------- /packages/siesta/scripts/do_release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # TODOs: 4 | # - change the guide URL in the examples/*/README.md 5 | # - exclude examples/*/node_modules from npm package 6 | # - clear the *.js files from Deno example (they are gets compiled by IDE) 7 | 8 | # exit if any of command has failed 9 | set -e 10 | 11 | DIR="$( cd "$( dirname "$0" )" && pwd )" 12 | . "$DIR"/util.sh 13 | 14 | cd "$DIR/.." 15 | 16 | echo ">> Running pre-release tests" 17 | 18 | scripts/run_tests.sh 19 | 20 | echo ">> Starting the publication" 21 | 22 | scripts/publish.sh 23 | -------------------------------------------------------------------------------- /packages/siesta/scripts/make_dist.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # exit if any of command has failed 4 | set -e 5 | 6 | DIR="$( cd "$( dirname "$0" )" && pwd )" 7 | . "$DIR"/util.sh 8 | 9 | ignore_changes="" 10 | name="DIST" 11 | 12 | while getopts "in:" opt; do 13 | case "$opt" in 14 | n) name="$OPTARG" 15 | ;; 16 | i) ignore_changes="true" 17 | ;; 18 | esac 19 | done 20 | 21 | if [[ -z $ignore_changes ]]; then 22 | exit_if_git_repo_has_changes "$DIR/.." 23 | fi 24 | 25 | #-------------------------------------------------------------- 26 | 27 | DIST="$DIR/../$name" 28 | 29 | echo ">> Making clean checkout in $DIST" 30 | 31 | rm -rf "$DIST" 32 | 33 | git worktree prune 34 | 35 | git worktree add "$DIST" --no-checkout --detach 36 | 37 | ( 38 | cd "$DIST" 39 | 40 | git checkout HEAD 41 | 42 | rm -rf "$DIST/.git" "$DIST/misc" "$DIST/scripts/make_dist.sh" 43 | 44 | ln -s "$DIR/../node_modules" "node_modules" 45 | ) 46 | 47 | -------------------------------------------------------------------------------- /packages/siesta/scripts/publish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # exit if any of command has failed 4 | set -e 5 | 6 | DIR="$( cd "$( dirname "$0" )" && pwd )" 7 | cd "$DIR/.." 8 | 9 | if [[ -z "$V" ]]; then 10 | echo ">> No value for V env variable" 11 | exit 1 12 | fi 13 | 14 | # bump version in distribution - won't be reflected in main repo, since "make_dist" removes the ".git" 15 | NEW_VERSION=$(npm --no-git-tag-version version $V) 16 | 17 | node -e "require('./scripts/changelog.cjs').updateVersion('$NEW_VERSION')" 18 | 19 | # TODO do we need the `package-lock.json` file for end-users? or its only for developers? 20 | git add CHANGELOG.md package.json #package-lock.json 21 | git commit -m "Updated version" 22 | 23 | git tag "$NEW_VERSION" 24 | 25 | pnpm publish --access public --no-git-checks 26 | 27 | #pnpm pack 28 | 29 | #--------------------------------------------------------------------------------- 30 | # post-publish steps 31 | git push origin HEAD --tags 32 | 33 | scripts/publish_docs.sh "./docs" 34 | -------------------------------------------------------------------------------- /packages/siesta/scripts/publish_docs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # exit if any of command has failed 4 | set -e 5 | 6 | DIR="$( cd "$( dirname "$0" )" && pwd )" 7 | 8 | if [[ -z $1 ]]; then 9 | echo ">> No path to docs given" 10 | 11 | exit 1 12 | fi 13 | 14 | DOCS="$( cd "$1" && pwd )" 15 | 16 | DIST_DOCS="$DIR/../DIST_DOCS" 17 | 18 | rm -rf "$DIST_DOCS" 19 | 20 | git worktree prune 21 | 22 | git worktree add "$DIST_DOCS" gh-pages 23 | 24 | cd $DIST_DOCS 25 | 26 | # the following happens inside the docs checkout dir 27 | #------------------------------------ 28 | 29 | git pull 30 | 31 | rm -rf "$DIST_DOCS/docs" 32 | 33 | cp -r "$DOCS" "$DIST_DOCS/docs" 34 | 35 | git add -A || true 36 | 37 | git commit -a -m "Docs updated" || true 38 | 39 | git push 40 | 41 | git worktree remove "$DIST_DOCS" 42 | 43 | echo ">> Successfully updated github pages" 44 | -------------------------------------------------------------------------------- /packages/siesta/scripts/util.sh: -------------------------------------------------------------------------------- 1 | git_repo_has_changes() ( 2 | ( 3 | cd "$1" 4 | 5 | if [[ `git status --porcelain` ]]; then 6 | echo 'true' 7 | else 8 | echo 'false' 9 | fi 10 | ) 11 | ) 12 | 13 | 14 | exit_if_git_repo_has_changes() ( 15 | if [[ $(git_repo_has_changes "$1") == 'true' ]]; then 16 | echo ">> Repository has changes, exit" 17 | exit 1 18 | fi 19 | ) 20 | 21 | 22 | dependency_repo_is_on_released_tag() ( 23 | ( 24 | cd "$1" 25 | 26 | if [ ! -f "package.json" ]; then 27 | echo '>> `dependency_repo_is_on_released_tag` should be pointed to the package root (folder with `package.json`)' 28 | exit 1 29 | fi 30 | 31 | VERSION=$(node -e "console.log(require('./package.json').version)") 32 | TAG=$(git describe --tag) 33 | 34 | if [[ "v$VERSION" == "$TAG" ]]; then 35 | dummy=1 36 | else 37 | echo ">> Package at $(pwd) has unpublished commits" 38 | exit 1 39 | fi 40 | ) 41 | ) 42 | -------------------------------------------------------------------------------- /packages/siesta/scripts/web_install.ts: -------------------------------------------------------------------------------- 1 | import { install } from 'esinstall' 2 | 3 | await install([ 'minimatch' ], { polyfillNode : true }) 4 | -------------------------------------------------------------------------------- /packages/siesta/sencha.ts: -------------------------------------------------------------------------------- 1 | export { TestSencha, TestSencha as TestBrowser, TestSencha as Test, it, iit, xit, describe, ddescribe, xdescribe } from "./src/siesta/sencha/TestSencha.js" 2 | 3 | export { beforeEach, afterEach, expect } from "./src/siesta/test/Test.js" 4 | 5 | export { ProjectSencha, ProjectSencha as ProjectBrowser, ProjectSencha as Project } from "./src/siesta/sencha/ProjectSencha.js" 6 | -------------------------------------------------------------------------------- /packages/siesta/src/class/Base.ts: -------------------------------------------------------------------------------- 1 | export { Base } from 'typescript-mixin-class/index.js' 2 | -------------------------------------------------------------------------------- /packages/siesta/src/class/Mixin.ts: -------------------------------------------------------------------------------- 1 | export * from 'typescript-mixin-class/index.js' 2 | -------------------------------------------------------------------------------- /packages/siesta/src/compare_deep/DeepDiff.scss: -------------------------------------------------------------------------------- 1 | @use "sass:color"; 2 | @use '../../resources/styling/common/_colors.scss' as *; 3 | 4 | // 5 | // simplified TextJSX CSS in this file (class-name only selectors) 6 | // 7 | 8 | .diff-atomic-not-same { 9 | color : $secondary_pass_darker; 10 | } 11 | 12 | .diff-not-same { 13 | //color : color.scale($gray, $lightness: -75%); 14 | // this styling is the only thing that works best for highlighting text 15 | // both for dark/light modes 16 | // so its preferable over the "absolute" color 17 | font-weight: bolder; 18 | } 19 | 20 | .diff-same { 21 | color : color.scale($gray, $lightness: 15%); 22 | } 23 | 24 | .diff-only-in-1 { 25 | color : $primary_fail; 26 | } 27 | 28 | .diff-only-in-2 { 29 | color : $primary_pass; 30 | } 31 | 32 | // text-only class 33 | .diff-hetero { 34 | color : $secondary_pass_darker; 35 | } 36 | 37 | // text-only class 38 | .diff-fuzzy { 39 | color : inherit; 40 | font-weight: bolder; 41 | } 42 | -------------------------------------------------------------------------------- /packages/siesta/src/compare_deep/DeepDiffXmlRendererDifference.ts: -------------------------------------------------------------------------------- 1 | import { CI } from "chained-iterator" 2 | import { ClassUnion, Mixin } from "typescript-mixin-class" 3 | import { XmlElement } from "../jsx/XmlElement.js" 4 | import { XmlRendererSerial } from "../serializer/SerialRendering.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | export class XmlRendererDifference extends Mixin( 9 | [ XmlRendererSerial ], 10 | (base : ClassUnion) => 11 | 12 | class XmlRendererDifference extends base { 13 | 14 | prettyPrint : boolean = true 15 | 16 | 17 | initialize (props? : Partial) { 18 | super.initialize(props) 19 | 20 | this.blockLevelElements.add('diff-entry') 21 | this.blockLevelElements.add('diff-inner') 22 | } 23 | 24 | 25 | getElementClass (el : XmlElement) : string { 26 | const insideHetero = CI(el.parentAxis()).some(el => el.tagName === 'diff-hetero') 27 | const insideFuzzyObject = CI(el.parentAxis()).some(el => el.hasClass('diff-fuzzy-object-only-in-1-entry')) 28 | 29 | return el.class + (insideHetero ? ' diff-hetero' : '') + (insideFuzzyObject ? ' diff-fuzzy' : '') 30 | } 31 | } 32 | ){} 33 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/auto_waiting/auto_waiting.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Auto waiting 3 | */ 4 | 5 | /** 6 | * [[include:auto_waiting/auto_waiting.md]] 7 | */ 8 | export const AutoWaitingGuide = '' 9 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/code_coverage/code_coverage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/src/guides/code_coverage/code_coverage.jpg -------------------------------------------------------------------------------- /packages/siesta/src/guides/code_coverage/code_coverage.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Code coverage 3 | */ 4 | /** 5 | * [[include:code_coverage/code_coverage.md]] 6 | */ 7 | export const CodeCoverageGuide = '' 8 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/getting_started_browser/getting_started_browser.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Getting started browser 3 | */ 4 | /** 5 | * [[include:getting_started_browser/getting_started_browser.md]] 6 | */ 7 | export const GettingStartedBrowserGuide = '' 8 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/getting_started_browser/getting_started_browser_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/src/guides/getting_started_browser/getting_started_browser_1.jpg -------------------------------------------------------------------------------- /packages/siesta/src/guides/getting_started_deno/getting_started_deno.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Getting started Deno 3 | */ 4 | /** 5 | * [[include:getting_started_deno/getting_started_deno.md]] 6 | */ 7 | export const GettingStartedDenoGuide = '' 8 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/getting_started_deno/getting_started_deno_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/src/guides/getting_started_deno/getting_started_deno_1.jpg -------------------------------------------------------------------------------- /packages/siesta/src/guides/getting_started_nodejs/getting_started_nodejs.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Getting started Node.js 3 | */ 4 | /** 5 | * [[include:getting_started_nodejs/getting_started_nodejs.md]] 6 | */ 7 | export const GettingStartedNodejsGuide = '' 8 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/getting_started_nodejs/getting_started_nodejs_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/src/guides/getting_started_nodejs/getting_started_nodejs_1.jpg -------------------------------------------------------------------------------- /packages/siesta/src/guides/getting_started_sencha/getting_started_sencha.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Getting started Sencha 3 | */ 4 | /** 5 | * [[include:getting_started_sencha/getting_started_sencha.md]] 6 | */ 7 | export const GettingStartedSenchaGuide = '' 8 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/getting_started_sencha/getting_started_sencha_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/src/guides/getting_started_sencha/getting_started_sencha_1.jpg -------------------------------------------------------------------------------- /packages/siesta/src/guides/key_names/key_names.md: -------------------------------------------------------------------------------- 1 | The names of the special keys 2 | ============ 3 | 4 | - `BACKSPACE` 5 | 6 | - `TAB` 7 | 8 | - `ENTER` (`RETURN`) 9 | - `SPACE` 10 | 11 | - `SHIFT` 12 | - `CTRL` 13 | - `ALT` 14 | - `META` (`CMD`) 15 | 16 | - `PAUSE-BREAK` 17 | - `CAPS` 18 | - `ESCAPE` (`ESC`) 19 | - `NUM-LOCK` 20 | - `SCROLL-LOCK` 21 | - `PRINT` 22 | 23 | - `PAGE-UP` 24 | - `PAGE-DOWN` 25 | - `END` 26 | - `HOME` 27 | - `LEFT` 28 | - `UP` 29 | - `RIGHT` 30 | - `DOWN` 31 | - `INSERT` 32 | - `DELETE` 33 | 34 | - `NUM0` 35 | - `NUM1` 36 | - `NUM2` 37 | - `NUM3` 38 | - `NUM4` 39 | - `NUM5` 40 | - `NUM6` 41 | - `NUM7` 42 | - `NUM8` 43 | - `NUM9` 44 | 45 | - `F1` 46 | - `F2` 47 | - `F3` 48 | - `F4` 49 | - `F5` 50 | - `F6` 51 | - `F7` 52 | - `F8` 53 | - `F9` 54 | - `F10` 55 | - `F11` 56 | - `F12` 57 | 58 | 59 | COPYRIGHT AND LICENSE 60 | ================= 61 | 62 | MIT License 63 | 64 | Copyright (c) 2009-2021 Bryntum, Nickolay Platonov 65 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/key_names/key_names.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Special key names 3 | */ 4 | 5 | /** 6 | * [[include:key_names/key_names.md]] 7 | */ 8 | export const KeyNamesGuide = '' 9 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/reports/reports.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/src/guides/reports/reports.jpg -------------------------------------------------------------------------------- /packages/siesta/src/guides/reports/reports.md: -------------------------------------------------------------------------------- 1 | Generating reports 2 | ================== 3 | 4 | You can export the results of running a test suite in a structured format. To do that, provide the `--report-format` and `--report-file` options to the launcher. Supported formats are `html`, `json`, and `junit`. These options can be repeated several times, to generate several reports. 5 | Default format is `json`. 6 | 7 | JSON report creates a single JSON file, fully describing the execution of the test suite. 8 | 9 | HTML report is a small, self-contained web-application, which can be used to examine test suite execution results 10 | in the browser. When using HTML report, the `--report-file` option actually specifies the *directory* for files 11 | (as this report consists from several files). 12 | 13 | For example, to generate JSON report, assuming your Siesta project file is `index.js`: 14 | 15 | ```shell 16 | > node index.js --report-file report.json 17 | ``` 18 | 19 | Or, to generate HTML report: 20 | 21 | ```shell 22 | > node index.js --report-file html_report --report-format html 23 | ``` 24 | 25 | After generation, open the `html_report/index.html` file in the browser, you should see something like: 26 | 27 | ![HTML report UI](media://reports/reports.jpg) 28 | 29 | 30 | COPYRIGHT AND LICENSE 31 | ================= 32 | 33 | MIT License 34 | 35 | Copyright (c) 2009-2021 Bryntum, Nickolay Platonov 36 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/reports/reports.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Reports 3 | */ 4 | /** 5 | * [[include:reports/reports.md]] 6 | */ 7 | export const ReportsGuide = '' 8 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/siesta_project/siesta_project.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Siesta project 3 | */ 4 | /** 5 | * [[include:siesta_project/siesta_project.md]] 6 | */ 7 | export const SiestaProjectGuide = '' 8 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/siesta_test_advanced/siesta_test_advanced.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Testing advanced 3 | */ 4 | /** 5 | * [[include:siesta_test_advanced/siesta_test_advanced.md]] 6 | */ 7 | export const SiestaTestAdvancedGuide = '' 8 | -------------------------------------------------------------------------------- /packages/siesta/src/guides/siesta_test_basics/siesta_test_basics.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module Guide: Testing basics 3 | */ 4 | /** 5 | * [[include:siesta_test_basics/siesta_test_basics.md]] 6 | */ 7 | export const SiestaTestBasicsGuide = '' 8 | -------------------------------------------------------------------------------- /packages/siesta/src/iterator/Iterator.ts: -------------------------------------------------------------------------------- 1 | export * from 'chained-iterator/index.js' 2 | -------------------------------------------------------------------------------- /packages/siesta/src/jsx/ColorerDeno.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | import chalk from "https://deno.land/x/chalk_deno@v4.1.1-deno/source/index.js" 3 | import { Colorer } from "./Colorer.js" 4 | 5 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6 | export class ColorerDeno extends Colorer { 7 | currentChalk : any = chalk 8 | 9 | 10 | deriveColorerViaMethod (method : string, ...args : unknown[]) : Colorer { 11 | return ColorerDeno.new({ currentChalk : this.currentChalk[ method ](...args) }) 12 | } 13 | 14 | 15 | deriveColorerViaProperty (styleName : string) : Colorer { 16 | return ColorerDeno.new({ currentChalk : this.currentChalk[ styleName ] }) 17 | } 18 | 19 | 20 | text (text : string) : string { 21 | return this.currentChalk(text) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/siesta/src/jsx/ColorerNodejs.ts: -------------------------------------------------------------------------------- 1 | import chalk from "chalk" 2 | import { Colorer } from "./Colorer.js" 3 | 4 | 5 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6 | export class ColorerNodejs extends Colorer { 7 | currentChalk : any = chalk 8 | 9 | 10 | deriveColorerViaMethod (method : string, ...args : unknown[]) : Colorer { 11 | return ColorerNodejs.new({ currentChalk : this.currentChalk[ method ](...args) }) 12 | } 13 | 14 | 15 | deriveColorerViaProperty (styleName : string) : Colorer { 16 | return ColorerNodejs.new({ currentChalk : this.currentChalk[ styleName ] }) 17 | } 18 | 19 | 20 | text (text : string) : string { 21 | return this.currentChalk(text) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/siesta/src/jsx/ColorerNoop.ts: -------------------------------------------------------------------------------- 1 | import { Colorer } from "./Colorer.js" 2 | 3 | 4 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5 | export class ColorerNoop extends Colorer { 6 | 7 | deriveColorerViaMethod (method : string, ...args : unknown[]) : Colorer { 8 | return this 9 | } 10 | 11 | 12 | deriveColorerViaProperty (styleName : string) : Colorer { 13 | return this 14 | } 15 | 16 | 17 | text (text : string) : string { 18 | return text 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/siesta/src/jsx/UL.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../class/Mixin.js" 2 | import { serializable } from "../serializable/Serializable.js" 3 | import { XmlElement } from "./XmlElement.js" 4 | import { XmlRendererStreaming } from "./XmlRenderer.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | @serializable({ id : 'ULStreamed' }) 9 | export class ULStreamed extends Mixin( 10 | [ XmlElement ], 11 | (base : ClassUnion) => 12 | 13 | class UL extends base { 14 | tagName : string = 'ul' 15 | 16 | 17 | childCustomIndentation (renderer : XmlRendererStreaming, child : XmlElement) : string[] { 18 | if (child.tagName.toLowerCase() !== 'li') return undefined 19 | 20 | const indentLevel = renderer.indentLevel 21 | 22 | return [ 23 | ' '.repeat(indentLevel), 24 | ' '.repeat(indentLevel - 2) + '· ' 25 | ] 26 | } 27 | } 28 | ) {} 29 | 30 | -------------------------------------------------------------------------------- /packages/siesta/src/logger/LoggerConsole.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../class/Mixin.js" 2 | import { Logger, LogMethod } from "./Logger.js" 3 | 4 | 5 | export class LoggerConsole extends Mixin( 6 | [ Logger ], 7 | (base : ClassUnion) => 8 | 9 | class LoggerConsole extends base { 10 | printLogMessage (method : LogMethod, ...message : unknown[]) { 11 | console[ method ](...message) 12 | } 13 | } 14 | ){} 15 | -------------------------------------------------------------------------------- /packages/siesta/src/logger/LoggerHookable.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../class/Mixin.js" 2 | import { Hook } from "../hook/Hook.js" 3 | import { Logger, LogMethod } from "./Logger.js" 4 | 5 | 6 | export class LoggerHookable extends Mixin( 7 | [ Logger ], 8 | (base : ClassUnion) => 9 | 10 | class LoggerHookable extends base { 11 | 12 | onLogMessageHook : Hook<[ method : LogMethod, message : unknown[] ]> = new Hook() 13 | 14 | 15 | printLogMessage (method : LogMethod, ...message : string[]) { 16 | this.onLogMessageHook.trigger(method, message) 17 | } 18 | } 19 | ){} 20 | -------------------------------------------------------------------------------- /packages/siesta/src/rpc/media/Media.ts: -------------------------------------------------------------------------------- 1 | import { AnyConstructor, Mixin } from "../../class/Mixin.js" 2 | import { EnvelopCall, EnvelopResult, Port } from "../port/Port.js" 3 | 4 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5 | export class Media extends Mixin( 6 | [], 7 | (base : AnyConstructor) => 8 | 9 | class Media extends base { 10 | port : Port = undefined 11 | 12 | 13 | async doConnect () : Promise { 14 | throw "Abstract method `doConnect`" 15 | } 16 | 17 | 18 | async doDisconnect () : Promise { 19 | throw "Abstract method `doDisconnect`" 20 | } 21 | 22 | 23 | messageToEnvelop (message : unknown) : EnvelopCall | EnvelopResult | undefined { 24 | throw "Abstract method `messageToEnvelop`" 25 | } 26 | 27 | 28 | envelopToMessage (envelop : EnvelopCall | EnvelopResult) : unknown { 29 | throw "Abstract method `envelopToMessage`" 30 | } 31 | 32 | 33 | sendMessage (message : unknown) { 34 | throw "Abstract method `sendMessage`" 35 | } 36 | 37 | 38 | sendEnvelop (envelop : EnvelopCall | EnvelopResult) { 39 | this.sendMessage(this.envelopToMessage(envelop)) 40 | } 41 | 42 | 43 | receiveMessage (message : any) { 44 | this.port.receiveEnvelop(this.messageToEnvelop(message)) 45 | } 46 | } 47 | ) {} 48 | -------------------------------------------------------------------------------- /packages/siesta/src/serializable/Serializable.ts: -------------------------------------------------------------------------------- 1 | export * from 'typescript-serializable-mixin/index.js' 2 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/common/IsolationLevel.ts: -------------------------------------------------------------------------------- 1 | export type IsolationLevel = 'none' | 'context' | 'process' | 'iframe' | 'page' | 'browser' | 'webworker' 2 | 3 | export type SimulationType = 'native' | 'synthetic' 4 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/common/LUID.ts: -------------------------------------------------------------------------------- 1 | // locally unique identifier 2 | 3 | export type LUID = number 4 | 5 | let ID : LUID = 0 6 | 7 | export const luid = () : LUID => ID++ 8 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/context/ContextBrowser.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../class/Mixin.js" 2 | import { preLaunchTest } from "../test/port/LaunchTest.js" 3 | import { TestDescriptor } from "../test/TestDescriptor.js" 4 | import { Context } from "./Context.js" 5 | 6 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7 | export class ContextBrowser extends Mixin( 8 | [ Context ], 9 | (base : ClassUnion) => 10 | 11 | class ContextBrowser extends base { 12 | 13 | async navigate (url : string) { 14 | throw new Error("Abstract method") 15 | } 16 | 17 | 18 | async preLaunchTest (desc : TestDescriptor, testDescriptorStr : string, delayStart : number = 0) : Promise { 19 | // the newly opened page is at "about:blank" url, which is not what people usually assume 20 | // for example the Vite HMR mechanism fails on such urls 21 | // another thing is that it seems, for "about:blank" pages you can't make dynamic imports 22 | // (not a module context?) 23 | // anyway, to solve this, we need to navigate to some url, which is in the test's address space 24 | // the only reliable url we have is the test file itself 25 | // await this.navigate(url) 26 | 27 | return await this.evaluateBasic(preLaunchTest, desc.urlAbs, testDescriptorStr, delayStart) 28 | } 29 | } 30 | ) {} 31 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/context/context_provider/ContextProviderDenoWorker.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../../class/Mixin.js" 2 | import { TestDescriptorDeno } from "../../test/TestDescriptorDeno.js" 3 | import { ContextDenoWorker } from "../ContextDenoWorker.js" 4 | import { ContextProvider } from "./ContextProvider.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | export class ContextProviderDenoWorker extends Mixin( 9 | [ ContextProvider ], 10 | (base : ClassUnion) => 11 | 12 | class ContextProviderDenoWorker extends base { 13 | supportsDeno : boolean = true 14 | 15 | contextClass : typeof ContextDenoWorker = ContextDenoWorker 16 | 17 | 18 | async doCreateContext (desc? : TestDescriptorDeno) : Promise> { 19 | const worker = new Worker( 20 | new URL("./deno_worker_seed.js", import.meta.url).href, 21 | { 22 | type : "module", 23 | // @ts-ignore 24 | deno : { 25 | namespace : true 26 | } 27 | } 28 | ) 29 | 30 | return this.contextClass.new({ worker }) as InstanceType 31 | } 32 | 33 | static providerName : string = 'deno' 34 | } 35 | ) {} 36 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/context/context_provider/ContextProviderSameContext.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../../class/Mixin.js" 2 | import { TestDescriptor } from "../../test/TestDescriptor.js" 3 | import { ContextSameContext } from "../ContextSameContext.js" 4 | import { ContextProvider } from "./ContextProvider.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | export class ContextProviderSameContext extends Mixin( 9 | [ ContextProvider ], 10 | (base : ClassUnion) => 11 | 12 | class ContextProviderSameContext extends base { 13 | supportsBrowser : boolean = true 14 | supportsNodejs : boolean = true 15 | 16 | contextClass : typeof ContextSameContext = ContextSameContext 17 | 18 | 19 | async doCreateContext (desc? : TestDescriptor) : Promise> { 20 | return this.contextClass.new() as InstanceType 21 | } 22 | 23 | static providerName : string = 'samecontext' 24 | } 25 | ) {} 26 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/context/context_provider/ContextProviderTargetBrowser.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../../class/Mixin.js" 2 | import { ContextBrowser } from "../ContextBrowser.js" 3 | import { ContextProvider } from "./ContextProvider.js" 4 | 5 | 6 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7 | export class ContextProviderTargetBrowser extends Mixin( 8 | [ ContextProvider ], 9 | (base : ClassUnion) => 10 | 11 | class ContextProviderTargetBrowser extends base { 12 | contextClass : typeof ContextBrowser = ContextBrowser 13 | } 14 | ) {} 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/context/context_provider/deno_worker_seed.ts: -------------------------------------------------------------------------------- 1 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2 | type DedicatedWorkerGlobalScope = any 3 | 4 | declare const self : DedicatedWorkerGlobalScope 5 | 6 | // poor-man, zero-dep `evaluate` handler 7 | self.addEventListener('message', async event => { 8 | if (event.data.__SIESTA_CONTEXT_EVALUATE_REQUEST__) { 9 | const func = globalThis.eval('(' + event.data.functionSource + ')') 10 | 11 | try { 12 | const result = await func(...event.data.arguments) 13 | 14 | self.postMessage({ __SIESTA_CONTEXT_EVALUATE_RESPONSE__ : true, status : 'resolved', result }) 15 | } catch (rejected) { 16 | const stack = String(rejected.stack || '') 17 | const message = String(rejected.message || '') 18 | 19 | self.postMessage({ __SIESTA_CONTEXT_EVALUATE_RESPONSE__ : true, status : 'rejected', result : { stack, message } }) 20 | } 21 | } 22 | }) 23 | 24 | 25 | export {} 26 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/launcher/LauncherError.tsx: -------------------------------------------------------------------------------- 1 | import { Base, ClassUnion, Mixin } from "typescript-mixin-class" 2 | import { Serializable, serializable } from "typescript-serializable-mixin" 3 | import { XmlElement } from "../../jsx/XmlElement.js" 4 | import { ExitCodes } from "./Types.js" 5 | 6 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7 | @serializable({ id : 'LauncherError' }) 8 | export class LauncherError extends Mixin( 9 | [ Serializable, Base ], 10 | (base : ClassUnion) => 11 | 12 | class LauncherError extends base { 13 | message : string = undefined 14 | 15 | annotation : XmlElement = undefined 16 | 17 | exitCode : ExitCodes = undefined 18 | } 19 | ) {} 20 | 21 | 22 | export class LauncherRestartOnCodeCoverage extends Error { 23 | } 24 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/project/ProjectDeno.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../class/Mixin.js" 2 | import { EnvironmentType } from "../common/Environment.js" 3 | import { Runtime } from "../runtime/Runtime.js" 4 | import { RuntimeDeno } from "../runtime/RuntimeDeno.js" 5 | import { TestDescriptorDeno } from "../test/TestDescriptorDeno.js" 6 | import { Project } from "./Project.js" 7 | import { ProjectDescriptorDeno } from "./ProjectDescriptor.js" 8 | import { ProjectTerminal } from "./ProjectTerminal.js" 9 | 10 | 11 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12 | /** 13 | * Siesta project for [Deno](https://deno.land/) code. 14 | */ 15 | export class ProjectDeno extends Mixin( 16 | [ Project, ProjectDescriptorDeno, ProjectTerminal ], 17 | (base : ClassUnion) => 18 | 19 | class ProjectDeno extends base { 20 | type : EnvironmentType = 'deno' 21 | 22 | testDescriptorClass : typeof TestDescriptorDeno = TestDescriptorDeno 23 | runtimeClass : typeof Runtime = RuntimeDeno 24 | } 25 | ) {} 26 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/project/ProjectDescriptorBrowser.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "typescript-mixin-class" 2 | import { serializable } from "typescript-serializable-mixin" 3 | import { TestDescriptorBrowser } from "../test/TestDescriptorBrowser.js" 4 | import { ProjectDescriptor } from "./ProjectDescriptor.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | // ProjectDescriptorBrowser has to reside in its own file to not mix the browser/non-browser 9 | // compilation sets (required for declaration files support) 10 | @serializable({ id : 'ProjectDescriptorBrowser', mode : 'optIn' }) 11 | export class ProjectDescriptorBrowser extends Mixin( 12 | [ ProjectDescriptor ], 13 | (base : ClassUnion) => 14 | 15 | class ProjectDescriptorBrowser extends base { 16 | testDescriptor : Partial 17 | } 18 | ) {} 19 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/project/ProjectNodejs.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../class/Mixin.js" 2 | import { EnvironmentType } from "../common/Environment.js" 3 | import { Runtime } from "../runtime/Runtime.js" 4 | import { RuntimeNodejs } from "../runtime/RuntimeNodejs.js" 5 | import { TestDescriptorNodejs } from "../test/TestDescriptorNodejs.js" 6 | import { Project } from "./Project.js" 7 | import { ProjectDescriptorNodejs } from "./ProjectDescriptor.js" 8 | import { ProjectTerminal } from "./ProjectTerminal.js" 9 | 10 | 11 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12 | /** 13 | * Siesta project for [Node.js](https://nodejs.org/) code. 14 | */ 15 | export class ProjectNodejs extends Mixin( 16 | [ Project, ProjectDescriptorNodejs, ProjectTerminal ], 17 | (base : ClassUnion) => 18 | 19 | class ProjectNodejs extends base { 20 | type : EnvironmentType = 'nodejs' 21 | 22 | testDescriptorClass : typeof TestDescriptorNodejs = TestDescriptorNodejs 23 | runtimeClass : typeof Runtime = RuntimeNodejs 24 | } 25 | ) {} 26 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/react/ProjectDescriptorReact.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "typescript-mixin-class" 2 | import { serializable } from "typescript-serializable-mixin" 3 | import { ProjectDescriptorBrowser } from "../project/ProjectDescriptorBrowser.js" 4 | import { TestDescriptorReact } from "./TestDescriptorReact.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | @serializable({ id : 'ProjectDescriptorReact', mode : 'optIn' }) 9 | export class ProjectDescriptorReact extends Mixin( 10 | [ ProjectDescriptorBrowser ], 11 | (base : ClassUnion) => 12 | 13 | class ProjectDescriptorReact extends base { 14 | testDescriptor : Partial 15 | } 16 | ) {} 17 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/react/ProjectReact.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../class/Mixin.js" 2 | import { ProjectBrowser } from "../project/ProjectBrowser.js" 3 | import { ProjectDescriptorReact } from "./ProjectDescriptorReact.js" 4 | import { TestDescriptorReact } from "./TestDescriptorReact.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | /** 9 | * Siesta project for React code. 10 | */ 11 | export class ProjectReact extends Mixin( 12 | [ ProjectBrowser, ProjectDescriptorReact ], 13 | (base : ClassUnion) => 14 | 15 | class ProjectReact extends base { 16 | testDescriptorClass : typeof TestDescriptorReact = TestDescriptorReact 17 | } 18 | ) {} 19 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/react/TestDescriptorReact.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "typescript-mixin-class" 2 | import { serializable } from "typescript-serializable-mixin" 3 | import { TestDescriptorBrowser } from "../test/TestDescriptorBrowser.js" 4 | 5 | 6 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7 | /** 8 | * Test descriptor class for tests running in the browser environment. 9 | */ 10 | @serializable({ id : 'TestDescriptorReact' }) 11 | export class TestDescriptorReact extends Mixin( 12 | [ TestDescriptorBrowser ], 13 | (base : ClassUnion) => 14 | 15 | class TestDescriptorReact extends base { 16 | } 17 | ){} 18 | 19 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/reporter/ReporterBrowser.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../class/Mixin.js" 2 | import { saneSplit } from "../../util/Helpers.js" 3 | import { TestNodeResultReactive } from "../test/TestResultReactive.js" 4 | import { Reporter } from "./Reporter.js" 5 | 6 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7 | export class ReporterBrowser extends Mixin( 8 | [ Reporter ], 9 | (base : ClassUnion) => 10 | 11 | class ReporterBrowser extends base { 12 | 13 | override print (str : string) { 14 | console.log(str) 15 | } 16 | 17 | 18 | override async fetchSources (url : string) : Promise { 19 | const text = await (await fetch(url)).text() 20 | 21 | return saneSplit(text, '\n') 22 | } 23 | 24 | 25 | async onSubTestFinish (testNode : TestNodeResultReactive) { 26 | // do nothing - suppress the text output to console 27 | } 28 | } 29 | ) {} 30 | 31 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/reporter/ReporterDeno.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../class/Mixin.js" 2 | import { saneSplit } from "../../util/Helpers.js" 3 | import { Reporter } from "./Reporter.js" 4 | 5 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6 | declare const Deno : any 7 | 8 | 9 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10 | export class ReporterDeno extends Mixin( 11 | [ Reporter ], 12 | (base : ClassUnion) => 13 | 14 | class ReporterDeno extends base { 15 | 16 | async fetchSources (url : string) : Promise { 17 | try { 18 | if (/^http/.test(url)) { 19 | const text = await (await fetch(url)).text() 20 | 21 | return saneSplit(text, '\n') 22 | } else { 23 | const text = await Deno.readTextFile(url) 24 | 25 | return text ? saneSplit(text, '\n') : undefined 26 | } 27 | } catch (e) { 28 | return undefined 29 | } 30 | } 31 | } 32 | ) {} 33 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/reporter/ReporterNodejs.ts: -------------------------------------------------------------------------------- 1 | import fs from "fs" 2 | import fetch from "node-fetch" 3 | import { ClassUnion, Mixin } from "../../class/Mixin.js" 4 | import { saneSplit } from "../../util/Helpers.js" 5 | import { Reporter } from "./Reporter.js" 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | export class ReporterNodejs extends Mixin( 9 | [ Reporter ], 10 | (base : ClassUnion) => 11 | 12 | class ReporterNodejs extends base { 13 | 14 | async fetchSources (url : string) : Promise { 15 | try { 16 | if (/^http/.test(url)) { 17 | 18 | const text = await (await fetch(url)).text() 19 | 20 | return saneSplit(text, '\n') 21 | } else { 22 | const text = await new Promise(resolve => fs.readFile(url, 'utf8', (err, data) => resolve(data))) 23 | 24 | return text ? saneSplit(text, '\n') : undefined 25 | } 26 | } catch (e) { 27 | return undefined 28 | } 29 | } 30 | } 31 | ) {} 32 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/reporter/Terminal.ts: -------------------------------------------------------------------------------- 1 | import { Base } from "../../class/Base.js" 2 | import { Launcher } from "../launcher/Launcher.js" 3 | 4 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5 | export class Terminal extends Base { 6 | 7 | // TODO probably should be the opposite - Launcher should have reference to Terminal 8 | // terminal should handle the printing 9 | launcher : Launcher = undefined 10 | 11 | 12 | getMaxLen () : number { 13 | return Number.MAX_SAFE_INTEGER 14 | } 15 | 16 | 17 | showCursor () { 18 | throw new Error("Abstract method") 19 | } 20 | 21 | hideCursor () { 22 | throw new Error("Abstract method") 23 | } 24 | 25 | 26 | moveCursor (dx : number, dy : number) { 27 | throw new Error("Abstract method") 28 | } 29 | 30 | 31 | clearLine (dir : 'left' | 'right' | 'line') { 32 | throw new Error("Abstract method") 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/reporter/TerminalDeno.ts: -------------------------------------------------------------------------------- 1 | import { clearLine, clearLeft, clearRight, goDown, goLeft, goRight, goUp, hideCursor, showCursor } from "../../util_deno/TerminalDeno.js" 2 | import { Terminal } from "./Terminal.js" 3 | 4 | 5 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6 | export class TerminalDeno extends Terminal { 7 | 8 | showCursor () { 9 | this.launcher.performPrint(() => showCursor()) 10 | } 11 | 12 | hideCursor () { 13 | this.launcher.performPrint(() => hideCursor()) 14 | } 15 | 16 | 17 | moveCursor (dx : number, dy : number) { 18 | this.launcher.performPrint(() => { 19 | if (dx > 0) 20 | goRight(dx) 21 | else if (dx < 0) 22 | goLeft(-dx) 23 | 24 | if (dy > 0) 25 | goDown(dy) 26 | else if (dy < 0) 27 | goUp(-dy) 28 | }) 29 | } 30 | 31 | 32 | clearLine (dir : 'left' | 'right' | 'line') { 33 | this.launcher.performPrint(() => { 34 | if (dir === 'left') 35 | clearLeft() 36 | else if (dir === 'right') 37 | clearRight() 38 | else 39 | clearLine() 40 | }) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/reporter/TerminalNodejs.ts: -------------------------------------------------------------------------------- 1 | import readline from "readline" 2 | import { hideCursor, showCursor } from "../../util_nodejs/Terminal.js" 3 | import { Terminal } from "./Terminal.js" 4 | 5 | 6 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7 | export class TerminalNodejs extends Terminal { 8 | 9 | getMaxLen () : number { 10 | return process.stdout.columns ?? Number.MAX_SAFE_INTEGER 11 | } 12 | 13 | 14 | showCursor () { 15 | this.launcher.performPrint(() => process.stdout.write(showCursor)) 16 | } 17 | 18 | hideCursor () { 19 | this.launcher.performPrint(() => process.stdout.write(hideCursor)) 20 | } 21 | 22 | 23 | moveCursor (dx : number, dy : number) { 24 | this.launcher.performPrint(() => readline.moveCursor(process.stdout, dx, dy, () => {})) 25 | } 26 | 27 | 28 | clearLine (dir : 'left' | 'right' | 'line') { 29 | this.launcher.performPrint(() => readline.clearLine(process.stdout, dir === 'left' ? -1 : dir === 'right' ? 1 : 0, () => {})) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/runtime/RuntimeBrowser.ts: -------------------------------------------------------------------------------- 1 | import { Runtime } from "./Runtime.js" 2 | 3 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4 | export class RuntimeBrowser extends Runtime { 5 | 6 | get inputArguments () : string[] { 7 | // TODO should extract search params from `location.href` here 8 | return [] 9 | } 10 | 11 | 12 | get scriptUrl () : string { 13 | const url = new URL(window.location.href) 14 | 15 | url.hash = '' 16 | url.search = '' 17 | 18 | return url.toString() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/sencha/ProjectDescriptorSencha.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "typescript-mixin-class" 2 | import { serializable } from "typescript-serializable-mixin" 3 | import { ProjectDescriptorBrowser } from "../project/ProjectDescriptorBrowser.js" 4 | import { TestDescriptorSencha } from "./TestDescriptorSencha.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | @serializable({ id : 'ProjectDescriptorSencha', mode : 'optIn' }) 9 | export class ProjectDescriptorSencha extends Mixin( 10 | [ ProjectDescriptorBrowser ], 11 | (base : ClassUnion) => 12 | 13 | class ProjectDescriptorSencha extends base { 14 | testDescriptor : Partial 15 | } 16 | ) {} 17 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/sencha/ProjectSencha.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../class/Mixin.js" 2 | import { ProjectBrowser } from "../project/ProjectBrowser.js" 3 | import { ProjectDescriptorSencha } from "./ProjectDescriptorSencha.js" 4 | import { TestDescriptorSencha } from "./TestDescriptorSencha.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | /** 9 | * Siesta project for Sencha code. 10 | */ 11 | export class ProjectSencha extends Mixin( 12 | [ ProjectBrowser, ProjectDescriptorSencha ], 13 | (base : ClassUnion) => 14 | 15 | class ProjectSencha extends base { 16 | testDescriptorClass : typeof TestDescriptorSencha = TestDescriptorSencha 17 | } 18 | ) {} 19 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/test/TestDescriptorDeno.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../class/Mixin.js" 2 | import { serializable } from "../../serializable/Serializable.js" 3 | import { EnvironmentType } from "../common/Environment.js" 4 | import { TestDescriptor } from "./TestDescriptor.js" 5 | 6 | /* 7 | IMPORTANT 8 | 9 | this class is assumed to be isomorphic right now, 10 | see 11 | src/siesta/test/port/TestLauncher.tsx 12 | */ 13 | 14 | 15 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16 | /** 17 | * Test descriptor class for tests running in the [Deno](https://deno.land/) environment. 18 | */ 19 | @serializable({ id : 'TestDescriptorDeno' }) 20 | export class TestDescriptorDeno extends Mixin( 21 | [ TestDescriptor ], 22 | (base : ClassUnion) => 23 | 24 | class TestDescriptorDeno extends base { 25 | type : EnvironmentType = 'deno' 26 | 27 | 28 | // TODO refactor this, see comment for TestDescriptorBrowser 29 | isRunningInDashboard () : boolean { 30 | return false 31 | } 32 | } 33 | ){} 34 | 35 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/test/TestDescriptorNodejs.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../../class/Mixin.js" 2 | import { serializable } from "../../serializable/Serializable.js" 3 | import { EnvironmentType } from "../common/Environment.js" 4 | import { TestDescriptor } from "./TestDescriptor.js" 5 | 6 | /* 7 | IMPORTANT 8 | 9 | this class is assumed to be isomorphic right now, 10 | see 11 | src/siesta/test/port/TestLauncher.tsx 12 | */ 13 | 14 | 15 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16 | /** 17 | * Test descriptor class for tests running in the [Node.js](https://nodejs.org/) environment. 18 | */ 19 | @serializable({ id : 'TestDescriptorNodejs' }) 20 | export class TestDescriptorNodejs extends Mixin( 21 | [ TestDescriptor ], 22 | (base : ClassUnion) => 23 | 24 | class TestDescriptorNodejs extends base { 25 | type : EnvironmentType = 'nodejs' 26 | 27 | 28 | // TODO refactor this, see comment for TestDescriptorBrowser 29 | isRunningInDashboard () : boolean { 30 | return false 31 | } 32 | } 33 | ){} 34 | 35 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/test/assertion/AssertionGeneral.tsx: -------------------------------------------------------------------------------- 1 | import { AnyConstructor, ClassUnion, Mixin } from "../../../class/Mixin.js" 2 | import { TextJSX } from "../../../jsx/TextJSX.js" 3 | import { Assertion, TestNodeResult } from "../TestResult.js" 4 | import { GotExpectTemplate } from "./AssertionCompare.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | export class AssertionGeneral extends Mixin( 9 | [ TestNodeResult ], 10 | (base : ClassUnion) => 11 | 12 | class AssertionGeneral extends base { 13 | } 14 | ) {} 15 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/test/port/TestLauncherBrowserChild.tsx: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "typescript-mixin-class" 2 | import { SimulatorPlaywrightClient } from "../../simulate/SimulatorPlaywright.js" 3 | import { TestLauncherChild } from "./TestLauncherChild.js" 4 | 5 | // IMPORTANT: Note, that this side of the `TestLauncher` interface is placed into its own file 6 | // this is to keep the test bundle small and free from parent-side dependencies 7 | 8 | 9 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10 | export class TestLauncherBrowserDashboardChild extends Mixin( 11 | [ TestLauncherChild, SimulatorPlaywrightClient ], 12 | (base : ClassUnion) => 13 | 14 | class TestLauncherBrowserDashboardChild extends base { 15 | } 16 | ) {} 17 | 18 | 19 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20 | export class TestLauncherBrowserPlaywrightChild extends Mixin( 21 | [ TestLauncherChild, SimulatorPlaywrightClient ], 22 | (base : ClassUnion) => 23 | 24 | class TestLauncherBrowserPlaywrightChild extends base { 25 | } 26 | ) {} 27 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/test/port/TestReporterChild.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "typescript-mixin-class" 2 | import { Port, remote } from "../../../rpc/port/Port.js" 3 | import { LUID } from "../../common/LUID.js" 4 | import { TestDescriptor } from "../TestDescriptor.js" 5 | import { AssertionAsyncResolution, TestResultLeaf } from "../TestResult.js" 6 | import { TestReporter } from "./TestReporterParent.js" 7 | 8 | // IMPORTANT: Note, that this side of the `TestReporter` interface is placed into its own file 9 | // this is to keep the test bundle small and free from parent-side dependencies 10 | 11 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12 | export class TestReporterChild extends Mixin( 13 | [ Port ], 14 | (base : ClassUnion) => 15 | 16 | class TestReporterChild extends base implements TestReporter { 17 | @remote() 18 | onSubTestStart : (rootTestId : LUID, testNodeId : LUID, parentTestNodeId : LUID, descriptor : TestDescriptor, startDate : Date) => Promise 19 | 20 | @remote() 21 | onSubTestFinish : (rootTestId : LUID, testNodeId : LUID, isIgnored : boolean, endDate : Date) => Promise 22 | 23 | @remote() 24 | onResult : (rootTestId : LUID, testNodeId : LUID, result : TestResultLeaf) => Promise 25 | 26 | @remote() 27 | onAssertionFinish : (rootTestId : LUID, testNodeId : LUID, assertion : AssertionAsyncResolution) => Promise 28 | } 29 | ) {} 30 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/ui/RippleEffectManager.scss: -------------------------------------------------------------------------------- 1 | @use '../../../resources/styling/common/_colors.scss' as *; 2 | 3 | .ripple { 4 | position: relative; 5 | overflow: hidden; 6 | 7 | // this seemingly redundant declarations prevents the inheritance from the parent element 8 | --r-opacity: 0; 9 | --r-scale: 0; 10 | --ripple-background: rgba(187, 187, 187, 0.7); 11 | --ripple-duration: 450ms; 12 | --ripple-easing: ease-in-out; 13 | 14 | &:before { 15 | content: ''; 16 | display: none; 17 | position: absolute; 18 | pointer-events: none; 19 | 20 | top: calc(var(--r-top) * 1px); 21 | left: calc(var(--r-left) * 1px); 22 | width: calc(var(--r-size) * 1px); 23 | height: calc(var(--r-size) * 1px); 24 | 25 | background: var(--ripple-background); 26 | 27 | border-radius: 50%; 28 | 29 | opacity: var(--r-opacity, 1); 30 | 31 | transition: 32 | transform calc(var(--r-duration, 0) * var(--ripple-duration)) var(--ripple-easing), 33 | opacity calc(var(--r-duration, 0) * var(--ripple-duration)) var(--ripple-easing); 34 | 35 | transform: translate(-50%, -50%) scale(var(--r-scale, 1)); 36 | 37 | transform-origin: center; 38 | } 39 | 40 | &.rippling:hover:before { 41 | display: block; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/ui/components/Splitter.scss: -------------------------------------------------------------------------------- 1 | @use "sass:color"; 2 | @use '../../../../resources/styling/common/_colors.scss' as *; 3 | 4 | .splitter { 5 | background-repeat: no-repeat; 6 | background-position: center; 7 | 8 | user-select: none; 9 | } 10 | 11 | 12 | .splitter.splitter-vertical { 13 | border-top: 1px solid $gray_lighter; 14 | border-bottom: 1px solid $gray_lighter; 15 | cursor: row-resize; 16 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII='); 17 | } 18 | 19 | 20 | .splitter.splitter-horizontal { 21 | border-left: 1px solid $gray_lighter; 22 | border-right: 1px solid $gray_lighter; 23 | cursor: col-resize; 24 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=='); 25 | } 26 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/ui/components/TreeComponent.scss: -------------------------------------------------------------------------------- 1 | tree, leaf { 2 | display: block; 3 | } 4 | 5 | tree > leaf { 6 | margin-left: var(--leaf-offset, 1.5rem); 7 | } 8 | 9 | leaf > tree { 10 | margin-left: -1.5rem; 11 | } 12 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/ui/html_report/HTMLReportLaunchInfoComponent.tsx: -------------------------------------------------------------------------------- 1 | /** @jsx ChronoGraphJSX.createElement */ 2 | /** @jsxFrag ChronoGraphJSX.FragmentSymbol */ 3 | 4 | import { ClassUnion, Mixin } from "@bryntum/chronograph/src/class/Mixin.js" 5 | import { entity } from "@bryntum/chronograph/src/schema2/Schema.js" 6 | import { ChronoGraphJSX } from "../../../chronograph-jsx/ChronoGraphJSX.js" 7 | import { TextJSX } from "../../../jsx/TextJSX.js" 8 | import { LaunchInfoComponentCore } from "../test_result/LaunchInfoComponentCore.js" 9 | 10 | ChronoGraphJSX 11 | 12 | 13 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14 | @entity() 15 | export class HTMLReportLaunchInfoComponent extends Mixin( 16 | [ LaunchInfoComponentCore ], 17 | (base : ClassUnion) => 18 | 19 | class HTMLReportLaunchInfoComponent extends base { 20 | props : LaunchInfoComponentCore[ 'props' ] & { 21 | } 22 | } 23 | ) {} 24 | 25 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/ui/test_result/LaunchInfoComponent.scss: -------------------------------------------------------------------------------- 1 | @use '../../../../resources/styling/common/_colors.scss' as *; 2 | 3 | .dom-container { 4 | background-image: url('../images/domcontainer-bg.png'); 5 | } 6 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/ui/test_result/TestOverlay.scss: -------------------------------------------------------------------------------- 1 | .test-overlay { 2 | display: none; 3 | position: fixed; 4 | 5 | left: 0; 6 | top: 0; 7 | width: 100%; 8 | height: 100%; 9 | 10 | &.overlay-active { 11 | display: flex; 12 | 13 | background-image: url('../images/domcontainer-bg.png'); 14 | } 15 | 16 | 17 | & .close-button { 18 | position: absolute; 19 | top: 0; 20 | right: 0; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/ui/test_result/TestResult.scss: -------------------------------------------------------------------------------- 1 | @use '../../../../resources/styling/common/_colors.scss' as *; 2 | 3 | .assertion { 4 | & .assertion_icon_pass { 5 | color: $primary_pass; 6 | } 7 | 8 | & .assertion_icon_fail { 9 | color: $primary_fail; 10 | } 11 | 12 | & .assertion_icon_pass_todo { 13 | color: $primary_pass_darker; 14 | } 15 | 16 | & .assertion_description { 17 | font-weight: bolder; 18 | } 19 | } 20 | 21 | .subtest-title { 22 | cursor: pointer; 23 | 24 | &:hover { 25 | text-decoration: underline dashed; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/siesta/src/siesta/ui/test_result/Translator.scss: -------------------------------------------------------------------------------- 1 | .translating { 2 | position: absolute; 3 | z-index: 10000; 4 | overflow: auto; 5 | 6 | --translateX : 0; 7 | --translateY : 0; 8 | --scaleFactor : 1; 9 | --scaledWidth : 0; 10 | --scaledHeight : 0; 11 | 12 | & > :first-child { 13 | width: var(--scaledWidth); 14 | height: var(--scaledHeight); 15 | transform: translate(var(--translateX), var(--translateY)); 16 | overflow: hidden; 17 | } 18 | 19 | & > :first-child > :first-child { 20 | transform: scale(var(--scaleFactor)); 21 | transform-origin: left top; 22 | transition: transform 0.3s; 23 | } 24 | } 25 | 26 | .translating.fit_width { 27 | overflow-x: hidden; 28 | } 29 | 30 | .translating.fit_height { 31 | overflow-y: hidden; 32 | } 33 | -------------------------------------------------------------------------------- /packages/siesta/src/tree/TreeNodeMapped.ts: -------------------------------------------------------------------------------- 1 | import { ClassUnion, Mixin } from "../class/Mixin.js" 2 | import { TreeNode } from "./TreeNode.js" 3 | 4 | 5 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6 | // TODO does it really have to be a class? a single function 7 | // (perhaps even a method on the `TreeNode`) should be enough? 8 | // having it as a class only make sense for reactive TreeMap 9 | export class TreeNodeMapped extends Mixin( 10 | [ TreeNode ], 11 | (base : ClassUnion) => 12 | 13 | class TreeNodeMapped extends base { 14 | 15 | static fromTreeNode ( 16 | this : T, 17 | treeNode : S, 18 | mapper : (source : S) => InstanceType 19 | ) 20 | : InstanceType 21 | { 22 | const instance = mapper(treeNode) 23 | 24 | treeNode.forEachChildNode(child => instance.appendChild(this.fromTreeNode(child, mapper))) 25 | 26 | return instance 27 | } 28 | } 29 | ) {} 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /packages/siesta/src/util/PromiseSync.ts: -------------------------------------------------------------------------------- 1 | export class PromiseSync extends Promise { 2 | 3 | resolved : V = undefined 4 | rejected : any = undefined 5 | 6 | 7 | constructor (executor : (resolve : (value : V | PromiseLike) => void, reject : (reason? : any) => void) => void) { 8 | super( 9 | (resolve, reject) => executor( 10 | (value : V) => { 11 | this.resolved = value 12 | 13 | resolve(value) 14 | }, 15 | (reason? : any) => { 16 | this.rejected = reason 17 | 18 | reject(reason) 19 | } 20 | ) 21 | ) 22 | } 23 | 24 | 25 | isResolved () : boolean { 26 | return this.resolved !== undefined 27 | } 28 | 29 | 30 | isRejected () : boolean { 31 | return this.rejected !== undefined 32 | } 33 | 34 | // derived instances are regular Promises 35 | static get [Symbol.species] () { 36 | return Promise 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /packages/siesta/src/util_browser/PlaywrightHelpers.ts: -------------------------------------------------------------------------------- 1 | import playwright from "playwright" 2 | import { SupportedBrowsers } from "../siesta/launcher/LauncherDescriptorNodejs.js" 3 | 4 | 5 | export const browserType = (browser : SupportedBrowsers) : playwright.BrowserType => { 6 | switch (browser) { 7 | case 'chrome': 8 | return playwright.chromium 9 | case 'edge': 10 | return playwright.chromium 11 | case 'firefox': 12 | return playwright.firefox 13 | case 'safari': 14 | return playwright.webkit 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/siesta/src/util_browser/Typeguards.ts: -------------------------------------------------------------------------------- 1 | import { typeOf } from "../util/Helpers.js" 2 | 3 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4 | export const isHTMLIFrameElement = (a : any) : a is HTMLIFrameElement => typeOf(a) === 'HTMLIFrameElement' 5 | 6 | export const isSameDomainHTMLIFrameElement = (a : any) : a is HTMLIFrameElement => 7 | typeOf(a) === 'HTMLIFrameElement' && Boolean(a.contentDocument) 8 | 9 | export const isHTMLInputElement = (a : any) : a is HTMLInputElement => typeOf(a) === 'HTMLInputElement' 10 | export const isHTMLScriptElement = (a : any) : a is HTMLScriptElement => typeOf(a) === 'HTMLScriptElement' 11 | export const isHTMLLinkElement = (a : any) : a is HTMLLinkElement => typeOf(a) === 'HTMLLinkElement' 12 | export const isHTMLImageElement = (a : any) : a is HTMLImageElement => typeOf(a) === 'HTMLImageElement' 13 | 14 | export const isHTMLElement = (a : any) : a is HTMLElement => /HTML\w*Element/.test(typeOf(a)) 15 | 16 | export const isSVGElement = (a : any) : a is SVGElement => /SVG\w*Element/.test(typeOf(a)) 17 | 18 | export const isSVGGraphicsElement = (a : any) : a is SVGGraphicsElement => isSVGElement(a) && Boolean((a as any).getBBox) 19 | 20 | export const isElement = (a : any) : a is Element => /^(HTML|SVG)\w*Element/.test(typeOf(a)) 21 | 22 | export const isShadowRoot = (a : any) : a is ShadowRoot => typeOf(a) === 'ShadowRoot' 23 | 24 | export const isDocument = (a : any) : a is Document => typeOf(a) === 'HTMLDocument' 25 | -------------------------------------------------------------------------------- /packages/siesta/src/util_nodejs/FileSystem.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs' 2 | import path from 'path' 3 | 4 | 5 | // TODO support symlinks 6 | 7 | 8 | export const scanDir = (dir : string, forEach : (entry : fs.Dirent, filename : string) => any, ignore? : RegExp) : false | void => { 9 | const entries = fs.readdirSync(dir, { withFileTypes : true }) 10 | 11 | for (let i = 0; i < entries.length; i++) { 12 | const entry = entries[ i ] 13 | 14 | if (entry.isDirectory() && (!ignore || !ignore.test(entry.name))) { 15 | if (scanDir(path.resolve(dir, entry.name), forEach) === false) return false 16 | } 17 | else if (entry.isFile()) { 18 | if (forEach(entry, path.resolve(dir, entry.name)) === false) return false 19 | } 20 | } 21 | } 22 | 23 | 24 | export const scanDirAsync = async function* (dirName : string, ignore? : RegExp) : AsyncGenerator { 25 | const dir = await fs.promises.opendir(dirName, { bufferSize : 128 }) 26 | 27 | for await (const entry of dir) { 28 | const fullName = path.resolve(dirName, entry.name) 29 | 30 | if (entry.isDirectory() && (!ignore || !ignore.test(entry.name))) { 31 | yield* scanDirAsync(fullName) 32 | } 33 | else if (entry.isFile()) { 34 | yield fullName 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/siesta/src/util_nodejs/Terminal.ts: -------------------------------------------------------------------------------- 1 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2 | export const hideCursor = '\u001B[?25l' 3 | 4 | export const showCursor = '\u001B[?25h' 5 | 6 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7 | const ansiConstrolCharacters = new RegExp( 8 | [ 9 | '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', 10 | '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' 11 | ].join('|'), 12 | 'g' 13 | ) 14 | 15 | 16 | export const stripAnsiControlCharacters = (str : string) : string => str.replace(ansiConstrolCharacters, '') 17 | -------------------------------------------------------------------------------- /packages/siesta/tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/siesta/tests/jsx/ul.t.tsx: -------------------------------------------------------------------------------- 1 | import { it } from "../../index.js" 2 | import { TextJSX } from "../../src/jsx/TextJSX.js" 3 | import { ULStreamed } from "../../src/jsx/UL.js" 4 | import { XmlRendererStreaming } from "../../src/jsx/XmlRenderer.js" 5 | 6 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7 | const renderer = XmlRendererStreaming.new() 8 | 9 | 10 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11 | it('Unordered list rendering should work', async t => { 12 | 13 | t.is( 14 | renderer.render( 15 | Some text 16 |
  • 17 |
    Element1-1
    18 |
    Element1-2
    19 |
  • 20 |
  • 21 |
    Element2-1
    22 |
    Element2-2
    23 |
  • 24 |
    ), 25 | `Some text 26 | · Element1-1 27 | Element1-2 28 | · Element2-1 29 | Element2-2` 30 | ) 31 | }) 32 | -------------------------------------------------------------------------------- /packages/siesta/tests/siesta/@helpers.ts: -------------------------------------------------------------------------------- 1 | import { CI } from "../../src/iterator/Iterator.js" 2 | import { GotExpectTemplate } from "../../src/siesta/test/assertion/AssertionCompare.js" 3 | import { Test } from "../../src/siesta/test/Test.js" 4 | import { Assertion } from "../../src/siesta/test/TestResult.js" 5 | 6 | export const verifyAllFailed = (todoTest : Test, topTest : Test) => { 7 | CI(todoTest.eachResultOfClassDeep(Assertion)).forEach(assertion => { 8 | 9 | if (assertion.passed) { 10 | topTest.addResult(Assertion.new({ 11 | name : 'All assertions should fail', 12 | passed : false, 13 | 14 | annotation : GotExpectTemplate.el({ 15 | gotTitle : 'Passed assertion', 16 | got : assertion, 17 | 18 | t : topTest 19 | }) 20 | })) 21 | } 22 | }) 23 | } 24 | -------------------------------------------------------------------------------- /packages/siesta/tests/siesta/assertions/silent.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | import { CI } from "../../../src/iterator/Iterator.js" 3 | import { Assertion } from "../../../src/siesta/test/TestResult.js" 4 | import { verifyAllFailed } from "../@helpers.js" 5 | 6 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7 | it('The passed "silent" assertion should not be included in the log', async t => { 8 | 9 | t.todo('Should all fail', async t => { 10 | t.silent.is(1, 1) 11 | 12 | t.is(0, 0) 13 | 14 | }).postFinishHook.on(todoTest => { 15 | t.is(CI(todoTest.eachResultOfClassDeep(Assertion)).size, 1) 16 | }) 17 | }) 18 | 19 | 20 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21 | it('The failed "silent" assertion should be included in the log', async t => { 22 | 23 | t.todo('Should all fail', async t => { 24 | t.silent.is(1, 2) 25 | 26 | t.is(0, 1) 27 | }).postFinishHook.on(todoTest => { 28 | verifyAllFailed(todoTest, t) 29 | 30 | t.is(CI(todoTest.eachResultOfClassDeep(Assertion)).size, 2) 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /packages/siesta/tests/siesta/snooze_tests.t.ts: -------------------------------------------------------------------------------- 1 | import { describe } from "../../index.js" 2 | import { Assertion } from "../../src/siesta/test/TestResult.js" 3 | 4 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5 | describe('Snoozed tests should not fail', t => { 6 | t.it({ 7 | title : 'Snoozed test', 8 | snooze : '2100' 9 | }, t => { 10 | t.is(1, 2, 'todo1') 11 | 12 | t.it('Nested test should become todo as well', t => { 13 | t.is(2, 3, 'todo2') 14 | }) 15 | }) 16 | 17 | }).finishHook.on(t => { 18 | t.true(t.passed) 19 | 20 | const spec1 = t.childNodes[ 0 ] 21 | 22 | t.true(spec1.isTodo) 23 | 24 | t.is((spec1.resultLog[ 0 ] as Assertion).description, 'todo1') 25 | 26 | const spec2 = spec1.childNodes[ 0 ] 27 | 28 | t.true(spec2.isTodo) 29 | 30 | t.is((spec2.resultLog[ 0 ] as Assertion).description, 'todo2') 31 | }) 32 | 33 | 34 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35 | describe('Unsnoozed tests', t => { 36 | t.it({ 37 | title : 'Unsnoozed test', 38 | snooze : '2010' 39 | }, t => { 40 | t.is(1, 1, 'assertion1') 41 | }) 42 | 43 | }).finishHook.on(t => { 44 | t.true(t.passed) 45 | 46 | const spec1 = t.childNodes[ 0 ] 47 | 48 | t.false(spec1.isTodo) 49 | 50 | t.is((spec1.resultLog[ 0 ] as Assertion).description, 'assertion1') 51 | }) 52 | 53 | -------------------------------------------------------------------------------- /packages/siesta/tests/siesta/test/exception_handling.t.ts: -------------------------------------------------------------------------------- 1 | import { CI } from "chained-iterator/index.js" 2 | import { it } from "../../../index.js" 3 | import { Exception } from "../../../src/siesta/test/TestResult.js" 4 | import { isDeno } from "../../../src/util/Helpers.js" 5 | 6 | 7 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8 | it('Should report exceptions, thrown outside of the test function', async t => { 9 | // Deno does not provide any "uncaughtexception/rejection" hooks (yet) 10 | if (isDeno()) return 11 | 12 | t.todo('Should report exceptions, thrown outside of the test function', async t => { 13 | const async = t.beginAsync() 14 | 15 | setTimeout(() => { 16 | t.endAsync(async) 17 | 18 | // @ts-ignore 19 | zxc 20 | }, 100) 21 | }).postFinishHook.on(todoTest => { 22 | const exceptions = CI(todoTest.eachResultOfClassDeep(Exception)).toArray() 23 | 24 | t.eq(exceptions.length, 1) 25 | 26 | exceptions.forEach(exception => { 27 | t.match(exception.text, 'zxc') 28 | }) 29 | }) 30 | }) 31 | -------------------------------------------------------------------------------- /packages/siesta/tests/siesta/test/source_point.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | 3 | 4 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5 | it('Should be able to generate source points for failures', async t => { 6 | t.todo('internal', async t => { 7 | t.true(false) 8 | }).postFinishHook.on(todoTest => { 9 | const assertion = todoTest.assertions[ 0 ] 10 | 11 | t.true(assertion.sourcePoint) 12 | 13 | if (!assertion.sourcePoint) return 14 | 15 | t.isNumber(assertion.sourcePoint.line) 16 | t.isNumber(assertion.sourcePoint.char) 17 | }) 18 | }) 19 | 20 | -------------------------------------------------------------------------------- /packages/siesta/tests/siesta/todo_tests.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../index.js" 2 | 3 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4 | it('Todo tests should not fail', t => { 5 | t.todo('Todo test', t => { 6 | t.is(1, 1, 'todo1') 7 | 8 | t.is(1, 2, 'todo2') 9 | 10 | t.it('Nested test should become todo as well', t => { 11 | t.is(2, 3, 'todo3') 12 | }) 13 | }) 14 | 15 | }).finishHook.on(t => { 16 | t.true(t.passed) 17 | 18 | //⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼ 19 | const spec1 = t.childNodes[ 0 ] 20 | 21 | t.true(spec1.passed) 22 | t.false(spec1.passedRaw) 23 | t.true(spec1.isTodo) 24 | 25 | t.true(spec1.assertions[ 0 ].passed) 26 | t.false(spec1.assertions[ 1 ].passed) 27 | 28 | t.is(spec1.assertions[ 0 ].description, 'todo1') 29 | t.is(spec1.assertions[ 1 ].description, 'todo2') 30 | 31 | //⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼ 32 | const spec2 = spec1.childNodes[ 0 ] 33 | 34 | t.true(spec2.passed) 35 | t.false(spec2.passedRaw) 36 | t.true(spec2.isTodo) 37 | 38 | t.is(spec2.assertions[ 0 ].description, 'todo3') 39 | t.false(spec2.assertions[ 0 ].passed) 40 | }) 41 | 42 | -------------------------------------------------------------------------------- /packages/siesta/tests/util/promise_sync.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../index.js" 2 | import { PromiseSync } from "../../src/util/PromiseSync.js" 3 | 4 | it('PromiseSync resolution detection should work', async t => { 5 | 6 | const promise = new PromiseSync((resolve, reject) => { 7 | setTimeout(() => resolve(10), 1) 8 | }) 9 | 10 | t.false(promise.isResolved()) 11 | t.false(promise.isRejected()) 12 | 13 | await promise 14 | 15 | t.true(promise.isResolved()) 16 | t.false(promise.isRejected()) 17 | 18 | t.is(promise.resolved, 10) 19 | }) 20 | 21 | 22 | it('PromiseSync rejection detection should work', async t => { 23 | 24 | const promise = new PromiseSync((resolve, reject) => { 25 | setTimeout(() => reject('reason'), 1) 26 | }) 27 | 28 | t.false(promise.isResolved()) 29 | t.false(promise.isRejected()) 30 | 31 | try { 32 | await promise 33 | } catch (e) { 34 | } 35 | 36 | t.false(promise.isResolved()) 37 | t.true(promise.isRejected()) 38 | 39 | t.is(promise.rejected, 'reason') 40 | }) 41 | -------------------------------------------------------------------------------- /packages/siesta/tests/util/uniqable.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../index.js" 2 | import { MIN_SMI } from "../../src/util/Helpers.js" 3 | import { compact, Uniqable } from "../../src/util/Uniqable.js" 4 | 5 | const getUniqable = () => { return { uniqable : MIN_SMI } } 6 | 7 | it('Compacting arrays should work', async t => { 8 | const el1 = getUniqable() 9 | const el2 = getUniqable() 10 | const el3 = getUniqable() 11 | 12 | const elements : Uniqable[] = [ el1, el2, el1, el3, el1, el2, el3 ] 13 | 14 | compact(elements) 15 | 16 | t.equal(elements, [ el1, el2, el3 ]) 17 | 18 | //-------------------------- 19 | // trying to compact the same array 20 | elements.push(el1, el1, el2, el2, el3, el3) 21 | 22 | compact(elements) 23 | 24 | t.equal(elements, [ el1, el2, el3 ]) 25 | }) 26 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/compare_deep/deep_diff.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../browser.js" 2 | import { compareDeepDiff } from "../../src/compare_deep/DeepDiff.js" 3 | 4 | 5 | it('Deep comparison should not throw on built-in objects', async t => { 6 | t.doesNotThrow(() => compareDeepDiff(window, window.location)) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /generatedFiles 3 | /cordova 4 | /node_modules 5 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp application -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app.js: -------------------------------------------------------------------------------- 1 | Ext.application({ 2 | extend: 'MyExtGenApp.Application', 3 | name: 'MyExtGenApp' 4 | }); -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/overrides/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/sass/src.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/tests_browser/sencha/@my-app/app/desktop/sass/src.scss -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/sass/var.scss: -------------------------------------------------------------------------------- 1 | //$base-color:#025B80; //Themer Blue 2 | //$base-color:#EF5350; //red-ish 3 | //$base-color:#8D6E63; //brown-ish 4 | //$base-color:#26A69A; //green-ish -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/Application.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.Application', { 2 | extend: 'Ext.app.Application', 3 | name: 'MyExtGenApp', 4 | requires: ['MyExtGenApp.*'], 5 | defaultToken: 'homeview', 6 | 7 | removeSplash: function () { 8 | Ext.getBody().removeCls('launching') 9 | var elem = document.getElementById("splash") 10 | elem.parentNode.removeChild(elem) 11 | }, 12 | 13 | launch: function () { 14 | this.removeSplash() 15 | var whichView = 'mainview' 16 | Ext.Viewport.add([{xtype: whichView}]) 17 | }, 18 | 19 | onAppUpdate: function () { 20 | Ext.Msg.confirm('Application Update', 'This application has an update, reload?', 21 | function (choice) { 22 | if (choice === 'yes') { 23 | window.location.reload(); 24 | } 25 | } 26 | ); 27 | } 28 | }); 29 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/Application.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/Application.scss -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/model/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/store/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/util/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/home/HomeView.scss: -------------------------------------------------------------------------------- 1 | // sass for MyExtGenApp.view.home.HomeView 2 | .homeview { 3 | color: $color; 4 | font-size: 18px; 5 | background-color: $base-foreground-color; 6 | padding: 15px 0px 0px 15px; 7 | border: 1px solid lightgray; 8 | box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.4); 9 | } -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/home/HomeViewController.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.home.HomeViewController', { 2 | extend: 'Ext.app.ViewController', 3 | alias: 'controller.homeviewcontroller', 4 | 5 | }); 6 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/home/HomeViewModel.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.home.HomeViewModel', { 2 | extend: 'Ext.app.ViewModel', 3 | alias: 'viewmodel.homeviewmodel', 4 | data: { 5 | name: 'homeview' 6 | }, 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/MainView.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.main.MainView', { 2 | extend: 'Ext.Container', 3 | xtype: 'mainview', 4 | controller: 'mainviewcontroller', 5 | viewModel: { 6 | type: 'mainviewmodel' 7 | }, 8 | requires: [ 9 | 'Ext.layout.Fit' 10 | ], 11 | layout: 'fit', 12 | items: [ 13 | { xtype: 'navview', reference: 'navview', docked: 'left', bind: {width: '{navview_width}'}, listeners: { select: "onMenuViewSelectionChange"} }, 14 | { xtype: 'headerview', reference: 'headerview', docked: 'top', bind: {height: '{headerview_height}'} }, 15 | { xtype: 'footerview', reference: 'footerview', docked: 'bottom', bind: {height: '{footerview_height}'} }, 16 | { xtype: 'centerview', reference: 'centerview' }, 17 | { xtype: 'detailview', reference: 'detailview', docked: 'right', bind: {width: '{detailview_width}'} }, 18 | ] 19 | }); 20 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/MainView.scss: -------------------------------------------------------------------------------- 1 | // sass for MyExtGenApp.view.home.MainView 2 | .mainview { 3 | } -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/MainViewModel.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.main.MainViewModel', { 2 | extend: 'Ext.app.ViewModel', 3 | alias: 'viewmodel.mainviewmodel', 4 | data: { 5 | name: 'MyExtGenApp', 6 | navCollapsed: false, 7 | navview_max_width: 300, 8 | navview_min_width: 44, 9 | topview_height: 75, 10 | bottomview_height: 50, 11 | headerview_height: 50, 12 | footerview_height: 50, 13 | detailCollapsed: true, 14 | detailview_width: 10, 15 | detailview_max_width: 300, 16 | detailview_min_width: 0, 17 | 18 | }, 19 | formulas: { 20 | navview_width: function(get) { 21 | return get('navCollapsed') ? get('navview_min_width') : get('navview_max_width'); 22 | }, 23 | detailview_width: function(get) { 24 | return get('detailCollapsed') ? get('detailview_min_width') : get('detailview_max_width'); 25 | } 26 | }, 27 | stores: { 28 | menu: { 29 | type: "tree", 30 | proxy: { 31 | type: 'ajax', 32 | reader: 'json', 33 | url: 'resources/desktop/menu.json' 34 | }, 35 | autoLoad: true 36 | } 37 | } 38 | }); 39 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/center/CenterView.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.main.center.CenterView', { 2 | extend: 'Ext.Container', 3 | xtype: 'centerview', 4 | cls: 'centerview', 5 | layout: 'card' 6 | }); 7 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/center/CenterView.scss: -------------------------------------------------------------------------------- 1 | .centerview { 2 | border-left: 0; 3 | border-top: 0; 4 | padding: 10px 10px 10px 10px; 5 | background-color: $base-foreground-color; 6 | color: $base-color; 7 | font-size: 24px; 8 | background-image: linear-gradient(0deg,#f5f5f5 1.1px, transparent 0), linear-gradient(90deg,#f5f5f5 1.1px, transparent 0); 9 | background-size: 20px 20px; 10 | background-color: #e8e8e8; 11 | } 12 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/detail/DetailView.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.main.detail.DetailView', { 2 | extend: 'Ext.Container', 3 | xtype: 'detailview', 4 | cls: 'detailview', 5 | layout: 'fit', 6 | items: [ 7 | { 8 | xtype: 'container', 9 | style: 'background:white', 10 | html: '
    detailview
    ' 11 | } 12 | ] 13 | }) -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/detail/DetailView.scss: -------------------------------------------------------------------------------- 1 | .detailview { 2 | border-left: 0; 3 | border-top: 0; 4 | color: $base-color; 5 | background-color: $base-foreground-color; 6 | } 7 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/footer/FooterView.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.main.footer.FooterView', { 2 | extend: 'Ext.Toolbar', 3 | xtype: 'footerview', 4 | cls: 'footerview', 5 | viewModel: {}, 6 | items: [ 7 | { 8 | xtype: 'container', 9 | cls: 'footerviewtext', 10 | html: 'Ext JS version: ' + Ext.versions.extjs.version 11 | //bind: { html: '{name} footer' } 12 | } 13 | ] 14 | }); 15 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/footer/FooterView.scss: -------------------------------------------------------------------------------- 1 | .footerview { 2 | border-left: 0; 3 | border-top: 0; 4 | color: $base-foreground-color; 5 | background-color: $base-color; 6 | } 7 | 8 | .footerviewtext { 9 | font-size: 16px; 10 | color: $base-foreground-color; 11 | padding: 0 0 0 15px; 12 | } 13 | 14 | @include button-ui( 15 | $ui: 'footerbutton', 16 | $background-color: transparent, 17 | $color: $base-foreground-color, 18 | $border-color: transparent 19 | ); -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/header/HeaderView.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.main.header.HeaderView', { 2 | extend: 'Ext.Toolbar', 3 | xtype: 'headerview', 4 | cls: 'headerview', 5 | viewModel: {}, 6 | items: [ 7 | { 8 | xtype: 'container', 9 | cls: 'headerviewtext', 10 | bind: { html: '{heading}' } 11 | }, 12 | '->', 13 | { 14 | xtype: 'button', 15 | ui: 'headerbutton', 16 | reference: 'detailtoggle', 17 | handler: 'onHeaderViewDetailToggle', 18 | iconCls: 'x-fa fa-arrow-left' 19 | } 20 | ] 21 | }); 22 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/header/HeaderView.scss: -------------------------------------------------------------------------------- 1 | .headerview { 2 | border-left: 0; 3 | border-top: 0; 4 | color: $base-foreground-color; 5 | background-color: $base-color; 6 | } 7 | 8 | .headerviewtext { 9 | font-size: 28px; 10 | padding: 0 0 0 15px; 11 | line-height: 50px; 12 | } 13 | 14 | @include button-ui( 15 | $ui: 'headerbutton', 16 | $background-color: transparent, 17 | $color: $base-foreground-color, 18 | $icon-color: $base-foreground-color, 19 | $border-color: transparent 20 | ); -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/nav/NavView.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.main.nav.NavView', { 2 | extend: 'Ext.Panel', 3 | xtype: 'navview', 4 | controller: "navviewcontroller", 5 | cls: 'navview', 6 | viewModel: {}, 7 | layout: 'fit', 8 | tbar: {xtype: 'topview', height: 50}, 9 | items: [ 10 | { 11 | xtype: 'menuview', 12 | reference: 'menuview', 13 | bind: {width: '{menuview_width}'}, 14 | listeners: { 15 | selectionchange: "onMenuViewSelectionChange" 16 | } 17 | } 18 | ], 19 | bbar: {xtype: 'bottomview', bind: {height: '{bottomview_height}'}} 20 | }); 21 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/nav/NavView.scss: -------------------------------------------------------------------------------- 1 | .navview { } 2 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/nav/NavViewController.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.main.nav.NavViewController', { 2 | extend: "Ext.app.ViewController", 3 | alias: "controller.navviewcontroller", 4 | 5 | initViewModel: function(vm) {}, 6 | 7 | onTopViewNavToggle: function () { 8 | var vm = this.getViewModel(); 9 | vm.set('navCollapsed', !vm.get('navCollapsed')); 10 | }, 11 | 12 | onMenuViewSelectionChange: function(tree, node) { 13 | if (!node) { 14 | return; 15 | } 16 | this.fireViewEvent("select", node); 17 | } 18 | }); 19 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/nav/bottom/BottomView.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.main.nav.bottom.BottomView', { 2 | extend: 'Ext.Toolbar', 3 | xtype: 'bottomview', 4 | cls: 'bottomview', 5 | shadow: false, 6 | // items: [ 7 | // { 8 | // xtype: 'button', 9 | // ui: 'bottomviewbutton', 10 | // iconCls: 'x-fa fa-angle-double-left', 11 | // text: 'Logout', 12 | // handler: 'onBottomViewlogout' 13 | // } 14 | // ] 15 | }); 16 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/nav/bottom/BottomView.scss: -------------------------------------------------------------------------------- 1 | .bottomview { 2 | border-left: 0; 3 | border-top: 0; 4 | padding: 0; 5 | color: $base-foreground-color; 6 | background-color: darken($base-color, 20%); 7 | 8 | } 9 | 10 | @include button-ui( 11 | $ui: 'bottomviewbutton', 12 | $background-color: transparent, 13 | $color: $base-foreground-color, 14 | $icon-color: $base-foreground-color, 15 | $border-color: transparent, 16 | $icon-font-size: 34px, 17 | $icon-horizontal-spacing: 20px, 18 | $font-size: 20px, 19 | $line-height: 30px 20 | ); 21 | 22 | .bottomview .x-toolbar-body-el { 23 | padding: 6px 5px 2px 1px; 24 | } -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/nav/menu/MenuView.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.nav.menu.MenuView', { 2 | extend: 'Ext.list.Tree', 3 | xtype: 'menuview', 4 | viewModel: {}, 5 | ui: 'nav', 6 | requires: [ 7 | 'Ext.data.TreeStore', 8 | ], 9 | scrollable: true, 10 | bind: { 11 | store: '{menu}', 12 | micro: '{navCollapsed}' 13 | }, 14 | expanderFirst: false, 15 | expanderOnly: false 16 | }); 17 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/nav/top/TopView.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.main.nav.top.TopView', { 2 | extend: 'Ext.Toolbar', 3 | xtype: 'topview', 4 | cls: 'topview', 5 | viewModel: {}, 6 | shadow: false, 7 | items: [ 8 | { 9 | xtype: 'container', 10 | cls: 'topviewtext', 11 | bind: { 12 | html: '{name}', 13 | hidden: '{navCollapsed}' 14 | } 15 | }, 16 | '->', 17 | { 18 | xtype: 'button', 19 | ui: 'topviewbutton', 20 | reference: 'navtoggle', 21 | handler: 'onTopViewNavToggle', 22 | iconCls: 'x-fa fa-navicon' 23 | } 24 | ] 25 | }); -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/main/nav/top/TopView.scss: -------------------------------------------------------------------------------- 1 | .topview { 2 | border-left: 0; 3 | border-top: 0; 4 | padding: 0 0 0 0; 5 | color: $base-foreground-color; 6 | background-color: darken($base-color, 20%); 7 | } 8 | 9 | .topviewtext { 10 | font-size: 28px; 11 | padding: 0 0 0 15px; 12 | line-height: 50px; 13 | } 14 | 15 | @include button-ui( 16 | $ui: 'topviewbutton', 17 | $icon-font-size: 18px, 18 | $background-color: transparent, 19 | $color: $base-foreground-color, 20 | $icon-color: $base-foreground-color, 21 | $border-color: transparent 22 | ); 23 | 24 | .topview .x-toolbar-body-el { 25 | padding: 6px 5px 2px 1px; 26 | } -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/personnel/PersonnelView.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.personnel.PersonnelView',{ 2 | extend: 'Ext.grid.Grid', 3 | xtype: 'personnelview', 4 | cls: 'personnelview', 5 | requires: ['Ext.grid.rowedit.Plugin'], 6 | controller: {type: 'personnelviewcontroller'}, 7 | viewModel: {type: 'personnelviewmodel'}, 8 | store: {type: 'personnelviewstore'}, 9 | grouped: true, 10 | groupFooter: { 11 | xtype: 'gridsummaryrow' 12 | }, 13 | plugins: { 14 | rowedit: { 15 | autoConfirm: false 16 | } 17 | }, 18 | columns: [ 19 | { 20 | text: 'Name', 21 | dataIndex: 'name', 22 | editable: true, 23 | width: 100, 24 | cell: {userCls: 'bold'} 25 | }, 26 | {text: 'Email',dataIndex: 'email',editable: true, width: 230}, 27 | { 28 | text: 'Phone', 29 | dataIndex: 'phone', 30 | editable: true, 31 | width: 150 32 | } 33 | ], 34 | listeners: { 35 | canceledit: 'onEditCancelled' 36 | } 37 | }); 38 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/personnel/PersonnelView.scss: -------------------------------------------------------------------------------- 1 | .personnelview {} -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/personnel/PersonnelViewController.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.personnel.PersonnelViewController', { 2 | extend: 'Ext.app.ViewController', 3 | alias: 'controller.personnelviewcontroller', 4 | 5 | onEditCancelled: function (editor, value, startValue, eOpts) { 6 | var user = Ext._find(value.record.store.config.data.items, { name: value.record.data.name }); 7 | Ext.Msg.confirm('Confirm', value.record.data.name + ': ' + user.phone + ' is phone number', 'onConfirm', this); 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/personnel/PersonnelViewModel.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.personnel.PersonnelViewModel', { 2 | extend: 'Ext.app.ViewModel', 3 | alias: 'viewmodel.personnelviewmodel', 4 | data: { 5 | name: 'MyExtGenApp' 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/desktop/src/view/personnel/PersonnelViewStore.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.view.personnel.PersonnelViewStore', { 2 | extend: 'Ext.data.Store', 3 | alias: 'store.personnelviewstore', 4 | fields: [ 5 | 'name', 'email', 'phone', 'dept' 6 | ], 7 | groupField: 'dept', 8 | data: { items: [ 9 | { name: 'Jean Luc', email: "jeanluc.picard@enterprise.com", phone: "555-111-1111", dept: "bridge" }, 10 | { name: 'ModernWorf', email: "worf.moghsson@enterprise.com", phone: "555-222-2222", dept: "engine" }, 11 | { name: 'Deanna', email: "deanna.troi@enterprise.com", phone: "555-333-3333", dept: "bridge" }, 12 | { name: 'Data', email: "mr.data@enterprise.com", phone: "555-444-4444", dept: "bridge" } 13 | ]}, 14 | proxy: { 15 | type: 'memory', 16 | reader: { 17 | type: 'json', 18 | rootProperty: 'items' 19 | } 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/shared/overrides/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/shared/sass/src.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/tests_browser/sencha/@my-app/app/shared/sass/src.scss -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/shared/src/model/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/shared/src/store/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/shared/src/util/Shared.js: -------------------------------------------------------------------------------- 1 | Ext.define('MyExtGenApp.util.Shared', { 2 | alternateClassName: ['Shared'], 3 | singleton: true, 4 | 5 | log: function(msg) { 6 | console.log(msg); 7 | } 8 | }); -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/app/shared/src/view/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp shared/app -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/tests_browser/sencha/@my-app/favicon.ico -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | MyExtGenApp 8 | 9 | 18 | 19 | 20 | 21 | 22 | 23 |
    24 |
    LOADING...
    25 | 26 |
    27 | 28 | 29 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/index.js: -------------------------------------------------------------------------------- 1 | //this file exists so the webpack build process will succeed 2 | Ext._find = require('lodash.find'); 3 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/packages/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/resources/desktop/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bryntum/siesta/9fdd98804f6982a06994064361d22de9aee42df2/packages/siesta/tests_browser/sencha/@my-app/resources/desktop/5.jpg -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/resources/desktop/Readme.md: -------------------------------------------------------------------------------- 1 | # MyExtGenApp -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/@my-app/resources/desktop/menu.json: -------------------------------------------------------------------------------- 1 | { 2 | "leaf": false, 3 | "children": [ 4 | { "text": "Home", "iconCls": "x-fa fa-home", "xtype": "homeview", "leaf": true }, 5 | { "text": "Personnel", "iconCls": "x-fa fa-table", "xtype": "personnelview","leaf": true } 6 | ] 7 | } -------------------------------------------------------------------------------- /packages/siesta/tests_browser/sencha/cmd_app.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../sencha.js" 2 | 3 | declare const Ext 4 | 5 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6 | it('Sencha-specific querying should work', async t => { 7 | await t.click('.x-treelist-item:contains(Personnel)') 8 | }) 9 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/serializer/serializer_xml.t.tsx: -------------------------------------------------------------------------------- 1 | import { it } from "../../browser.js" 2 | import { TextJSX } from "../../src/jsx/TextJSX.js" 3 | import { serializeToElement } from "../../src/serializer/Serial.js" 4 | 5 | 6 | it('Serialization should not throw on built-in objects', async t => { 7 | t.doesNotThrow(() => serializeToElement(window)) 8 | 9 | t.doesNotThrow(() => serializeToElement(window.location)) 10 | 11 | t.doesNotThrow(() => serializeToElement(document.createElement('div'))) 12 | }) 13 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/siesta/test/page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/siesta/test/pageUrl.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../browser.js" 2 | import { createElement } from "../../@helpers.js" 3 | 4 | 5 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6 | it('`pageUrl` config should work', async t => { 7 | // @ts-ignore 8 | t.is(window.PRELOAD_FILE_MODULE, true) 9 | 10 | // @ts-ignore 11 | t.is(window.PRELOAD_FILE, true) 12 | 13 | const el2 = createElement({ class : 'preload-file-class', parent : document.body }) 14 | 15 | t.eq(getComputedStyle(el2).marginRight, '10px') 16 | }) 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/siesta/test/preload_file.css: -------------------------------------------------------------------------------- 1 | .preload-file-class { margin : 10px } 2 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/siesta/test/preload_file.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | window.PRELOAD_FILE = true 3 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/siesta/test/preload_file_module.ts: -------------------------------------------------------------------------------- 1 | export const PRELOAD_FILE_MODULE = true 2 | 3 | // @ts-ignore 4 | window.PRELOAD_FILE_MODULE = true 5 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/simulation/keyboard/type_iframe.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../browser.js" 2 | import { createPositionedIframe } from "../../@helpers.js" 3 | 4 | 5 | //━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6 | it('Typing in the elements inside of the iframe should work', async t => { 7 | const iframe = await createPositionedIframe('about:blank', { left : 50, top : 50, width : 300, height : 300 }) 8 | iframe.style.border = '1px solid blue' 9 | 10 | const iframeDoc = iframe.contentDocument 11 | 12 | const input = iframeDoc.createElement('input') 13 | 14 | iframeDoc.body.appendChild(input) 15 | 16 | await t.type(input, 'foobar') 17 | 18 | t.is(input.value, 'foobar', 'Correct text typed in the input field') 19 | }) 20 | -------------------------------------------------------------------------------- /packages/siesta/tests_browser/util/coordinates/offset.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../browser.js" 2 | import { normalizeOffset } from "../../../src/util_browser/Coordinates.js" 3 | import { createPositionedElement } from "../../@helpers.js" 4 | 5 | 6 | it('Should support offset expressions', async t => { 7 | const div = createPositionedElement('div', { left : 10, top : 10, width : 40, height : 40 }) 8 | 9 | document.body.appendChild(div) 10 | 11 | t.equal(normalizeOffset(div), [ 20, 20 ]) 12 | 13 | t.equal(normalizeOffset(div, [ '10%', '10%' ]), [ 4, 4 ]) 14 | 15 | t.equal(normalizeOffset(div, [ '10% + 1', '10%-1' ]), [ 5, 3 ]) 16 | }) 17 | 18 | -------------------------------------------------------------------------------- /packages/siesta/tests_deno/@sample_test_suites/browser/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../../../browser.js" 2 | 3 | const project = Project.new({ 4 | title : 'Browser test suite' 5 | }) 6 | 7 | project.plan( 8 | 'test_1.t.js', 9 | 'test_2.t.js' 10 | ) 11 | 12 | project.start() 13 | 14 | -------------------------------------------------------------------------------- /packages/siesta/tests_deno/@sample_test_suites/browser/test_1.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../browser.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_deno/@sample_test_suites/browser/test_2.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../browser.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_deno/@sample_test_suites/deno/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../../../deno.js" 2 | 3 | const project = Project.new({ 4 | title : 'Deno test suite' 5 | }) 6 | 7 | // by default, w/o any `project.plan*` calls, Deno project includes all `*.t.m?js` files from the project file directory 8 | 9 | project.start() 10 | 11 | -------------------------------------------------------------------------------- /packages/siesta/tests_deno/@sample_test_suites/deno/test_1.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../deno.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_deno/@sample_test_suites/deno/test_2.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../deno.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_deno/@sample_test_suites/isomorphic/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../../../index.js" 2 | 3 | const project = Project.new({ 4 | title : 'Isomorphic test suite' 5 | }) 6 | 7 | project.plan( 8 | 'test_1.t.js', 9 | 'test_2.t.js' 10 | ) 11 | 12 | project.start() 13 | 14 | -------------------------------------------------------------------------------- /packages/siesta/tests_deno/@sample_test_suites/isomorphic/test_1.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_deno/@sample_test_suites/isomorphic/test_2.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_deno/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../deno.js" 2 | 3 | const project = Project.new({ 4 | title : 'Siesta 6 Deno specific test suite', 5 | 6 | testDescriptor : {} 7 | }) 8 | 9 | project.plan( 10 | { 11 | url : 'plan', 12 | 13 | items : [ 14 | 'project_plan.t.js' 15 | ] 16 | }, 17 | ) 18 | 19 | project.start() 20 | 21 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/browser/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../../../browser.js" 2 | 3 | const project = Project.new({ 4 | title : 'Browser test suite' 5 | }) 6 | 7 | project.plan( 8 | 'test_1.t.js', 9 | 'test_2.t.js' 10 | ) 11 | 12 | project.start() 13 | 14 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/browser/test_1.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../browser.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/browser/test_2.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../browser.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | 8 | //---------------------------------- 9 | // need to have the async assertions in the sample suite 10 | // to verify their serialization in the reports 11 | await t.waitFor(1) 12 | 13 | let flag = false 14 | 15 | setTimeout(() => flag = true, 10) 16 | 17 | t.waitFor(() => flag) 18 | }) 19 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/deno/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../../../deno.js" 2 | 3 | const project = Project.new({ 4 | title : 'Deno test suite' 5 | }) 6 | 7 | // by default, w/o any `project.plan*` calls, Deno project includes all `*.t.m?js` files from the project file directory 8 | 9 | project.start() 10 | 11 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/deno/test_1.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../deno.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/deno/test_2.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../deno.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | 8 | //---------------------------------- 9 | // need to have the async assertions in the sample suite 10 | // to verify their serialization in the reports 11 | await t.waitFor(1) 12 | 13 | let flag = false 14 | 15 | setTimeout(() => flag = true, 10) 16 | 17 | t.waitFor(() => flag) 18 | }) 19 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/isomorphic/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../../../index.js" 2 | 3 | const project = Project.new({ 4 | title : 'Isomorphic test suite' 5 | }) 6 | 7 | project.plan( 8 | 'test_1.t.js', 9 | 'test_2.t.js' 10 | ) 11 | 12 | project.start() 13 | 14 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/isomorphic/test_1.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/isomorphic/test_2.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../index.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | 8 | //---------------------------------- 9 | // need to have the async assertions in the sample suite 10 | // to verify their serialization in the reports 11 | await t.waitFor(1) 12 | 13 | let flag = false 14 | 15 | setTimeout(() => flag = true, 10) 16 | 17 | t.waitFor(() => flag) 18 | }) 19 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/nodejs/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../../../nodejs.js" 2 | 3 | const project = Project.new({ 4 | title : 'Node.js test suite' 5 | }) 6 | 7 | // by default, w/o any `project.plan*` calls, Node.js project includes all `*.t.m?js` files from the project file directory 8 | 9 | project.start() 10 | 11 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/nodejs/test_1.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../nodejs.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | }) 8 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/@sample_test_suites/nodejs/test_2.t.ts: -------------------------------------------------------------------------------- 1 | import { it } from "../../../nodejs.js" 2 | 3 | it('Sample test', async t => { 4 | t.is(1, 1) 5 | 6 | t.equal([ 1 ], [ 1 ]) 7 | 8 | //---------------------------------- 9 | // need to have the async assertions in the sample suite 10 | // to verify their serialization in the reports 11 | await t.waitFor(1) 12 | 13 | let flag = false 14 | 15 | setTimeout(() => flag = true, 10) 16 | 17 | t.waitFor(() => flag) 18 | }) 19 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/index.ts: -------------------------------------------------------------------------------- 1 | import { Project } from "../nodejs.js" 2 | 3 | const project = Project.new({ 4 | title : 'Siesta 6 Node.js specific test suite', 5 | 6 | testDescriptor : {} 7 | }) 8 | 9 | project.includeDir('./') 10 | project.excludeDir('./@sample_test_suites') 11 | 12 | project.start() 13 | 14 | -------------------------------------------------------------------------------- /packages/siesta/tests_nodejs/serializer/serializer_xml.t.tsx: -------------------------------------------------------------------------------- 1 | import { it } from "../../nodejs.js" 2 | import { TextJSX } from "../../src/jsx/TextJSX.js" 3 | import { serializeToElement } from "../../src/serializer/Serial.js" 4 | 5 | 6 | it('Serialization should not throw on built-in objects', async t => { 7 | t.doesNotThrow(() => serializeToElement(process)) 8 | }) 9 | -------------------------------------------------------------------------------- /packages/siesta/web_modules/import-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "imports": { 3 | "minimatch": "./minimatch.js" 4 | } 5 | } -------------------------------------------------------------------------------- /packages/siesta/workspace: -------------------------------------------------------------------------------- 1 | ../../.. -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/chained-iterator' 3 | - 'packages/chronograph' 4 | - 'packages/dev-scripts' 5 | - 'packages/siesta' 6 | - 'packages/siesta-example-browser' 7 | - 'packages/siesta-example-deno' 8 | - 'packages/siesta-example-isomorphic' 9 | - 'packages/siesta-example-nodejs' 10 | - 'packages/typescript-mixin-class' 11 | - 'packages/typescript-serializable-mixin' 12 | -------------------------------------------------------------------------------- /scripts/make_dist.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # exit early if any of the commands failed 4 | set -e 5 | # enable **, ! in globs 6 | shopt -s globstar extglob 7 | 8 | declarations="" 9 | 10 | while getopts "d" opt; do 11 | case "$opt" in 12 | d) declarations="-d" 13 | ;; 14 | esac 15 | done 16 | 17 | 18 | DIR="$( cd "$( dirname "$0" )" && cd .. && pwd )" 19 | DIST="$DIR/SIESTA_DIST" 20 | 21 | rm -rf "$DIST" 22 | mkdir -p "$DIST" 23 | 24 | rsync -l -I -r --exclude 'node_modules' --exclude '.git' --exclude 'SIESTA_DIST' --exclude '.idea' "$DIR/" "$DIST/" 25 | 26 | cd "$DIST" 27 | 28 | pnpm i 29 | -------------------------------------------------------------------------------- /scripts/sync_dist.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # exit early if any of the commands failed 4 | set -e 5 | # enable **, ! in globs 6 | shopt -s globstar extglob 7 | 8 | declarations="" 9 | siesta_compile_options="-r -e -b -d" 10 | 11 | while getopts "ds:" opt; do 12 | case "$opt" in 13 | d) declarations="-d" 14 | ;; 15 | s) siesta_compile_options="$OPTARG" 16 | ;; 17 | esac 18 | done 19 | 20 | 21 | DIR="$( cd "$( dirname "$0" )" && cd .. && pwd )" 22 | DIST="$DIR/SIESTA_DIST" 23 | 24 | $DIR/scripts/make_dist.sh 25 | 26 | ( 27 | cd $DIST 28 | 29 | echo $(pwd) 30 | 31 | (cd packages/siesta && npx sass resources/styling) 32 | 33 | scripts/compile.sh -s "-r" 34 | ) 35 | --------------------------------------------------------------------------------