fix(import): harden the desktop import flow

This commit is contained in:
Mohamed Boudra
2026-07-20 15:16:03 +02:00
parent 9519c5ba99
commit 81bffbd01a
4 changed files with 10 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ test.skip(process.env.E2E_DESKTOP_RUNTIME !== "1", "requires the real Electron p
test.setTimeout(180_000);
const repoRoot = path.resolve(__dirname, "../../..");
const nodeRequire = createRequire(__filename);
const nodeRequire = createRequire(path.join(repoRoot, "packages", "desktop", "package.json"));
const importPackageRoot = path.resolve(path.dirname(nodeRequire.resolve("@getpaseo/import")), "..");
let installation: Awaited<ReturnType<typeof createConductorInstallation>>;
let electronApp: ElectronApplication;

View File

@@ -27,7 +27,10 @@ export default defineConfig({
projects: [
{
name: "Desktop Chrome",
testIgnore: ["**/*.real.spec.ts"],
testIgnore:
process.env.E2E_DESKTOP_RUNTIME === "1"
? ["**/*.real.spec.ts"]
: ["**/*.real.spec.ts", "**/*.electron.spec.ts"],
use: { ...devices["Desktop Chrome"] },
},
{

View File

@@ -458,6 +458,8 @@ export interface AdaptiveModalSheetProps {
desktopMaxWidth?: number;
scrollable?: boolean;
presentation?: "push" | "replace";
/** Whether gestures may dismiss the compact bottom sheet. */
dismissible?: boolean;
}
export function AdaptiveModalSheet({
@@ -472,6 +474,7 @@ export function AdaptiveModalSheet({
desktopMaxWidth,
scrollable = true,
presentation,
dismissible = true,
}: AdaptiveModalSheetProps) {
const { theme } = useUnistyles();
const { t } = useTranslation();
@@ -608,7 +611,7 @@ export function AdaptiveModalSheet({
onChange={handleSheetChange}
onDismiss={handleDismiss}
backdropComponent={renderBackdrop}
enablePanDownToClose
enablePanDownToClose={dismissible}
backgroundComponent={SheetBackground}
handleIndicatorStyle={handleIndicatorStyle}
keyboardBehavior="extend"

View File

@@ -140,6 +140,7 @@ export function ImportSheet({
footer={footer}
desktopMaxWidth={640}
testID="import-sheet"
dismissible={state.status !== "running"}
>
{state.status === "confirm" ? (
<Text style={styles.copy}>