-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathE2ELinkV1Test.tsx
38 lines (34 loc) · 1.14 KB
/
E2ELinkV1Test.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import * as React from 'react';
import { LinkV1 as Link } from '@fluentui/react-native';
import { Stack } from '@fluentui-react-native/stack';
import {
LINKV1_TEST_COMPONENT,
LINKV1_ACCESSIBILITY_LABEL,
LINKV1_NO_A11Y_LABEL_COMPONENT,
LINKV1_TEST_COMPONENT_LABEL,
} from '../../../../E2E/src/LinkV1/consts';
import { stackStyle } from '../Common/styles';
import { testProps } from '../Common/TestProps';
export const E2ELinkV1Test: React.FunctionComponent = () => {
const doPress = (): void => {
console.log('Link pressed');
};
return (
<Stack style={stackStyle}>
<Link
url="https://www.bing.com/"
accessibilityLabel={LINKV1_ACCESSIBILITY_LABEL}
/* For Android E2E testing purposes, testProps must be passed in after accessibilityLabel. */
{...testProps(LINKV1_TEST_COMPONENT)}
>
Link with Accessibility Label
</Link>
<Link
onPress={doPress} /* For Android E2E testing purposes, testProps must be passed in after accessibilityLabel. */
{...testProps(LINKV1_NO_A11Y_LABEL_COMPONENT)}
>
{LINKV1_TEST_COMPONENT_LABEL}
</Link>
</Stack>
);
};