diff --git a/packages/react-native-web/src/exports/View/__tests__/__snapshots__/index-test.js.snap b/packages/react-native-web/src/exports/View/__tests__/__snapshots__/index-test.js.snap
index 0cfddbcf..21eb16f6 100644
--- a/packages/react-native-web/src/exports/View/__tests__/__snapshots__/index-test.js.snap
+++ b/packages/react-native-web/src/exports/View/__tests__/__snapshots__/index-test.js.snap
@@ -1,5 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`components/View allows "dir" to be overridden 1`] = `
+
`;
+exports[`components/View prop "accessibilityLabel" value is set 1`] = `
+
+`;
+
+exports[`components/View prop "accessibilityLiveRegion" value is set 1`] = `
+
+`;
+
+exports[`components/View prop "accessibilityRole" value alters HTML element 1`] = `
+
+`;
+
+exports[`components/View prop "accessibilityRole" value is "button" 1`] = `
+
+`;
+
+exports[`components/View prop "accessibilityRole" value is set 1`] = `
+
+`;
+
+exports[`components/View prop "nativeID" value is set 1`] = `
+
+`;
+
exports[`components/View prop "pointerEvents" 1`] = `
`;
+
+exports[`components/View prop "style" value is set 1`] = `
+
+`;
+
+exports[`components/View prop "testID" value is set 1`] = `
+
+`;
diff --git a/packages/react-native-web/src/exports/View/__tests__/index-test.js b/packages/react-native-web/src/exports/View/__tests__/index-test.js
index b76c5cec..88fbc78f 100644
--- a/packages/react-native-web/src/exports/View/__tests__/index-test.js
+++ b/packages/react-native-web/src/exports/View/__tests__/index-test.js
@@ -2,6 +2,8 @@
import React from 'react';
import View from '../';
+import { act } from 'react-dom/test-utils';
+import { createEventTarget } from 'dom-event-testing-library';
import { render } from '@testing-library/react';
describe('components/View', () => {
@@ -43,8 +45,105 @@ describe('components/View', () => {
});
});
+ describe('prop "accessibilityLabel"', () => {
+ test('value is set', () => {
+ const { container } = render(
);
+ expect(container.firstChild).toMatchSnapshot();
+ });
+ });
+
+ describe('prop "accessibilityLiveRegion"', () => {
+ test('value is set', () => {
+ const { container } = render(
);
+ expect(container.firstChild).toMatchSnapshot();
+ });
+ });
+
+ describe('prop "accessibilityRole"', () => {
+ test('value is set', () => {
+ const { container } = render(
);
+ expect(container.firstChild).toMatchSnapshot();
+ });
+
+ test('value is "button"', () => {
+ const { container } = render(
);
+ expect(container.firstChild).toMatchSnapshot();
+ });
+
+ test('value alters HTML element', () => {
+ const { container } = render(
);
+ expect(container.firstChild).toMatchSnapshot();
+ });
+ });
+
+ test('allows "dir" to be overridden', () => {
+ const { container } = render(
);
+ expect(container.firstChild).toMatchSnapshot();
+ });
+
+ describe('prop "nativeID"', () => {
+ test('value is set', () => {
+ const { container } = render(
);
+ expect(container.firstChild).toMatchSnapshot();
+ });
+ });
+
+ describe('prop "onBlur"', () => {
+ test('is called', () => {
+ const onBlur = jest.fn();
+ const ref = React.createRef();
+ act(() => {
+ render(
);
+ });
+ const target = createEventTarget(ref.current);
+ act(() => {
+ target.focus();
+ target.blur();
+ });
+ expect(onBlur).toBeCalled();
+ });
+ });
+
+ describe('prop "onFocus"', () => {
+ test('is called', () => {
+ const onFocus = jest.fn();
+ const ref = React.createRef();
+ act(() => {
+ render(
);
+ });
+ const target = createEventTarget(ref.current);
+ act(() => {
+ target.focus();
+ target.blur();
+ });
+ expect(onFocus).toBeCalled();
+ });
+ });
+
+ describe('prop "ref"', () => {
+ test('value is set', () => {
+ const ref = jest.fn();
+ render(
);
+ expect(ref).toBeCalled();
+ });
+ });
+
test('prop "pointerEvents"', () => {
const { container } = render(
);
expect(container.firstChild).toMatchSnapshot();
});
+
+ describe('prop "style"', () => {
+ test('value is set', () => {
+ const { container } = render(
);
+ expect(container.firstChild).toMatchSnapshot();
+ });
+ });
+
+ describe('prop "testID"', () => {
+ test('value is set', () => {
+ const { container } = render(
);
+ expect(container.firstChild).toMatchSnapshot();
+ });
+ });
});