Skip to content
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
3 changes: 3 additions & 0 deletions src/components/Icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ function Icon({
<View
testID={testID}
style={additionalStyles}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
accessible={false}
>
<ImageSVG
src={src}
Expand Down
7 changes: 6 additions & 1 deletion src/components/MagicCodeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,12 @@ function MagicCodeInput({
<View style={styles.magicCodeInputValueContainer}>
<Text style={[styles.magicCodeInput, styles.textAlignCenter]}>{char}</Text>
{isFocused && !isDisableKeyboard && (
<View style={[styles.magicCodeInputCursorContainer]}>
<View
style={[styles.magicCodeInputCursorContainer]}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
accessible={false}
>
{!!char && <Text style={[styles.magicCodeInput, styles.textAlignCenter, styles.opacity0]}>{char}</Text>}
<Text style={[styles.magicCodeInput, {width: 1}]}> </Text>
<Animated.Text style={[styles.magicCodeInputCursor, animatedCursorStyle, cursorMargin]}>│</Animated.Text>
Expand Down
12 changes: 6 additions & 6 deletions tests/ui/LHNItemsPresence.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ describe('SidebarLinksData', () => {
expect(getDisplayNames()).toHaveLength(1);

// And the draft icon should be shown, indicating there is unsent content.
expect(screen.getByTestId('Pencil Icon')).toBeOnTheScreen();
expect(screen.getByTestId('Pencil Icon', {includeHiddenElements: true})).toBeOnTheScreen();
});

it('should display pinned report', async () => {
Expand Down Expand Up @@ -250,7 +250,7 @@ describe('SidebarLinksData', () => {
expect(getOptionRows()).toHaveLength(1);

// And the pin icon should be shown
expect(screen.getByTestId('Pin Icon')).toBeOnTheScreen();
expect(screen.getByTestId('Pin Icon', {includeHiddenElements: true})).toBeOnTheScreen();
});

it('should display the report with violations', async () => {
Expand Down Expand Up @@ -299,7 +299,7 @@ describe('SidebarLinksData', () => {
await waitForBatchedUpdatesWithAct();

// Then the RBR icon should be shown
expect(screen.getByTestId('RBR Icon')).toBeOnTheScreen();
expect(screen.getByTestId('RBR Icon', {includeHiddenElements: true})).toBeOnTheScreen();
});

it('should display the report awaiting user action', async () => {
Expand All @@ -321,7 +321,7 @@ describe('SidebarLinksData', () => {
expect(getOptionRows()).toHaveLength(1);

// And a green dot icon should be shown
expect(screen.getByTestId('GBR Icon')).toBeOnTheScreen();
expect(screen.getByTestId('GBR Icon', {includeHiddenElements: true})).toBeOnTheScreen();
});

it('should display the archived report in the default mode', async () => {
Expand Down Expand Up @@ -723,7 +723,7 @@ describe('SidebarLinksData', () => {
expect(getDisplayNames()).toHaveLength(1);

// And the GBR icon should be shown, indicating there is require action from current user.
expect(screen.getByTestId('GBR Icon')).toBeOnTheScreen();
expect(screen.getByTestId('GBR Icon', {includeHiddenElements: true})).toBeOnTheScreen();
});

it('should display the report with GRB when the report has unread mention', async () => {
Expand All @@ -745,7 +745,7 @@ describe('SidebarLinksData', () => {
expect(getDisplayNames()).toHaveLength(1);

// And the GRB icon should be shown, indicating there is unread mention.
expect(screen.getByTestId('GBR Icon')).toBeOnTheScreen();
expect(screen.getByTestId('GBR Icon', {includeHiddenElements: true})).toBeOnTheScreen();
});
});
});
4 changes: 2 additions & 2 deletions tests/unit/AvatarButtonWithIconTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('AvatarButtonWithIcon', () => {

it('should render edit icon when not disabled', () => {
renderWithProvider(<AvatarButtonWithIcon {...defaultProps} />);
expect(screen.getByTestId(ICON_TEST_ID)).toBeTruthy();
expect(screen.getByTestId(ICON_TEST_ID, {includeHiddenElements: true})).toBeTruthy();
});

it('should not render edit icon when disabled', () => {
Expand All @@ -98,7 +98,7 @@ describe('AvatarButtonWithIcon', () => {
/>,
);
expect(screen.getByLabelText(defaultProps.text)).toBeTruthy();
expect(screen.getByTestId(MOCK_TEST_ID)).toBeTruthy();
expect(screen.getByTestId(MOCK_TEST_ID, {includeHiddenElements: true})).toBeTruthy();
});

it.each([CONST.AVATAR_SIZE.DEFAULT, CONST.AVATAR_SIZE.LARGE, CONST.AVATAR_SIZE.X_LARGE])('should render with size: %s', (size) => {
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/SidebarOrderTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ describe('Sidebar', () => {
// Then there should be a pencil icon and report one should be the first one because putting a draft on the active report should change its location
// in the ordered list
.then(() => {
const pencilIcon = screen.queryAllByTestId('Pencil Icon');
const pencilIcon = screen.queryAllByTestId('Pencil Icon', {includeHiddenElements: true});
expect(pencilIcon).toHaveLength(1);
const hintText = TestHelper.translateLocal('accessibilityHints.chatUserDisplayNames');
const displayNames = screen.queryAllByLabelText(hintText);
Expand Down Expand Up @@ -579,7 +579,7 @@ describe('Sidebar', () => {

// Then there should be a pencil icon showing
.then(() => {
expect(screen.queryAllByTestId('Pencil Icon')).toHaveLength(1);
expect(screen.queryAllByTestId('Pencil Icon', {includeHiddenElements: true})).toHaveLength(1);
})

// When the draft is removed
Expand Down Expand Up @@ -620,7 +620,7 @@ describe('Sidebar', () => {

// Then there should be a pencil icon showing
.then(() => {
expect(screen.queryAllByTestId('Pin Icon')).toHaveLength(1);
expect(screen.queryAllByTestId('Pin Icon', {includeHiddenElements: true})).toHaveLength(1);
})

// When the draft is removed
Expand Down Expand Up @@ -710,8 +710,8 @@ describe('Sidebar', () => {
const hintText = TestHelper.translateLocal('accessibilityHints.chatUserDisplayNames');
const displayNames = screen.queryAllByLabelText(hintText);
expect(displayNames).toHaveLength(4);
expect(screen.queryAllByTestId('Pin Icon')).toHaveLength(1);
expect(screen.queryAllByTestId('Pencil Icon')).toHaveLength(1);
expect(screen.queryAllByTestId('Pin Icon', {includeHiddenElements: true})).toHaveLength(1);
expect(screen.queryAllByTestId('Pencil Icon', {includeHiddenElements: true})).toHaveLength(1);
expect(displayNames.at(0)).toHaveTextContent('Email Four');
expect(displayNames.at(1)).toHaveTextContent('Email Two');
expect(displayNames.at(2)).toHaveTextContent('Email Three');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

exports[`getInitialAvatarSvg matches snapshot for a letter avatar 1`] = `
<View
accessibilityElementsHidden={true}
accessible={false}
importantForAccessibility="no-hide-descendants"
style={[]}
testID=""
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

exports[`PresetAvatarCatalog matches snapshot for a default avatar 1`] = `
<View
accessibilityElementsHidden={true}
accessible={false}
importantForAccessibility="no-hide-descendants"
style={[]}
testID=""
>
Expand Down
Loading