E2E: cleanup utility#7171
Open
phyllis-sy-wu wants to merge 2 commits intopsyw-0401-E2E-migrate-remaining-tests-to-use-new-infrafrom
Open
E2E: cleanup utility#7171phyllis-sy-wu wants to merge 2 commits intopsyw-0401-E2E-migrate-remaining-tests-to-use-new-infrafrom
phyllis-sy-wu wants to merge 2 commits intopsyw-0401-E2E-migrate-remaining-tests-to-use-new-infrafrom
Conversation
This was referenced Apr 2, 2026
Contributor
Author
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5c6b425 to
7e992d2
Compare
1d49241 to
8be6206
Compare
b83a2b2 to
42157aa
Compare
42157aa to
bc5f2f8
Compare
8be6206 to
3a642b1
Compare
bc5f2f8 to
14613f3
Compare
3a642b1 to
a7567f7
Compare
f902ebd to
1899bb0
Compare
a7567f7 to
0e2a505
Compare
1899bb0 to
2d2cfbe
Compare
2d2cfbe to
a91fa51
Compare
04cbb24 to
57c09aa
Compare
a91fa51 to
98fd534
Compare
57c09aa to
9aa7b21
Compare
98fd534 to
0460404
Compare
Contributor
Differences in type declarationsWe 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:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/ui.d.ts import { Logger, LogLevel } from '../../public/node/output.js';
-import React from 'react';
import { Key, RenderOptions } from 'ink';
import { EventEmitter } from 'events';
-/**
- * Signal that the current Ink tree is done. Must be called within an
- * InkLifecycleRoot — throws if the provider is missing so lifecycle
- * bugs surface immediately instead of silently hanging.
- */
-export declare function useComplete(): (error?: Error) => void;
-/**
- * Root wrapper for Ink trees. Owns the single `exit()` call site — children
- * signal completion via `useComplete()`, which sets state here. The `useEffect`
- * fires post-render, guaranteeing all batched state updates have been flushed
- * before the tree is torn down.
- */
-export declare function InkLifecycleRoot({ children }: {
- children: React.ReactNode;
-}): React.JSX.Element;
interface RenderOnceOptions {
logLevel?: LogLevel;
logger?: Logger;
renderOptions?: RenderOptions;
}
export declare function renderOnce(element: JSX.Element, { logLevel, renderOptions }: RenderOnceOptions): string | undefined;
-export declare function render(element: JSX.Element, options?: RenderOptions): Promise<void>;
+export declare function render(element: JSX.Element, options?: RenderOptions): Promise<unknown>;
export declare class Stdout extends EventEmitter {
columns: number;
rows: number;
readonly frames: string[];
private _lastFrame?;
constructor(options: {
columns?: number;
rows?: number;
});
write: (frame: string) => void;
lastFrame: () => string | undefined;
}
export declare function handleCtrlC(input: string, key: Key, exit?: () => void): void;
export {};
packages/cli-kit/dist/public/node/ui.d.ts@@ -34,7 +34,7 @@ export interface RenderConcurrentOptions extends PartialBy<ConcurrentOutputProps
* 00:00:00 │ frontend │ third frontend message
*
*/
-export declare function renderConcurrent({ renderOptions, ...props }: RenderConcurrentOptions): Promise<void>;
+export declare function renderConcurrent({ renderOptions, ...props }: RenderConcurrentOptions): Promise<unknown>;
export type AlertCustomSection = CustomSection;
export type RenderAlertOptions = Omit<AlertOptions, 'type'>;
/**
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
E2E tests create apps on the Dev Dashboard that can accumulate over time — especially when tests fail mid-run, CI times out, or cleanup is skipped during development. This PR adds:
scripts/cleanup.ts) — bulk cleanup of leftover apps via browser automationE2E_SKIP_CLEANUPtoggle — env var to disable per-test teardown for debuggingteardownApp— rewritten with browser login, dashboard search, direct FQDN-based uninstall, and retry logicWHAT is this pull request doing?
New:
scripts/cleanup.tsStandalone cleanup script that finds E2E test apps on the Dev Dashboard, uninstalls them from all stores, and deletes them.
Features:
completeLoginhelperBROWSER_TIMEOUTconstantscleanupAllApps()for use as a Playwright globalTeardown in the futureUpdated:
teardownAppinsetup/app.tsRewritten with a reliable 4-step flow:
completeLogin(browser isn't authenticated ondev.shopify.comfrom the test's OAuth flow)?search={appName}(fast, no pagination)admin.shopify.com/store/{slug}/settings/appsvia known FQDNAll timeouts use shared
BROWSER_TIMEOUTconstants. Debug logging whenDEBUG=1.E2E_SKIP_CLEANUPtoggleAll test
finallyblocks check this env var. When set, both local file cleanup and remote app teardown are skipped:Design: two cleanup mechanisms
teardownApp(per-test, automatic) — knows the app name and store FQDN, uses direct URLs, no discovery. Runs in testfinallyblocks.cleanup.ts(bulk, manual) — discovers all matching apps via dashboard pagination, discovers stores via store switcher. Safety net for orphaned apps.How to test your changes?
Cleanup script:
E2E_SKIP_CLEANUP=1 DEBUG=1 pnpm --filter e2e exec playwright test app-deploypnpm test:e2e-cleanup -- --listpnpm test:e2e-cleanup -- --headedPer-test teardown:
DEBUG=1 pnpm --filter e2e exec playwright test app-deploy[e2e] teardown:steps (login, find, uninstall, delete)Measuring impact
Checklist