Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

‘test:修改react-native-send-intent测试用例’ #1426

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions react-native-send-intent/SendIntent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,6 @@ const [flag2, setFlag2] = useState<boolean>();
/>
</>
<>
<Text style={{ color: "red" }}>NativeSendIntent.openAppWithData</Text>
<><Text style={{ color: "red" }}>{JSON.stringify(flag2)}</Text></>
<Button
onPress={() => {
NativeSendIntent.openAppWithData('', '').then((flag) => {
setFlag2(flag)
})
}}
title="打开携带数据的APP"
/>
</>
<>
<Text style={{ color: "red" }}>NativeSendIntent.openChromeIntent</Text>
<Button
onPress={() => {
Expand Down
27 changes: 3 additions & 24 deletions react-native-send-intent/text/SendIntent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,28 +278,6 @@ function SendIntent() {
}}
assert={({ expect, state }) => { expect(state).to.be.true }}
/>
<TestCase
itShould='native openAppWithData'
tags={['C_API']}
initialState={undefined as any}
arrange={() => {
return (
<>
<><Text style={{ color: "red" }}>{JSON.stringify(flag2)}</Text></>
<Button
onPress={() => {
NativeSendIntent.openAppWithData('', '').then((flag) => {
setFlag2(flag)
})
}}
title="打开携带数据的APP"

/>
</>
)
}}
assert={({ expect, state }) => { expect(state).to.be.true }}
/>
<TestCase
itShould='native openChromeIntent'
tags={['C_API']}
Expand Down Expand Up @@ -482,7 +460,7 @@ function SendIntent() {
itShould='native openFilePicker'
tags={['C_API']}
initialState={undefined as any}
arrange={() => {
arrange={({setState}) => {
return (
<>
<><Text style={{ color: "red" }}>{JSON.stringify(url)}</Text></>
Expand All @@ -492,7 +470,8 @@ function SendIntent() {
type: '',
title: ''
}, (uris) => {
setUrl(uris)
setUrl(uris);
setState(true)
});
}}
title="选择打开文件选择器获取文件地址"
Expand Down