Skip to content

Commit

Permalink
‘test:修改react-native-send-intent测试用例’ (#1426)
Browse files Browse the repository at this point in the history
Co-authored-by: ZhouChong <[email protected]>
  • Loading branch information
ZzCchong and ZhouChong authored Oct 28, 2024
1 parent f323fd8 commit 27e0af3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 36 deletions.
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

0 comments on commit 27e0af3

Please sign in to comment.