Skip to content

QA to E2E: app basic flow from scratch (no extensions)#7080

Draft
phyllis-sy-wu wants to merge 1 commit intopsyw-0318-QAtoE2E-basic-flowfrom
psyw-0319-QAtoE2E-app-basic-flow-from-scratch
Draft

QA to E2E: app basic flow from scratch (no extensions)#7080
phyllis-sy-wu wants to merge 1 commit intopsyw-0318-QAtoE2E-basic-flowfrom
psyw-0319-QAtoE2E-app-basic-flow-from-scratch

Conversation

@phyllis-sy-wu
Copy link
Copy Markdown
Contributor

@phyllis-sy-wu phyllis-sy-wu commented Mar 23, 2026

WHY are these changes introduced?

Extends #7047 to test the full manual QA flow — creating brand-new apps from scratch instead of linking to pre-existing ones.

This is part of Vault project #gsd:49408 to automate CLI QA coverage.

WHAT is this pull request doing?

New: tests/app-from-scratch.spec.ts

Same 9-step flow as app-basic.spec.ts (#7047), but creates everything from scratch — no pre-existing apps needed.

Key differences from app-basic.spec.ts:

app-basic.spec.ts (#7047) app-from-scratch.spec.ts (this PR)
Step 1 Links to pre-existing app via SHOPIFY_FLAG_CLIENT_ID Creates a brand-new app via --organization-id + --name
Step 8 Links to pre-existing secondary app via --client-id Creates a new secondary app via app init, reads its client_id, then links
Auth OAuth login, keeps SHOPIFY_CLI_PARTNERS_TOKEN OAuth login, deletes token so CLI uses full OAuth session (needed for store lookups)
Env vars SHOPIFY_FLAG_CLIENT_ID, E2E_SECONDARY_CLIENT_ID E2E_ORG_ID, E2E_ACCOUNT_EMAIL, E2E_ACCOUNT_PASSWORD

Steps 2–7 (dev, execute, quit, clean, deploy, versions) are identical.

Cleanup

Automatic teardown is intentionally separated into a standalone cleanup utility (#7133) for clarity and easier review. The cleanup utility is expected to be integrated into the test suite as automatic post-test teardown in a future PR once both are stable.

For now, leftover test apps can be cleaned up manually using the cleanup utility from #7133.

Infrastructure changes

File Change
helpers/load-env.ts New shared .env parser (replaces duplicated implementations)
setup/app.ts Extracted buildScaffold() shared by both fixtures; added freshAppScaffoldFixture with --organization-id and SHOPIFY_FLAG_CLIENT_ID stripping
setup/cli.ts Extracted buildEnv() helper for env filtering; added extendEnv: false; added DEBUG logging for execCreateApp
setup/env.ts Added orgId to E2EEnv; added SHOPIFY_CLI_1P_DEV: undefined to prevent 1P dev auth
setup/auth.ts Deletes SHOPIFY_CLI_PARTNERS_TOKEN after OAuth login
playwright.config.ts Uses loadEnv helper for consistent .env parsing
tests-pr.yml Added E2E_ORG_ID secret

How to test your changes?

Setup

Requires a Shopify account that owns a dev store. Set in packages/e2e/.env:

E2E_ACCOUNT_EMAIL=<store owner email>
E2E_ACCOUNT_PASSWORD=<store owner password>
E2E_ORG_ID=<org that owns the store>
E2E_STORE_FQDN=<dev store>.myshopify.com

The account, org, and store must all belong to the same organization.

Running

DEBUG=1 pnpm --filter e2e exec playwright test app-from-scratch

Cleanup (manual, via #7133)

npx tsx packages/e2e/scripts/cleanup.ts --list    # preview
npx tsx packages/e2e/scripts/cleanup.ts            # full cleanup

Measuring impact

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Copy Markdown
Contributor Author

phyllis-sy-wu commented Mar 23, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 23, 2026

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 82.39% 15149/18387
🟡 Branches 74.91% 7460/9958
🟢 Functions 81.39% 3805/4675
🟢 Lines 82.78% 14323/17303

Test suite run success

4000 tests passing in 1531 suites.

Report generated by 🧪jest coverage report action from a60ce2c

@phyllis-sy-wu phyllis-sy-wu added the #gsd:49408 Agentic app validation label Mar 24, 2026
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0319-QAtoE2E-app-basic-flow-from-scratch branch from dae0ce6 to a60ce2c Compare March 31, 2026 17:04
@phyllis-sy-wu phyllis-sy-wu force-pushed the psyw-0318-QAtoE2E-basic-flow branch from 920b4e0 to 570abb2 Compare March 31, 2026 17:04
@phyllis-sy-wu phyllis-sy-wu mentioned this pull request Mar 31, 2026
3 tasks
@github-actions
Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/private/node/conf-store.d.ts
@@ -24,7 +24,6 @@ export interface ConfSchema {
     devSessionStore?: string;
     currentDevSessionId?: string;
     cache?: Cache;
-    autoUpgradeEnabled?: boolean;
 }
 /**
  * Get session.
@@ -126,18 +125,6 @@ interface RunWithRateLimitOptions {
  * @returns true, or undefined if the task was not run.
  */
 export declare function runWithRateLimit(options: RunWithRateLimitOptions, config?: LocalStorage<ConfSchema>): Promise<boolean>;
-/**
- * Get auto-upgrade preference.
- *
- * @returns Whether auto-upgrade is enabled, or undefined if never set.
- */
-export declare function getAutoUpgradeEnabled(config?: LocalStorage<ConfSchema>): boolean | undefined;
-/**
- * Set auto-upgrade preference.
- *
- * @param enabled - Whether auto-upgrade should be enabled.
- */
-export declare function setAutoUpgradeEnabled(enabled: boolean, config?: LocalStorage<ConfSchema>): void;
 export declare function getConfigStoreForPartnerStatus(): LocalStorage<Record<string, {
     status: true;
     checkedAt: string;
packages/cli-kit/dist/public/node/fs.d.ts
@@ -1,6 +1,6 @@
 import { OverloadParameters } from '../../private/common/ts/overloaded-parameters.js';
 import { RandomNameFamily } from '../common/string.js';
-import { findUp as internalFindUp, findUpSync as internalFindUpSync } from 'find-up';
+import { findUp as internalFindUp } from 'find-up';
 import { ReadStream, WriteStream } from 'fs';
 import type { Pattern, Options as GlobOptions } from 'fast-glob';
 /**
@@ -335,14 +335,6 @@ export declare function defaultEOL(): EOL;
  * @returns The first path found that matches or  if none could be found.
  */
 export declare function findPathUp(matcher: OverloadParameters<typeof internalFindUp>[0], options: OverloadParameters<typeof internalFindUp>[1]): ReturnType<typeof internalFindUp>;
-/**
- * Find a file by walking parent directories.
- *
- * @param matcher - A pattern or an array of patterns to match a file name.
- * @param options - Options for the search.
- * @returns The first path found that matches or  if none could be found.
- */
-export declare function findPathUpSync(matcher: OverloadParameters<typeof internalFindUp>[0], options: OverloadParameters<typeof internalFindUp>[1]): ReturnType<typeof internalFindUpSync>;
 export interface MatchGlobOptions {
     matchBase: boolean;
     noglobstar: boolean;
packages/cli-kit/dist/public/node/is-global.d.ts
@@ -26,14 +26,6 @@ export declare function installGlobalCLIPrompt(): Promise<InstallGlobalCLIPrompt
  * Infers the package manager used by the global CLI.
  *
  * @param argv - The arguments passed to the process.
- * @param env - The environment variables of the process.
  * @returns The package manager used by the global CLI.
  */
-export declare function inferPackageManagerForGlobalCLI(argv?: string[], env?: NodeJS.ProcessEnv): PackageManager;
-/**
- * Returns the project directory for the given path.
- *
- * @param directory - The path to search upward from.
- * @returns The project root directory, or undefined if not found.
- */
-export declare function getProjectDir(directory: string): string | undefined;
\ No newline at end of file
+export declare function inferPackageManagerForGlobalCLI(argv?: string[]): PackageManager;
\ No newline at end of file
packages/cli-kit/dist/public/node/node-package-manager.d.ts
@@ -25,7 +25,7 @@ export type DependencyType = 'dev' | 'prod' | 'peer';
 /**
  * A union that represents the package managers available.
  */
-export declare const packageManager: readonly ["yarn", "npm", "pnpm", "bun", "homebrew", "unknown"];
+export declare const packageManager: readonly ["yarn", "npm", "pnpm", "bun", "unknown"];
 export type PackageManager = (typeof packageManager)[number];
 /**
  * Returns an abort error that's thrown when the package manager can't be determined.
packages/cli-kit/dist/public/node/upgrade.d.ts
@@ -4,38 +4,11 @@
  *
  * @returns A string with the command to run.
  */
-export declare function cliInstallCommand(): string | undefined;
-/**
- * Runs the CLI upgrade using the appropriate package manager.
- * Determines the install command and executes it.
- *
- * @throws AbortError if the package manager or command cannot be determined.
- */
-export declare function runCLIUpgrade(): Promise<void>;
-/**
- * Returns the version to auto-upgrade to, or undefined if auto-upgrade should be skipped.
- * Auto-upgrade is disabled by default and must be enabled via .
- * Also skips for CI, pre-release versions, or when no newer version is available.
- *
- * @returns The version string to upgrade to, or undefined if no upgrade should happen.
- */
-export declare function versionToAutoUpgrade(): string | undefined;
-/**
- * Shows a daily upgrade-available warning for users who have not enabled auto-upgrade.
- * Skipped in CI and for pre-release versions. When auto-upgrade is enabled this is a no-op
- * because the postrun hook will handle the upgrade directly.
- */
-export declare function warnIfUpgradeAvailable(): Promise<void>;
+export declare function cliInstallCommand(): string;
 /**
  * Generates a message to remind the user to update the CLI.
  *
  * @param version - The version to update to.
  * @returns The message to remind the user to update the CLI.
  */
-export declare function getOutputUpdateCLIReminder(version: string): string;
-/**
- * Prompts the user to enable or disable automatic upgrades, then persists their choice.
- *
- * @returns Whether the user chose to enable auto-upgrade.
- */
-export declare function promptAutoUpgrade(): Promise<boolean>;
\ No newline at end of file
+export declare function getOutputUpdateCLIReminder(version: string): string;
\ No newline at end of file
packages/cli-kit/dist/public/node/version.d.ts
@@ -18,13 +18,4 @@ export declare function globalCLIVersion(): Promise<string | undefined>;
  * @param version - The version to check.
  * @returns True if the version is a pre-release version.
  */
-export declare function isPreReleaseVersion(version: string): boolean;
-/**
- * Checks if there is a major version change between two versions.
- * Pre-release versions (0.0.0-*) are treated as not having a major version change.
- *
- * @param currentVersion - The current version.
- * @param newerVersion - The newer version to compare against.
- * @returns True if there is a major version change.
- */
-export declare function isMajorVersionChange(currentVersion: string, newerVersion: string): boolean;
\ No newline at end of file
+export declare function isPreReleaseVersion(version: string): boolean;
\ No newline at end of file
packages/cli-kit/dist/private/node/api/graphql.d.ts
@@ -1,14 +1,4 @@
 import { Variables } from 'graphql-request';
 export declare function debugLogRequestInfo(api: string, query: string, url: string, variables?: Variables, headers?: Record<string, string>): void;
 export declare function sanitizeVariables(variables: Variables): string;
-/**
- * Extracts human-readable error messages from a GraphQL errors array.
- *
- * Some APIs (e.g. App Management) return structured errors nested inside
- * . When those are present, we extract
- * them so the CLI displays a clean message instead of a raw JSON dump.
- * Falls back to each error's top-level  field, and ultimately to
- * the full JSON representation if no messages can be extracted.
- */
-export declare function extractGraphQLErrorMessages(errors: any[] | undefined): string | undefined;
 export declare function errorHandler(api: string): (error: unknown, requestId?: string) => unknown;
\ No newline at end of file
packages/cli-kit/dist/public/node/hooks/postrun.d.ts
@@ -5,11 +5,4 @@ import { Hook } from '@oclif/core';
  * @returns Whether post run hook has completed.
  */
 export declare function postRunHookHasCompleted(): boolean;
-export declare const hook: Hook.Postrun;
-/**
- * Auto-upgrades the CLI after a command completes, if a newer version is available.
- * The entire flow is rate-limited to once per day unless forced via SHOPIFY_CLI_FORCE_AUTO_UPGRADE.
- *
- * @returns Resolves when the upgrade attempt (or fallback warning) is complete.
- */
-export declare function autoUpgradeIfNeeded(): Promise<void>;
\ No newline at end of file
+export declare const hook: Hook.Postrun;
\ No newline at end of file
packages/cli-kit/dist/public/node/hooks/prerun.d.ts
@@ -11,7 +11,6 @@ export declare function parseCommandContent(cmdInfo: {
     pluginAlias?: string;
 }): CommandContent;
 /**
- * Triggers a background check for a newer CLI version (non-blocking).
- * The result is cached and consumed by the postrun hook for auto-upgrade.
+ * Warns the user if there is a new version of the CLI available
  */
-export declare function checkForNewVersionInBackground(): void;
\ No newline at end of file
+export declare function warnOnAvailableUpgrade(): Promise<void>;
\ No newline at end of file

@phyllis-sy-wu phyllis-sy-wu marked this pull request as ready for review March 31, 2026 17:24
@phyllis-sy-wu phyllis-sy-wu requested a review from a team as a code owner March 31, 2026 17:24
@phyllis-sy-wu phyllis-sy-wu marked this pull request as draft March 31, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:49408 Agentic app validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant