@testspectra/cli 1.0.27 → 1.0.28

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.
@@ -362,8 +362,8 @@ export async function addCommand(moduleNameArg, options = {}) {
362
362
  // Create starter page object
363
363
  const poContent = `class ${targetModule}Page {\n get mainTitle() {\n return $("h1");\n }\n\n async open() {\n await Spectra.navigate("/${targetModule.toLowerCase()}");\n }\n}\n\nexport default new ${targetModule}Page();\n`;
364
364
  fs.writeFileSync(path.join(poDir, "common.ts"), poContent, "utf-8");
365
- // Create starter test spec
366
- const specContent = `describe("${targetModule} Test Suite", () => {\n it("should verify ${targetModule} page components", async () => {\n await ${targetModule}Page.open();\n await ${targetModule}Page.mainTitle.shouldBeVisible();\n });\n});\n`;
365
+ // Create starter test spec (Zero-import, flat it() block)
366
+ const specContent = `it("should verify ${targetModule} page components", async () => {\n await ${targetModule}Page.open();\n await ${targetModule}Page.mainTitle.shouldBeVisible();\n});\n`;
367
367
  fs.writeFileSync(path.join(specDir, "web.test.ts"), specContent, "utf-8");
368
368
  TypeGenerator.writeDeclarationFiles(cwd);
369
369
  p.log.success(chalk.green(`Created Page Object: ./page-objects/${targetModule}Page/common.ts`));
@@ -471,24 +471,22 @@ TestSpectra completely eliminates boilerplate \`import\` statements across all t
471
471
 
472
472
  ### Code Example:
473
473
  \`\`\`typescript
474
- // modules/auth/e2e/specs/Auth/TC-AUTH-01/web.test.ts
475
- // 🌟 NOTICE: 100% Zero-Import statement! Everything resolves globally.
474
+ // packages/features/auth/e2e/specs/Auth/TC-AUTH-01/web.test.ts
475
+ // 🌟 NOTICE: 100% Zero-Import & Flat Execution! (No import statement, no describe wrapper)
476
476
 
477
- describe("Authentication Flow", () => {
478
- it("should navigate via shared header and login with local POM", async () => {
479
- // 1. Consumed from Shared Library (${sharedTestingRelPath}/page-objects/NavigationBar)
480
- await NavigationBar.goToLogin();
477
+ it("should navigate via shared header and login with local POM", async () => {
478
+ // 1. Consumed from Shared Testing Library (${sharedTestingRelPath}/page-objects/NavigationBar)
479
+ await NavigationBar.goToLogin();
481
480
 
482
- // 2. Consumed from Shared Library (${sharedTestingRelPath}/steps/loginAsAdmin)
483
- await Step.loginAsAdmin();
481
+ // 2. Consumed from Shared Testing Library (${sharedTestingRelPath}/steps/loginAsAdmin)
482
+ await Step.loginAsAdmin();
484
483
 
485
- // 3. Consumed from Local Feature POM (modules/auth/e2e/page-objects/LoginPage)
486
- await LoginPage.flashAlert.shouldBeVisible();
487
- await LoginPage.flashAlert.shouldContainText("Welcome");
484
+ // 3. Consumed from Local Feature POM (page-objects/LoginPage)
485
+ await LoginPage.flashAlert.shouldBeVisible();
486
+ await LoginPage.flashAlert.shouldContainText("Welcome");
488
487
 
489
- // 4. Consumed from Shared Library Custom Action (${sharedTestingRelPath}/actions/dismissBanner)
490
- await Spectra.dismissBanner();
491
- });
488
+ // 4. Consumed from Shared Testing Library Custom Action (${sharedTestingRelPath}/actions/dismissBanner)
489
+ await Spectra.dismissBanner();
492
490
  });
493
491
  \`\`\`
494
492
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testspectra/cli",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "TestSpectra Zero-Config Cross-Platform Test Runner CLI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",