From 083d74c904d736b472c907a7e9dfcd296c6f64df Mon Sep 17 00:00:00 2001 From: DarkSky Date: Thu, 11 Aug 2022 10:57:58 +0800 Subject: [PATCH] fix: e2e --- libs/components/account/src/login/fs.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/components/account/src/login/fs.tsx b/libs/components/account/src/login/fs.tsx index bc51a90876..99f1252db7 100644 --- a/libs/components/account/src/login/fs.tsx +++ b/libs/components/account/src/login/fs.tsx @@ -1,5 +1,5 @@ /* eslint-disable filename-rules/match */ -import { useState } from 'react'; +import { useEffect, useState } from 'react'; import { LogoImg } from '@toeverything/components/common'; import { @@ -46,6 +46,13 @@ const requestPermission = async (workspace: string) => { export const FileSystem = () => { const onSelected = useLocalTrigger(); const [error, setError] = useState(false); + + useEffect(() => { + if (process.env['NX_E2E']) { + onSelected(); + } + }, []); + return (