create-wdio 9.32.0-alpha.3 → 9.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,18 @@ export declare function runConfigCommand(parsedAnswers: ParsedAnswers, npmTag: s
7
7
  * @param {Function} runConfigCmd runConfig method to be replaceable for unit testing
8
8
  */
9
9
  export declare function missingConfigurationPrompt(command: string, configPath: string, runConfigCmd?: Function): Promise<string>;
10
+ /**
11
+ * Resolve where the generated WDIO TypeScript config should live.
12
+ * Never overwrite an existing root `tsconfig.json` — when that would happen
13
+ * (for example a direct-child spec glob like `e2e/*.ts`), fall back to a
14
+ * dedicated `tsconfig.e2e.json` / `tsconfig.wdio.json`.
15
+ */
16
+ export declare function resolveTsConfigFilePath({ projectRootDir, hasRootTSConfig, specs, runnerShort }: {
17
+ projectRootDir: string;
18
+ hasRootTSConfig: boolean;
19
+ specs?: string;
20
+ runnerShort: string;
21
+ }): string;
10
22
  export declare const parseAnswers: (yes: boolean) => Promise<ParsedAnswers>;
11
23
  /**
12
24
  * Helper utility used in `run` and `install` command to check whether a config file currently exists
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/cli/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGhD,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBA+BlF;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,GAAE,QAA2B,mBA+B9H;AAED,eAAO,MAAM,YAAY,GAAmB,KAAK,OAAO,KAAG,OAAO,CAAC,aAAa,CAyF/E,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,qBAAqB,EAAC,MAAM,EAAE,UAAU,CAAC,EAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAcrH"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/cli/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGhD,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAoClF;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,GAAE,QAA2B,mBA+B9H;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,EACpC,cAAc,EACd,eAAe,EACf,KAAK,EACL,WAAW,EACd,EAAE;IACC,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;CACtB,UAwBA;AAED,eAAO,MAAM,YAAY,GAAmB,KAAK,OAAO,KAAG,OAAO,CAAC,aAAa,CA2E/E,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,qBAAqB,EAAC,MAAM,EAAE,UAAU,CAAC,EAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAcrH"}
@@ -291,9 +291,6 @@ async function setupTypeScript(parsedAnswers) {
291
291
  if (!parsedAnswers.isUsingTypeScript) {
292
292
  return;
293
293
  }
294
- if (parsedAnswers.hasRootTSConfig) {
295
- return;
296
- }
297
294
  console.log("Setting up TypeScript...");
298
295
  const frameworkPackage = convertPackageHashToObject(parsedAnswers.rawAnswers.framework);
299
296
  const servicePackages = parsedAnswers.rawAnswers.services.map((service) => convertPackageHashToObject(service));
@@ -360,11 +357,37 @@ async function setupTypeScript(parsedAnswers) {
360
357
  jsxFragmentFactory: "Fragment"
361
358
  } : {}
362
359
  )
363
- },
364
- include: preset === "svelte" ? ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"] : preset === "vue" ? ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] : ["test", "wdio.conf.ts"]
360
+ }
361
+ };
362
+ const tsConfigDir = path.dirname(parsedAnswers.tsConfigFilePath);
363
+ const toPosix = (value) => value.replace(/\\/g, "/");
364
+ const getRelativePath = (target) => {
365
+ const relativePath = toPosix(
366
+ path.relative(tsConfigDir, path.resolve(parsedAnswers.projectRootDir, target))
367
+ );
368
+ return relativePath || ".";
365
369
  };
370
+ const toExtendsPath = (target) => {
371
+ const relativePath = getRelativePath(target);
372
+ if (relativePath === "." || relativePath.startsWith("./") || relativePath.startsWith("../") || path.isAbsolute(relativePath)) {
373
+ return relativePath;
374
+ }
375
+ return `./${relativePath}`;
376
+ };
377
+ if (parsedAnswers.hasRootTSConfig) {
378
+ config.extends = toExtendsPath("tsconfig.json");
379
+ }
380
+ const defaultSpecInclude = (parsedAnswers.destSpecRootPath && path.relative(parsedAnswers.projectRootDir, parsedAnswers.destSpecRootPath) || parsedAnswers.specs && path.dirname(
381
+ parsedAnswers.specs.split(/[\\/]/).filter((segment) => !segment.includes("*")).join(path.sep)
382
+ ) || "test").replace(/\\/g, "/");
383
+ const defaultWdioConfigInclude = (parsedAnswers.wdioConfigPath && path.relative(parsedAnswers.projectRootDir, parsedAnswers.wdioConfigPath) || "wdio.conf.ts").replace(/\\/g, "/");
384
+ const baseIncludes = preset === "svelte" ? ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"] : preset === "vue" ? ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] : [
385
+ defaultSpecInclude && defaultSpecInclude !== "." ? defaultSpecInclude : "test",
386
+ defaultWdioConfigInclude && defaultWdioConfigInclude !== "." ? defaultWdioConfigInclude : "wdio.conf.ts"
387
+ ];
388
+ Object.assign(config, { include: baseIncludes.map(getRelativePath) });
366
389
  if (parsedAnswers.framework === "cucumber") {
367
- config.include.push("features");
390
+ config.include.push(getRelativePath("features"));
368
391
  }
369
392
  await fs.mkdir(path.dirname(parsedAnswers.tsConfigFilePath), { recursive: true });
370
393
  await fs.writeFile(
@@ -781,7 +804,7 @@ var SUPPORTED_PACKAGES = {
781
804
  runner: [
782
805
  { name: "E2E Testing - of Web or Mobile Applications", value: "@wdio/local-runner$--$local$--$e2e" },
783
806
  { name: "Component or Unit Testing - in the browser\n > https://webdriver.io/docs/component-testing", value: "@wdio/browser-runner$--$browser$--$component" },
784
- { name: "Desktop Testing - of Electron, Tauri, or macOS Applications\n > https://webdriver.io/docs/desktop-testing", value: "@wdio/local-runner$--$local$--$desktop" },
807
+ { name: "Desktop Testing - of Electron, Tauri, Dioxus, or macOS Applications\n > https://webdriver.io/docs/desktop-testing", value: "@wdio/local-runner$--$local$--$desktop" },
785
808
  { name: "VS Code Extension Testing\n > https://webdriver.io/docs/vscode-extension-testing", value: "@wdio/local-runner$--$local$--$vscode" },
786
809
  { name: "Roku Testing - of OTT apps running on RokuOS\n > https://webdriver.io/docs/wdio-roku-service", value: "@wdio/local-runner$--$local$--$roku" }
787
810
  ],
@@ -835,6 +858,7 @@ var SUPPORTED_PACKAGES = {
835
858
  { name: "electron", value: "@wdio/electron-service$--$electron" },
836
859
  { name: "tauri", value: "@wdio/tauri-service$--$tauri" },
837
860
  { name: "tauri-plugin", value: "@wdio/tauri-plugin$--$tauri-plugin" },
861
+ { name: "dioxus", value: "@wdio/dioxus-service$--$dioxus" },
838
862
  { name: "appium", value: "@wdio/appium-service$--$appium" },
839
863
  // external
840
864
  { name: "camera", value: "wdio-camera-service$--$camera" },
@@ -955,6 +979,40 @@ function buildTauriBanner(driverProvider, useFrontendPlugin) {
955
979
  );
956
980
  return lines.join("\n");
957
981
  }
982
+ function buildDioxusBanner(driverProvider) {
983
+ const lines = [
984
+ "",
985
+ "\u{1F980} Dioxus requires a couple of Rust-side additions before tests can run:",
986
+ "",
987
+ " 1. Add the WebdriverIO bridge crate to your Cargo.toml:",
988
+ "",
989
+ " [dependencies]",
990
+ ' wdio-dioxus-bridge = "1"',
991
+ "",
992
+ " 2. Install it into your desktop config in `src/main.rs` (debug builds only):",
993
+ "",
994
+ " let mut config = dioxus::desktop::Config::new();",
995
+ " #[cfg(debug_assertions)]",
996
+ " {",
997
+ " config = wdio_dioxus_bridge::install(config);",
998
+ " }",
999
+ " dioxus::LaunchBuilder::desktop().with_cfg(config).launch(App);",
1000
+ ""
1001
+ ];
1002
+ if (driverProvider === "External driver via wdio-dioxus-driver (Windows only)" /* External */) {
1003
+ lines.push(
1004
+ " The `external` provider (Windows only) also needs the driver binary:",
1005
+ "",
1006
+ " cargo install wdio-dioxus-driver --locked",
1007
+ ""
1008
+ );
1009
+ }
1010
+ lines.push(
1011
+ "Full Dioxus setup docs:",
1012
+ " \u{1F517} https://webdriver.io/docs/desktop-testing/dioxus"
1013
+ );
1014
+ return lines.join("\n");
1015
+ }
958
1016
  var ProtocolOptions = /* @__PURE__ */ ((ProtocolOptions2) => {
959
1017
  ProtocolOptions2["HTTPS"] = "https";
960
1018
  ProtocolOptions2["HTTP"] = "http";
@@ -983,6 +1041,7 @@ var ElectronBuildToolChoice = /* @__PURE__ */ ((ElectronBuildToolChoice2) => {
983
1041
  var DesktopFrameworkChoice = /* @__PURE__ */ ((DesktopFrameworkChoice2) => {
984
1042
  DesktopFrameworkChoice2["Electron"] = "Electron (https://www.electronjs.org/)";
985
1043
  DesktopFrameworkChoice2["Tauri"] = "Tauri (https://tauri.app/)";
1044
+ DesktopFrameworkChoice2["Dioxus"] = "Dioxus (https://dioxuslabs.com/)";
986
1045
  DesktopFrameworkChoice2["MacOS"] = "Native macOS app";
987
1046
  return DesktopFrameworkChoice2;
988
1047
  })(DesktopFrameworkChoice || {});
@@ -992,6 +1051,11 @@ var TauriDriverProviderChoice = /* @__PURE__ */ ((TauriDriverProviderChoice2) =>
992
1051
  TauriDriverProviderChoice2["Embedded"] = "Embedded driver via tauri-plugin-wdio-webdriver crate";
993
1052
  return TauriDriverProviderChoice2;
994
1053
  })(TauriDriverProviderChoice || {});
1054
+ var DioxusDriverProviderChoice = /* @__PURE__ */ ((DioxusDriverProviderChoice2) => {
1055
+ DioxusDriverProviderChoice2["Embedded"] = "Embedded in-process driver (recommended \u2014 no external driver, all platforms)";
1056
+ DioxusDriverProviderChoice2["External"] = "External driver via wdio-dioxus-driver (Windows only)";
1057
+ return DioxusDriverProviderChoice2;
1058
+ })(DioxusDriverProviderChoice || {});
995
1059
  var SUPPORTED_BROWSER_RUNNER_PRESETS = [
996
1060
  { name: "Lit (https://lit.dev/)", value: "$--$" },
997
1061
  { name: "Vue.js (https://vuejs.org/)", value: "@vitejs/plugin-vue$--$vue" },
@@ -1016,6 +1080,8 @@ function getResolvedPurpose(answers) {
1016
1080
  switch (answers.desktopFramework) {
1017
1081
  case "Tauri (https://tauri.app/)" /* Tauri */:
1018
1082
  return "tauri";
1083
+ case "Dioxus (https://dioxuslabs.com/)" /* Dioxus */:
1084
+ return "dioxus";
1019
1085
  case "Native macOS app" /* MacOS */:
1020
1086
  return "macos";
1021
1087
  case "Electron (https://www.electronjs.org/)" /* Electron */:
@@ -1137,6 +1203,23 @@ var QUESTIONNAIRE = [{
1137
1203
  /* istanbul ignore next */
1138
1204
  (answers) => getResolvedPurpose(answers) === "tauri"
1139
1205
  )
1206
+ }, {
1207
+ type: "list",
1208
+ name: "dioxusDriverProvider",
1209
+ message: "Which WebDriver provider would you like to use for Dioxus?",
1210
+ choices: Object.values(DioxusDriverProviderChoice),
1211
+ when: (
1212
+ /* istanbul ignore next */
1213
+ (answers) => getResolvedPurpose(answers) === "dioxus"
1214
+ )
1215
+ }, {
1216
+ type: "input",
1217
+ name: "dioxusAppBinaryPath",
1218
+ message: "Path to your built Dioxus debug binary (e.g. ./target/debug/my-app)?",
1219
+ when: (
1220
+ /* istanbul ignore next */
1221
+ (answers) => getResolvedPurpose(answers) === "dioxus"
1222
+ )
1140
1223
  }, {
1141
1224
  type: "list",
1142
1225
  name: "backend",
@@ -1337,7 +1420,7 @@ var QUESTIONNAIRE = [{
1337
1420
  if (isBrowserRunner(answers)) {
1338
1421
  return SUPPORTED_PACKAGES.framework.slice(0, 1);
1339
1422
  }
1340
- if (["electron", "tauri"].includes(getResolvedPurpose(answers))) {
1423
+ if (["electron", "tauri", "dioxus"].includes(getResolvedPurpose(answers))) {
1341
1424
  return SUPPORTED_PACKAGES.framework.filter(
1342
1425
  ({ value }) => !value.startsWith("@serenity-js")
1343
1426
  );
@@ -1370,7 +1453,7 @@ var QUESTIONNAIRE = [{
1370
1453
  when: (
1371
1454
  /* istanbul ignore next */
1372
1455
  (answers) => {
1373
- if (["vscode", "electron", "tauri", "macos"].includes(getResolvedPurpose(answers)) && answers.framework.includes("cucumber")) {
1456
+ if (["vscode", "electron", "tauri", "dioxus", "macos"].includes(getResolvedPurpose(answers)) && answers.framework.includes("cucumber")) {
1374
1457
  return false;
1375
1458
  }
1376
1459
  return true;
@@ -1423,7 +1506,7 @@ var QUESTIONNAIRE = [{
1423
1506
  * and also not needed when running VS Code tests since the service comes with
1424
1507
  * its own page object implementation, nor when running Electron or MacOS tests
1425
1508
  */
1426
- !["vscode", "electron", "tauri", "macos"].includes(getResolvedPurpose(answers)) && /**
1509
+ !["vscode", "electron", "tauri", "dioxus", "macos"].includes(getResolvedPurpose(answers)) && /**
1427
1510
  * Serenity/JS generates Lean Page Objects by default, so there's no need to ask about it
1428
1511
  * See https://serenity-js.org/handbook/web-testing/page-objects-pattern/
1429
1512
  */
@@ -1506,6 +1589,8 @@ var QUESTIONNAIRE = [{
1506
1589
  tauriEntries.push(SUPPORTED_PACKAGES.service.find(({ name }) => name === "tauri-plugin"));
1507
1590
  }
1508
1591
  return tauriEntries;
1592
+ } else if (getResolvedPurpose(answers) === "dioxus") {
1593
+ return [SUPPORTED_PACKAGES.service.find(({ name }) => name === "dioxus")];
1509
1594
  } else if (getResolvedPurpose(answers) === "macos") {
1510
1595
  return [SUPPORTED_PACKAGES.service.find(({ name }) => name === "appium")];
1511
1596
  } else if (getResolvedPurpose(answers) === "roku") {
@@ -1532,6 +1617,8 @@ var QUESTIONNAIRE = [{
1532
1617
  if (answers.tauriUseFrontendPlugin) {
1533
1618
  defaultServices.push("tauri-plugin");
1534
1619
  }
1620
+ } else if (getResolvedPurpose(answers) === "dioxus") {
1621
+ defaultServices.push("dioxus");
1535
1622
  } else if (getResolvedPurpose(answers) === "roku") {
1536
1623
  defaultServices.push("roku");
1537
1624
  }
@@ -1610,6 +1697,11 @@ async function runConfigCommand(parsedAnswers, npmTag) {
1610
1697
  parsedAnswers.rawAnswers.tauriUseFrontendPlugin
1611
1698
  ));
1612
1699
  }
1700
+ if (parsedAnswers.purpose === "dioxus") {
1701
+ extraInfoParts.push(buildDioxusBanner(
1702
+ parsedAnswers.rawAnswers.dioxusDriverProvider
1703
+ ));
1704
+ }
1613
1705
  console.log(
1614
1706
  configHelperSuccessMessage({
1615
1707
  projectRootDir: parsedAnswers.projectRootDir,
@@ -1638,6 +1730,27 @@ async function missingConfigurationPrompt(command2, configPath, runConfigCmd = r
1638
1730
  await runConfigCmd(parsedAnswers, "latest");
1639
1731
  return configPath;
1640
1732
  }
1733
+ function resolveTsConfigFilePath({
1734
+ projectRootDir,
1735
+ hasRootTSConfig,
1736
+ specs,
1737
+ runnerShort
1738
+ }) {
1739
+ const rootTsConfigPath = path3.resolve(projectRootDir, "tsconfig.json");
1740
+ const dedicatedTsConfigPath = path3.resolve(
1741
+ projectRootDir,
1742
+ `tsconfig.${runnerShort === "local" ? "e2e" : "wdio"}.json`
1743
+ );
1744
+ if (!hasRootTSConfig) {
1745
+ return rootTsConfigPath;
1746
+ }
1747
+ if (!specs) {
1748
+ return dedicatedTsConfigPath;
1749
+ }
1750
+ const specPathWithoutGlobs = specs.split(path3.sep).filter((segment) => !segment.includes("*")).join(path3.sep);
1751
+ const candidate = path3.resolve(projectRootDir, path3.dirname(specPathWithoutGlobs), "tsconfig.json");
1752
+ return path3.resolve(candidate) === rootTsConfigPath ? dedicatedTsConfigPath : candidate;
1753
+ }
1641
1754
  var parseAnswers = async function(yes) {
1642
1755
  console.log(CONFIG_HELPER_INTRO);
1643
1756
  const answers = await getAnswers(yes);
@@ -1660,10 +1773,12 @@ var parseAnswers = async function(yes) {
1660
1773
  ...serenityPackages
1661
1774
  ].filter(Boolean);
1662
1775
  const hasRootTSConfig = await fs3.access(path3.resolve(projectRootDir, "tsconfig.json")).then(() => true, () => false);
1663
- const tsConfigFilePath = !hasRootTSConfig ? path3.resolve(projectRootDir, "tsconfig.json") : answers.specs ? path3.resolve(
1664
- path3.dirname(answers.specs.split(path3.sep).filter((s) => !s.includes("*")).join(path3.sep)),
1665
- "tsconfig.json"
1666
- ) : path3.resolve(projectRootDir, `tsconfig.${runnerPackage.short === "local" ? "e2e" : "wdio"}.json`);
1776
+ const tsConfigFilePath = resolveTsConfigFilePath({
1777
+ projectRootDir,
1778
+ hasRootTSConfig,
1779
+ specs: answers.specs,
1780
+ runnerShort: runnerPackage.short
1781
+ });
1667
1782
  const parsedPaths = getPathForFileGeneration(answers, projectRootDir);
1668
1783
  const isUsingTypeScript = answers.isUsingTypeScript;
1669
1784
  const wdioConfigFilename = `wdio.conf.${isUsingTypeScript ? "ts" : "js"}`;
@@ -60,6 +60,11 @@ export declare function usesSerenity(answers: Questionnair): boolean;
60
60
  * but the Rust side (Cargo.toml + plugin registration) needs manual edits.
61
61
  */
62
62
  export declare function buildTauriBanner(driverProvider: TauriDriverProviderChoice | undefined, useFrontendPlugin: boolean | undefined): string;
63
+ /**
64
+ * Build the post-install instructions for Dioxus users. The npm side is auto-installed,
65
+ * but the Rust side (the wdio-dioxus-bridge crate + its registration) needs manual edits.
66
+ */
67
+ export declare function buildDioxusBanner(driverProvider: DioxusDriverProviderChoice | undefined): string;
63
68
  declare enum ProtocolOptions {
64
69
  HTTPS = "https",
65
70
  HTTP = "http"
@@ -84,6 +89,7 @@ export declare enum ElectronBuildToolChoice {
84
89
  export declare enum DesktopFrameworkChoice {
85
90
  Electron = "Electron (https://www.electronjs.org/)",
86
91
  Tauri = "Tauri (https://tauri.app/)",
92
+ Dioxus = "Dioxus (https://dioxuslabs.com/)",
87
93
  MacOS = "Native macOS app"
88
94
  }
89
95
  export declare enum TauriDriverProviderChoice {
@@ -91,6 +97,10 @@ export declare enum TauriDriverProviderChoice {
91
97
  CrabNebula = "CrabNebula tauri-driver (managed cloud / drop-in)",
92
98
  Embedded = "Embedded driver via tauri-plugin-wdio-webdriver crate"
93
99
  }
100
+ export declare enum DioxusDriverProviderChoice {
101
+ Embedded = "Embedded in-process driver (recommended \u2014 no external driver, all platforms)",
102
+ External = "External driver via wdio-dioxus-driver (Windows only)"
103
+ }
94
104
  export declare const SUPPORTED_BROWSER_RUNNER_PRESETS: ({
95
105
  name: string;
96
106
  value: string;
@@ -99,7 +109,7 @@ export declare const SUPPORTED_BROWSER_RUNNER_PRESETS: ({
99
109
  value: null;
100
110
  })[];
101
111
  declare function isBrowserRunner(answers: Questionnair): boolean;
102
- export declare function getResolvedPurpose(answers: Questionnair): "e2e" | "vscode" | "electron" | "tauri" | "roku" | "component" | "macos";
112
+ export declare function getResolvedPurpose(answers: Questionnair): "e2e" | "vscode" | "electron" | "tauri" | "dioxus" | "roku" | "component" | "macos";
103
113
  export declare const TESTING_LIBRARY_PACKAGES: Record<string, string>;
104
114
  export declare const E2E_ENVIRONMENTS: {
105
115
  name: string;
@@ -176,6 +186,13 @@ export declare const QUESTIONNAIRE: ({
176
186
  default: boolean;
177
187
  when: (answers: Questionnair) => boolean;
178
188
  choices?: undefined;
189
+ } | {
190
+ type: string;
191
+ name: string;
192
+ message: string;
193
+ choices: DioxusDriverProviderChoice[];
194
+ when: (answers: Questionnair) => boolean;
195
+ default?: undefined;
179
196
  } | {
180
197
  type: string;
181
198
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM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QAAQ,sFAAiF;IACzF,QAAQ,0DAA0D;CACrE;AAED,eAAO,MAAM,gCAAgC;;;;;;IAS5C,CAAA;AAED,iBAAS,eAAe,CAAE,OAAO,EAAE,YAAY,WAE9C;AAID,wBAAgB,kBAAkB,CAAE,OAAO,EAAE,YAAY,uFAaxD;AAED,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM3D,CAAA;AAED,eAAO,MAAM,gBAAgB;;;GAG5B,CAAA;AAED,eAAO,MAAM,mBAAmB;;;GAG/B,CAAA;AACD,eAAO,MAAM,oBAAoB;;;;;;;;IAKhC,CAAA;AAqBD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAkBqB,YAAY;;;;;;;oBAYZ,YAAY;;;;;;;oBAMX,YAAY;;;;;;;oBAWb,YAAY;;;;;;;oBAMZ,YAAY;;;;;;;oBAWZ,YAAY;;;;;;;oBAWX,YAAY;;;;;;;;;;;oBAOb,YAAY;;;;;oBAuBZ,YAAY;;;;;;;;oBAMZ,YAAY;;;;;;;;oBAyBZ,YAAY;;;;;;oBAoDZ,YAAY;;;;;;uBAmCR,YAAY;;;;;;;;;;oBAsBhB,YAAY;uBAST,YAAY;;;;;;uBA8DZ,YAAY;oBAKf,YAAY;;;;;;;;;;;;;;;;uBAqCpC,YAAY;;;;uBAiCZ,YAAY;;;;;;;;;IAuDjC,CAAA;AAEF,eAAO,MAAM,kCAAkC,UAO9C,CAAA;AAED,eAAO,MAAM,iCAAiC,8CAG7C,CAAA"}
package/build/index.js CHANGED
@@ -191,7 +191,7 @@ var SUPPORTED_PACKAGES = {
191
191
  runner: [
192
192
  { name: "E2E Testing - of Web or Mobile Applications", value: "@wdio/local-runner$--$local$--$e2e" },
193
193
  { name: "Component or Unit Testing - in the browser\n > https://webdriver.io/docs/component-testing", value: "@wdio/browser-runner$--$browser$--$component" },
194
- { name: "Desktop Testing - of Electron, Tauri, or macOS Applications\n > https://webdriver.io/docs/desktop-testing", value: "@wdio/local-runner$--$local$--$desktop" },
194
+ { name: "Desktop Testing - of Electron, Tauri, Dioxus, or macOS Applications\n > https://webdriver.io/docs/desktop-testing", value: "@wdio/local-runner$--$local$--$desktop" },
195
195
  { name: "VS Code Extension Testing\n > https://webdriver.io/docs/vscode-extension-testing", value: "@wdio/local-runner$--$local$--$vscode" },
196
196
  { name: "Roku Testing - of OTT apps running on RokuOS\n > https://webdriver.io/docs/wdio-roku-service", value: "@wdio/local-runner$--$local$--$roku" }
197
197
  ],
@@ -245,6 +245,7 @@ var SUPPORTED_PACKAGES = {
245
245
  { name: "electron", value: "@wdio/electron-service$--$electron" },
246
246
  { name: "tauri", value: "@wdio/tauri-service$--$tauri" },
247
247
  { name: "tauri-plugin", value: "@wdio/tauri-plugin$--$tauri-plugin" },
248
+ { name: "dioxus", value: "@wdio/dioxus-service$--$dioxus" },
248
249
  { name: "appium", value: "@wdio/appium-service$--$appium" },
249
250
  // external
250
251
  { name: "camera", value: "wdio-camera-service$--$camera" },
@@ -324,6 +325,7 @@ var ElectronBuildToolChoice = /* @__PURE__ */ ((ElectronBuildToolChoice2) => {
324
325
  var DesktopFrameworkChoice = /* @__PURE__ */ ((DesktopFrameworkChoice2) => {
325
326
  DesktopFrameworkChoice2["Electron"] = "Electron (https://www.electronjs.org/)";
326
327
  DesktopFrameworkChoice2["Tauri"] = "Tauri (https://tauri.app/)";
328
+ DesktopFrameworkChoice2["Dioxus"] = "Dioxus (https://dioxuslabs.com/)";
327
329
  DesktopFrameworkChoice2["MacOS"] = "Native macOS app";
328
330
  return DesktopFrameworkChoice2;
329
331
  })(DesktopFrameworkChoice || {});
@@ -333,6 +335,11 @@ var TauriDriverProviderChoice = /* @__PURE__ */ ((TauriDriverProviderChoice2) =>
333
335
  TauriDriverProviderChoice2["Embedded"] = "Embedded driver via tauri-plugin-wdio-webdriver crate";
334
336
  return TauriDriverProviderChoice2;
335
337
  })(TauriDriverProviderChoice || {});
338
+ var DioxusDriverProviderChoice = /* @__PURE__ */ ((DioxusDriverProviderChoice2) => {
339
+ DioxusDriverProviderChoice2["Embedded"] = "Embedded in-process driver (recommended \u2014 no external driver, all platforms)";
340
+ DioxusDriverProviderChoice2["External"] = "External driver via wdio-dioxus-driver (Windows only)";
341
+ return DioxusDriverProviderChoice2;
342
+ })(DioxusDriverProviderChoice || {});
336
343
  var SUPPORTED_BROWSER_RUNNER_PRESETS = [
337
344
  { name: "Lit (https://lit.dev/)", value: "$--$" },
338
345
  { name: "Vue.js (https://vuejs.org/)", value: "@vitejs/plugin-vue$--$vue" },
@@ -357,6 +364,8 @@ function getResolvedPurpose(answers) {
357
364
  switch (answers.desktopFramework) {
358
365
  case "Tauri (https://tauri.app/)" /* Tauri */:
359
366
  return "tauri";
367
+ case "Dioxus (https://dioxuslabs.com/)" /* Dioxus */:
368
+ return "dioxus";
360
369
  case "Native macOS app" /* MacOS */:
361
370
  return "macos";
362
371
  case "Electron (https://www.electronjs.org/)" /* Electron */:
@@ -478,6 +487,23 @@ var QUESTIONNAIRE = [{
478
487
  /* istanbul ignore next */
479
488
  (answers) => getResolvedPurpose(answers) === "tauri"
480
489
  )
490
+ }, {
491
+ type: "list",
492
+ name: "dioxusDriverProvider",
493
+ message: "Which WebDriver provider would you like to use for Dioxus?",
494
+ choices: Object.values(DioxusDriverProviderChoice),
495
+ when: (
496
+ /* istanbul ignore next */
497
+ (answers) => getResolvedPurpose(answers) === "dioxus"
498
+ )
499
+ }, {
500
+ type: "input",
501
+ name: "dioxusAppBinaryPath",
502
+ message: "Path to your built Dioxus debug binary (e.g. ./target/debug/my-app)?",
503
+ when: (
504
+ /* istanbul ignore next */
505
+ (answers) => getResolvedPurpose(answers) === "dioxus"
506
+ )
481
507
  }, {
482
508
  type: "list",
483
509
  name: "backend",
@@ -678,7 +704,7 @@ var QUESTIONNAIRE = [{
678
704
  if (isBrowserRunner(answers)) {
679
705
  return SUPPORTED_PACKAGES.framework.slice(0, 1);
680
706
  }
681
- if (["electron", "tauri"].includes(getResolvedPurpose(answers))) {
707
+ if (["electron", "tauri", "dioxus"].includes(getResolvedPurpose(answers))) {
682
708
  return SUPPORTED_PACKAGES.framework.filter(
683
709
  ({ value }) => !value.startsWith("@serenity-js")
684
710
  );
@@ -711,7 +737,7 @@ var QUESTIONNAIRE = [{
711
737
  when: (
712
738
  /* istanbul ignore next */
713
739
  (answers) => {
714
- if (["vscode", "electron", "tauri", "macos"].includes(getResolvedPurpose(answers)) && answers.framework.includes("cucumber")) {
740
+ if (["vscode", "electron", "tauri", "dioxus", "macos"].includes(getResolvedPurpose(answers)) && answers.framework.includes("cucumber")) {
715
741
  return false;
716
742
  }
717
743
  return true;
@@ -764,7 +790,7 @@ var QUESTIONNAIRE = [{
764
790
  * and also not needed when running VS Code tests since the service comes with
765
791
  * its own page object implementation, nor when running Electron or MacOS tests
766
792
  */
767
- !["vscode", "electron", "tauri", "macos"].includes(getResolvedPurpose(answers)) && /**
793
+ !["vscode", "electron", "tauri", "dioxus", "macos"].includes(getResolvedPurpose(answers)) && /**
768
794
  * Serenity/JS generates Lean Page Objects by default, so there's no need to ask about it
769
795
  * See https://serenity-js.org/handbook/web-testing/page-objects-pattern/
770
796
  */
@@ -847,6 +873,8 @@ var QUESTIONNAIRE = [{
847
873
  tauriEntries.push(SUPPORTED_PACKAGES.service.find(({ name }) => name === "tauri-plugin"));
848
874
  }
849
875
  return tauriEntries;
876
+ } else if (getResolvedPurpose(answers) === "dioxus") {
877
+ return [SUPPORTED_PACKAGES.service.find(({ name }) => name === "dioxus")];
850
878
  } else if (getResolvedPurpose(answers) === "macos") {
851
879
  return [SUPPORTED_PACKAGES.service.find(({ name }) => name === "appium")];
852
880
  } else if (getResolvedPurpose(answers) === "roku") {
@@ -873,6 +901,8 @@ var QUESTIONNAIRE = [{
873
901
  if (answers.tauriUseFrontendPlugin) {
874
902
  defaultServices.push("tauri-plugin");
875
903
  }
904
+ } else if (getResolvedPurpose(answers) === "dioxus") {
905
+ defaultServices.push("dioxus");
876
906
  } else if (getResolvedPurpose(answers) === "roku") {
877
907
  defaultServices.push("roku");
878
908
  }
@@ -197,7 +197,7 @@ var SUPPORTED_PACKAGES = {
197
197
  runner: [
198
198
  { name: "E2E Testing - of Web or Mobile Applications", value: "@wdio/local-runner$--$local$--$e2e" },
199
199
  { name: "Component or Unit Testing - in the browser\n > https://webdriver.io/docs/component-testing", value: "@wdio/browser-runner$--$browser$--$component" },
200
- { name: "Desktop Testing - of Electron, Tauri, or macOS Applications\n > https://webdriver.io/docs/desktop-testing", value: "@wdio/local-runner$--$local$--$desktop" },
200
+ { name: "Desktop Testing - of Electron, Tauri, Dioxus, or macOS Applications\n > https://webdriver.io/docs/desktop-testing", value: "@wdio/local-runner$--$local$--$desktop" },
201
201
  { name: "VS Code Extension Testing\n > https://webdriver.io/docs/vscode-extension-testing", value: "@wdio/local-runner$--$local$--$vscode" },
202
202
  { name: "Roku Testing - of OTT apps running on RokuOS\n > https://webdriver.io/docs/wdio-roku-service", value: "@wdio/local-runner$--$local$--$roku" }
203
203
  ],
@@ -251,6 +251,7 @@ var SUPPORTED_PACKAGES = {
251
251
  { name: "electron", value: "@wdio/electron-service$--$electron" },
252
252
  { name: "tauri", value: "@wdio/tauri-service$--$tauri" },
253
253
  { name: "tauri-plugin", value: "@wdio/tauri-plugin$--$tauri-plugin" },
254
+ { name: "dioxus", value: "@wdio/dioxus-service$--$dioxus" },
254
255
  { name: "appium", value: "@wdio/appium-service$--$appium" },
255
256
  // external
256
257
  { name: "camera", value: "wdio-camera-service$--$camera" },
@@ -371,6 +372,40 @@ function buildTauriBanner(driverProvider, useFrontendPlugin) {
371
372
  );
372
373
  return lines.join("\n");
373
374
  }
375
+ function buildDioxusBanner(driverProvider) {
376
+ const lines = [
377
+ "",
378
+ "\u{1F980} Dioxus requires a couple of Rust-side additions before tests can run:",
379
+ "",
380
+ " 1. Add the WebdriverIO bridge crate to your Cargo.toml:",
381
+ "",
382
+ " [dependencies]",
383
+ ' wdio-dioxus-bridge = "1"',
384
+ "",
385
+ " 2. Install it into your desktop config in `src/main.rs` (debug builds only):",
386
+ "",
387
+ " let mut config = dioxus::desktop::Config::new();",
388
+ " #[cfg(debug_assertions)]",
389
+ " {",
390
+ " config = wdio_dioxus_bridge::install(config);",
391
+ " }",
392
+ " dioxus::LaunchBuilder::desktop().with_cfg(config).launch(App);",
393
+ ""
394
+ ];
395
+ if (driverProvider === "External driver via wdio-dioxus-driver (Windows only)" /* External */) {
396
+ lines.push(
397
+ " The `external` provider (Windows only) also needs the driver binary:",
398
+ "",
399
+ " cargo install wdio-dioxus-driver --locked",
400
+ ""
401
+ );
402
+ }
403
+ lines.push(
404
+ "Full Dioxus setup docs:",
405
+ " \u{1F517} https://webdriver.io/docs/desktop-testing/dioxus"
406
+ );
407
+ return lines.join("\n");
408
+ }
374
409
  var ProtocolOptions = /* @__PURE__ */ ((ProtocolOptions2) => {
375
410
  ProtocolOptions2["HTTPS"] = "https";
376
411
  ProtocolOptions2["HTTP"] = "http";
@@ -399,6 +434,7 @@ var ElectronBuildToolChoice = /* @__PURE__ */ ((ElectronBuildToolChoice2) => {
399
434
  var DesktopFrameworkChoice = /* @__PURE__ */ ((DesktopFrameworkChoice2) => {
400
435
  DesktopFrameworkChoice2["Electron"] = "Electron (https://www.electronjs.org/)";
401
436
  DesktopFrameworkChoice2["Tauri"] = "Tauri (https://tauri.app/)";
437
+ DesktopFrameworkChoice2["Dioxus"] = "Dioxus (https://dioxuslabs.com/)";
402
438
  DesktopFrameworkChoice2["MacOS"] = "Native macOS app";
403
439
  return DesktopFrameworkChoice2;
404
440
  })(DesktopFrameworkChoice || {});
@@ -408,6 +444,11 @@ var TauriDriverProviderChoice = /* @__PURE__ */ ((TauriDriverProviderChoice2) =>
408
444
  TauriDriverProviderChoice2["Embedded"] = "Embedded driver via tauri-plugin-wdio-webdriver crate";
409
445
  return TauriDriverProviderChoice2;
410
446
  })(TauriDriverProviderChoice || {});
447
+ var DioxusDriverProviderChoice = /* @__PURE__ */ ((DioxusDriverProviderChoice2) => {
448
+ DioxusDriverProviderChoice2["Embedded"] = "Embedded in-process driver (recommended \u2014 no external driver, all platforms)";
449
+ DioxusDriverProviderChoice2["External"] = "External driver via wdio-dioxus-driver (Windows only)";
450
+ return DioxusDriverProviderChoice2;
451
+ })(DioxusDriverProviderChoice || {});
411
452
  var SUPPORTED_BROWSER_RUNNER_PRESETS = [
412
453
  { name: "Lit (https://lit.dev/)", value: "$--$" },
413
454
  { name: "Vue.js (https://vuejs.org/)", value: "@vitejs/plugin-vue$--$vue" },
@@ -432,6 +473,8 @@ function getResolvedPurpose(answers) {
432
473
  switch (answers.desktopFramework) {
433
474
  case "Tauri (https://tauri.app/)" /* Tauri */:
434
475
  return "tauri";
476
+ case "Dioxus (https://dioxuslabs.com/)" /* Dioxus */:
477
+ return "dioxus";
435
478
  case "Native macOS app" /* MacOS */:
436
479
  return "macos";
437
480
  case "Electron (https://www.electronjs.org/)" /* Electron */:
@@ -553,6 +596,23 @@ var QUESTIONNAIRE = [{
553
596
  /* istanbul ignore next */
554
597
  (answers) => getResolvedPurpose(answers) === "tauri"
555
598
  )
599
+ }, {
600
+ type: "list",
601
+ name: "dioxusDriverProvider",
602
+ message: "Which WebDriver provider would you like to use for Dioxus?",
603
+ choices: Object.values(DioxusDriverProviderChoice),
604
+ when: (
605
+ /* istanbul ignore next */
606
+ (answers) => getResolvedPurpose(answers) === "dioxus"
607
+ )
608
+ }, {
609
+ type: "input",
610
+ name: "dioxusAppBinaryPath",
611
+ message: "Path to your built Dioxus debug binary (e.g. ./target/debug/my-app)?",
612
+ when: (
613
+ /* istanbul ignore next */
614
+ (answers) => getResolvedPurpose(answers) === "dioxus"
615
+ )
556
616
  }, {
557
617
  type: "list",
558
618
  name: "backend",
@@ -753,7 +813,7 @@ var QUESTIONNAIRE = [{
753
813
  if (isBrowserRunner(answers)) {
754
814
  return SUPPORTED_PACKAGES.framework.slice(0, 1);
755
815
  }
756
- if (["electron", "tauri"].includes(getResolvedPurpose(answers))) {
816
+ if (["electron", "tauri", "dioxus"].includes(getResolvedPurpose(answers))) {
757
817
  return SUPPORTED_PACKAGES.framework.filter(
758
818
  ({ value }) => !value.startsWith("@serenity-js")
759
819
  );
@@ -786,7 +846,7 @@ var QUESTIONNAIRE = [{
786
846
  when: (
787
847
  /* istanbul ignore next */
788
848
  (answers) => {
789
- if (["vscode", "electron", "tauri", "macos"].includes(getResolvedPurpose(answers)) && answers.framework.includes("cucumber")) {
849
+ if (["vscode", "electron", "tauri", "dioxus", "macos"].includes(getResolvedPurpose(answers)) && answers.framework.includes("cucumber")) {
790
850
  return false;
791
851
  }
792
852
  return true;
@@ -839,7 +899,7 @@ var QUESTIONNAIRE = [{
839
899
  * and also not needed when running VS Code tests since the service comes with
840
900
  * its own page object implementation, nor when running Electron or MacOS tests
841
901
  */
842
- !["vscode", "electron", "tauri", "macos"].includes(getResolvedPurpose(answers)) && /**
902
+ !["vscode", "electron", "tauri", "dioxus", "macos"].includes(getResolvedPurpose(answers)) && /**
843
903
  * Serenity/JS generates Lean Page Objects by default, so there's no need to ask about it
844
904
  * See https://serenity-js.org/handbook/web-testing/page-objects-pattern/
845
905
  */
@@ -922,6 +982,8 @@ var QUESTIONNAIRE = [{
922
982
  tauriEntries.push(SUPPORTED_PACKAGES.service.find(({ name }) => name === "tauri-plugin"));
923
983
  }
924
984
  return tauriEntries;
985
+ } else if (getResolvedPurpose(answers) === "dioxus") {
986
+ return [SUPPORTED_PACKAGES.service.find(({ name }) => name === "dioxus")];
925
987
  } else if (getResolvedPurpose(answers) === "macos") {
926
988
  return [SUPPORTED_PACKAGES.service.find(({ name }) => name === "appium")];
927
989
  } else if (getResolvedPurpose(answers) === "roku") {
@@ -948,6 +1010,8 @@ var QUESTIONNAIRE = [{
948
1010
  if (answers.tauriUseFrontendPlugin) {
949
1011
  defaultServices.push("tauri-plugin");
950
1012
  }
1013
+ } else if (getResolvedPurpose(answers) === "dioxus") {
1014
+ defaultServices.push("dioxus");
951
1015
  } else if (getResolvedPurpose(answers) === "roku") {
952
1016
  defaultServices.push("roku");
953
1017
  }
@@ -1214,9 +1278,6 @@ async function setupTypeScript(parsedAnswers) {
1214
1278
  if (!parsedAnswers.isUsingTypeScript) {
1215
1279
  return;
1216
1280
  }
1217
- if (parsedAnswers.hasRootTSConfig) {
1218
- return;
1219
- }
1220
1281
  console.log("Setting up TypeScript...");
1221
1282
  const frameworkPackage = convertPackageHashToObject(parsedAnswers.rawAnswers.framework);
1222
1283
  const servicePackages = parsedAnswers.rawAnswers.services.map((service) => convertPackageHashToObject(service));
@@ -1283,11 +1344,37 @@ async function setupTypeScript(parsedAnswers) {
1283
1344
  jsxFragmentFactory: "Fragment"
1284
1345
  } : {}
1285
1346
  )
1286
- },
1287
- include: preset === "svelte" ? ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"] : preset === "vue" ? ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] : ["test", "wdio.conf.ts"]
1347
+ }
1348
+ };
1349
+ const tsConfigDir = path2.dirname(parsedAnswers.tsConfigFilePath);
1350
+ const toPosix = (value) => value.replace(/\\/g, "/");
1351
+ const getRelativePath = (target) => {
1352
+ const relativePath = toPosix(
1353
+ path2.relative(tsConfigDir, path2.resolve(parsedAnswers.projectRootDir, target))
1354
+ );
1355
+ return relativePath || ".";
1356
+ };
1357
+ const toExtendsPath = (target) => {
1358
+ const relativePath = getRelativePath(target);
1359
+ if (relativePath === "." || relativePath.startsWith("./") || relativePath.startsWith("../") || path2.isAbsolute(relativePath)) {
1360
+ return relativePath;
1361
+ }
1362
+ return `./${relativePath}`;
1288
1363
  };
1364
+ if (parsedAnswers.hasRootTSConfig) {
1365
+ config.extends = toExtendsPath("tsconfig.json");
1366
+ }
1367
+ const defaultSpecInclude = (parsedAnswers.destSpecRootPath && path2.relative(parsedAnswers.projectRootDir, parsedAnswers.destSpecRootPath) || parsedAnswers.specs && path2.dirname(
1368
+ parsedAnswers.specs.split(/[\\/]/).filter((segment) => !segment.includes("*")).join(path2.sep)
1369
+ ) || "test").replace(/\\/g, "/");
1370
+ const defaultWdioConfigInclude = (parsedAnswers.wdioConfigPath && path2.relative(parsedAnswers.projectRootDir, parsedAnswers.wdioConfigPath) || "wdio.conf.ts").replace(/\\/g, "/");
1371
+ const baseIncludes = preset === "svelte" ? ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"] : preset === "vue" ? ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] : [
1372
+ defaultSpecInclude && defaultSpecInclude !== "." ? defaultSpecInclude : "test",
1373
+ defaultWdioConfigInclude && defaultWdioConfigInclude !== "." ? defaultWdioConfigInclude : "wdio.conf.ts"
1374
+ ];
1375
+ Object.assign(config, { include: baseIncludes.map(getRelativePath) });
1289
1376
  if (parsedAnswers.framework === "cucumber") {
1290
- config.include.push("features");
1377
+ config.include.push(getRelativePath("features"));
1291
1378
  }
1292
1379
  await fs2.mkdir(path2.dirname(parsedAnswers.tsConfigFilePath), { recursive: true });
1293
1380
  await fs2.writeFile(
@@ -1643,6 +1730,11 @@ async function runConfigCommand(parsedAnswers, npmTag) {
1643
1730
  parsedAnswers.rawAnswers.tauriUseFrontendPlugin
1644
1731
  ));
1645
1732
  }
1733
+ if (parsedAnswers.purpose === "dioxus") {
1734
+ extraInfoParts.push(buildDioxusBanner(
1735
+ parsedAnswers.rawAnswers.dioxusDriverProvider
1736
+ ));
1737
+ }
1646
1738
  console.log(
1647
1739
  configHelperSuccessMessage({
1648
1740
  projectRootDir: parsedAnswers.projectRootDir,
@@ -1671,6 +1763,27 @@ async function missingConfigurationPrompt(command2, configPath, runConfigCmd = r
1671
1763
  await runConfigCmd(parsedAnswers, "latest");
1672
1764
  return configPath;
1673
1765
  }
1766
+ function resolveTsConfigFilePath({
1767
+ projectRootDir,
1768
+ hasRootTSConfig,
1769
+ specs,
1770
+ runnerShort
1771
+ }) {
1772
+ const rootTsConfigPath = path3.resolve(projectRootDir, "tsconfig.json");
1773
+ const dedicatedTsConfigPath = path3.resolve(
1774
+ projectRootDir,
1775
+ `tsconfig.${runnerShort === "local" ? "e2e" : "wdio"}.json`
1776
+ );
1777
+ if (!hasRootTSConfig) {
1778
+ return rootTsConfigPath;
1779
+ }
1780
+ if (!specs) {
1781
+ return dedicatedTsConfigPath;
1782
+ }
1783
+ const specPathWithoutGlobs = specs.split(path3.sep).filter((segment) => !segment.includes("*")).join(path3.sep);
1784
+ const candidate = path3.resolve(projectRootDir, path3.dirname(specPathWithoutGlobs), "tsconfig.json");
1785
+ return path3.resolve(candidate) === rootTsConfigPath ? dedicatedTsConfigPath : candidate;
1786
+ }
1674
1787
  var parseAnswers = async function(yes) {
1675
1788
  console.log(CONFIG_HELPER_INTRO);
1676
1789
  const answers = await getAnswers(yes);
@@ -1693,10 +1806,12 @@ var parseAnswers = async function(yes) {
1693
1806
  ...serenityPackages
1694
1807
  ].filter(Boolean);
1695
1808
  const hasRootTSConfig = await fs3.access(path3.resolve(projectRootDir, "tsconfig.json")).then(() => true, () => false);
1696
- const tsConfigFilePath = !hasRootTSConfig ? path3.resolve(projectRootDir, "tsconfig.json") : answers.specs ? path3.resolve(
1697
- path3.dirname(answers.specs.split(path3.sep).filter((s) => !s.includes("*")).join(path3.sep)),
1698
- "tsconfig.json"
1699
- ) : path3.resolve(projectRootDir, `tsconfig.${runnerPackage.short === "local" ? "e2e" : "wdio"}.json`);
1809
+ const tsConfigFilePath = resolveTsConfigFilePath({
1810
+ projectRootDir,
1811
+ hasRootTSConfig,
1812
+ specs: answers.specs,
1813
+ runnerShort: runnerPackage.short
1814
+ });
1700
1815
  const parsedPaths = getPathForFileGeneration(answers, projectRootDir);
1701
1816
  const isUsingTypeScript = answers.isUsingTypeScript;
1702
1817
  const wdioConfigFilename = `wdio.conf.${isUsingTypeScript ? "ts" : "js"}`;
@@ -49,6 +49,13 @@ capabilities: [{<%
49
49
  // custom application args
50
50
  appArgs: []
51
51
  }<%
52
+ } else if (answers.purpose === 'dioxus') { %>
53
+ browserName: 'dioxus',
54
+ // path to your built Dioxus debug binary
55
+ // see https://webdriver.io/docs/desktop-testing/dioxus/configuration
56
+ 'dioxus:options': {
57
+ application: <%- JSON.stringify(answers.dioxusAppBinaryPath || './target/debug/my-app') %>
58
+ }<%
52
59
  } else {
53
60
  %>
54
61
  // capabilities for local browser web tests
@@ -20,6 +20,19 @@ services: [<%- answers.services.map((service) => {
20
20
  ]`
21
21
  } else if (service === 'tauri-plugin') {
22
22
  return /*js*/`'tauri-plugin'`
23
+ } else if (service === 'dioxus') {
24
+ const providerMap = {
25
+ 'Embedded in-process driver (recommended — no external driver, all platforms)': 'embedded',
26
+ 'External driver via wdio-dioxus-driver (Windows only)': 'external',
27
+ }
28
+ const provider = providerMap[answers.rawAnswers.dioxusDriverProvider] ?? 'embedded'
29
+ return /*js*/`[
30
+ 'dioxus',
31
+ {
32
+ driverProvider: '${provider}',
33
+ // see https://webdriver.io/docs/desktop-testing/dioxus/configuration for all options
34
+ }
35
+ ]`
23
36
  } else if (service === 'sauce' && answers.useSauceConnect) {
24
37
  return /*js*/`[
25
38
  'sauce',
@@ -7,6 +7,10 @@ if (answers.isUsingTypeScript && answers.purpose === 'tauri') {
7
7
  %>/// <reference types="@wdio/tauri-service" />
8
8
  <% }
9
9
 
10
+ if (answers.isUsingTypeScript && answers.purpose === 'dioxus') {
11
+ %>/// <reference types="@wdio/dioxus-service" />
12
+ <% }
13
+
10
14
  if (answers.isUsingTypeScript && answers.serenityAdapter) {
11
15
  %>import type { WebdriverIOConfig } from '@serenity-js/webdriverio'
12
16
  <% }
package/build/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { BackendChoice, RegionOptions, ElectronBuildToolChoice, DesktopFrameworkChoice, TauriDriverProviderChoice } from './constants.js';
1
+ import type { BackendChoice, RegionOptions, ElectronBuildToolChoice, DesktopFrameworkChoice, TauriDriverProviderChoice, DioxusDriverProviderChoice } from './constants.js';
2
2
  import type { PackageJson as typeFestPackageJson } from 'type-fest';
3
3
  import type { Package as normalizePackage } from 'normalize-package-data';
4
4
  export type NormalizedPackageJson = PackageJson & normalizePackage;
@@ -20,6 +20,8 @@ export interface Questionnair {
20
20
  tauriDriverProvider?: TauriDriverProviderChoice;
21
21
  tauriUseFrontendPlugin?: boolean;
22
22
  tauriAppBinaryPath?: string;
23
+ dioxusDriverProvider?: DioxusDriverProviderChoice;
24
+ dioxusAppBinaryPath?: string;
23
25
  backend?: BackendChoice;
24
26
  hostname?: string;
25
27
  port?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAC9I,OAAO,KAAK,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,WAAW,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzE,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,gBAAgB,CAAA;AAClE,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAE7C,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,OAAO,CAAA;IACb,GAAG,EAAE,OAAO,CAAA;IACZ,GAAG,EAAE,OAAO,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,iBAAiB,CAAC,EAAE,uBAAuB,CAAA;IAC3C,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,gBAAgB,CAAC,EAAE,sBAAsB,CAAA;IACzC,mBAAmB,CAAC,EA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,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,qBAAqB,CAAA;CACrC;AAED,MAAM,WAAW,uBAAuB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAA;IACrD,IAAI,EAAE,MAAM,CAAA;CACf"}
@@ -195,7 +195,7 @@ var SUPPORTED_PACKAGES = {
195
195
  runner: [
196
196
  { name: "E2E Testing - of Web or Mobile Applications", value: "@wdio/local-runner$--$local$--$e2e" },
197
197
  { name: "Component or Unit Testing - in the browser\n > https://webdriver.io/docs/component-testing", value: "@wdio/browser-runner$--$browser$--$component" },
198
- { name: "Desktop Testing - of Electron, Tauri, or macOS Applications\n > https://webdriver.io/docs/desktop-testing", value: "@wdio/local-runner$--$local$--$desktop" },
198
+ { name: "Desktop Testing - of Electron, Tauri, Dioxus, or macOS Applications\n > https://webdriver.io/docs/desktop-testing", value: "@wdio/local-runner$--$local$--$desktop" },
199
199
  { name: "VS Code Extension Testing\n > https://webdriver.io/docs/vscode-extension-testing", value: "@wdio/local-runner$--$local$--$vscode" },
200
200
  { name: "Roku Testing - of OTT apps running on RokuOS\n > https://webdriver.io/docs/wdio-roku-service", value: "@wdio/local-runner$--$local$--$roku" }
201
201
  ],
@@ -249,6 +249,7 @@ var SUPPORTED_PACKAGES = {
249
249
  { name: "electron", value: "@wdio/electron-service$--$electron" },
250
250
  { name: "tauri", value: "@wdio/tauri-service$--$tauri" },
251
251
  { name: "tauri-plugin", value: "@wdio/tauri-plugin$--$tauri-plugin" },
252
+ { name: "dioxus", value: "@wdio/dioxus-service$--$dioxus" },
252
253
  { name: "appium", value: "@wdio/appium-service$--$appium" },
253
254
  // external
254
255
  { name: "camera", value: "wdio-camera-service$--$camera" },
@@ -328,6 +329,7 @@ var ElectronBuildToolChoice = /* @__PURE__ */ ((ElectronBuildToolChoice2) => {
328
329
  var DesktopFrameworkChoice = /* @__PURE__ */ ((DesktopFrameworkChoice2) => {
329
330
  DesktopFrameworkChoice2["Electron"] = "Electron (https://www.electronjs.org/)";
330
331
  DesktopFrameworkChoice2["Tauri"] = "Tauri (https://tauri.app/)";
332
+ DesktopFrameworkChoice2["Dioxus"] = "Dioxus (https://dioxuslabs.com/)";
331
333
  DesktopFrameworkChoice2["MacOS"] = "Native macOS app";
332
334
  return DesktopFrameworkChoice2;
333
335
  })(DesktopFrameworkChoice || {});
@@ -337,6 +339,11 @@ var TauriDriverProviderChoice = /* @__PURE__ */ ((TauriDriverProviderChoice2) =>
337
339
  TauriDriverProviderChoice2["Embedded"] = "Embedded driver via tauri-plugin-wdio-webdriver crate";
338
340
  return TauriDriverProviderChoice2;
339
341
  })(TauriDriverProviderChoice || {});
342
+ var DioxusDriverProviderChoice = /* @__PURE__ */ ((DioxusDriverProviderChoice2) => {
343
+ DioxusDriverProviderChoice2["Embedded"] = "Embedded in-process driver (recommended \u2014 no external driver, all platforms)";
344
+ DioxusDriverProviderChoice2["External"] = "External driver via wdio-dioxus-driver (Windows only)";
345
+ return DioxusDriverProviderChoice2;
346
+ })(DioxusDriverProviderChoice || {});
340
347
  var SUPPORTED_BROWSER_RUNNER_PRESETS = [
341
348
  { name: "Lit (https://lit.dev/)", value: "$--$" },
342
349
  { name: "Vue.js (https://vuejs.org/)", value: "@vitejs/plugin-vue$--$vue" },
@@ -361,6 +368,8 @@ function getResolvedPurpose(answers) {
361
368
  switch (answers.desktopFramework) {
362
369
  case "Tauri (https://tauri.app/)" /* Tauri */:
363
370
  return "tauri";
371
+ case "Dioxus (https://dioxuslabs.com/)" /* Dioxus */:
372
+ return "dioxus";
364
373
  case "Native macOS app" /* MacOS */:
365
374
  return "macos";
366
375
  case "Electron (https://www.electronjs.org/)" /* Electron */:
@@ -482,6 +491,23 @@ var QUESTIONNAIRE = [{
482
491
  /* istanbul ignore next */
483
492
  (answers) => getResolvedPurpose(answers) === "tauri"
484
493
  )
494
+ }, {
495
+ type: "list",
496
+ name: "dioxusDriverProvider",
497
+ message: "Which WebDriver provider would you like to use for Dioxus?",
498
+ choices: Object.values(DioxusDriverProviderChoice),
499
+ when: (
500
+ /* istanbul ignore next */
501
+ (answers) => getResolvedPurpose(answers) === "dioxus"
502
+ )
503
+ }, {
504
+ type: "input",
505
+ name: "dioxusAppBinaryPath",
506
+ message: "Path to your built Dioxus debug binary (e.g. ./target/debug/my-app)?",
507
+ when: (
508
+ /* istanbul ignore next */
509
+ (answers) => getResolvedPurpose(answers) === "dioxus"
510
+ )
485
511
  }, {
486
512
  type: "list",
487
513
  name: "backend",
@@ -682,7 +708,7 @@ var QUESTIONNAIRE = [{
682
708
  if (isBrowserRunner(answers)) {
683
709
  return SUPPORTED_PACKAGES.framework.slice(0, 1);
684
710
  }
685
- if (["electron", "tauri"].includes(getResolvedPurpose(answers))) {
711
+ if (["electron", "tauri", "dioxus"].includes(getResolvedPurpose(answers))) {
686
712
  return SUPPORTED_PACKAGES.framework.filter(
687
713
  ({ value }) => !value.startsWith("@serenity-js")
688
714
  );
@@ -715,7 +741,7 @@ var QUESTIONNAIRE = [{
715
741
  when: (
716
742
  /* istanbul ignore next */
717
743
  (answers) => {
718
- if (["vscode", "electron", "tauri", "macos"].includes(getResolvedPurpose(answers)) && answers.framework.includes("cucumber")) {
744
+ if (["vscode", "electron", "tauri", "dioxus", "macos"].includes(getResolvedPurpose(answers)) && answers.framework.includes("cucumber")) {
719
745
  return false;
720
746
  }
721
747
  return true;
@@ -768,7 +794,7 @@ var QUESTIONNAIRE = [{
768
794
  * and also not needed when running VS Code tests since the service comes with
769
795
  * its own page object implementation, nor when running Electron or MacOS tests
770
796
  */
771
- !["vscode", "electron", "tauri", "macos"].includes(getResolvedPurpose(answers)) && /**
797
+ !["vscode", "electron", "tauri", "dioxus", "macos"].includes(getResolvedPurpose(answers)) && /**
772
798
  * Serenity/JS generates Lean Page Objects by default, so there's no need to ask about it
773
799
  * See https://serenity-js.org/handbook/web-testing/page-objects-pattern/
774
800
  */
@@ -851,6 +877,8 @@ var QUESTIONNAIRE = [{
851
877
  tauriEntries.push(SUPPORTED_PACKAGES.service.find(({ name }) => name === "tauri-plugin"));
852
878
  }
853
879
  return tauriEntries;
880
+ } else if (getResolvedPurpose(answers) === "dioxus") {
881
+ return [SUPPORTED_PACKAGES.service.find(({ name }) => name === "dioxus")];
854
882
  } else if (getResolvedPurpose(answers) === "macos") {
855
883
  return [SUPPORTED_PACKAGES.service.find(({ name }) => name === "appium")];
856
884
  } else if (getResolvedPurpose(answers) === "roku") {
@@ -877,6 +905,8 @@ var QUESTIONNAIRE = [{
877
905
  if (answers.tauriUseFrontendPlugin) {
878
906
  defaultServices.push("tauri-plugin");
879
907
  }
908
+ } else if (getResolvedPurpose(answers) === "dioxus") {
909
+ defaultServices.push("dioxus");
880
910
  } else if (getResolvedPurpose(answers) === "roku") {
881
911
  defaultServices.push("roku");
882
912
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAKtD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAkB7F,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,iBAchF;AAED,wBAAsB,iBAAiB,oBAStC;AAYD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,SAAS,GAAG,gBAAgB,CAGvF;AAED,wBAAs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E,MAAM;;;GAMzD;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,2BASxD;AAoBD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,sBAYvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-wdio",
3
- "version": "9.32.0-alpha.3+d8b6a29ba",
3
+ "version": "9.32.0",
4
4
  "description": "Install and setup a WebdriverIO project with all its dependencies in a single run",
5
5
  "author": "WebdriverIO Team <mail@webdriver.io>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/create-wdio",
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "d8b6a29ba73af54edb002d2a2e1a55b64849a8ef"
80
+ "gitHead": "5c2a318d9a5e8424a2f2de95df9374b89bda7936"
81
81
  }