ReactTestSelectors.js — react Source File
Architecture documentation for ReactTestSelectors.js, a javascript file in the react codebase. 4 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR a63f4491_e030_1434_6cad_7be48c6f52e5["ReactTestSelectors.js"] a6668d1d_397d_7807_719d_fdecf552fa4a["ReactFiberConfig.js"] a63f4491_e030_1434_6cad_7be48c6f52e5 --> a6668d1d_397d_7807_719d_fdecf552fa4a 42892443_e223_3da0_aeb9_e1b32a408fb0["ReactInternalTypes"] a63f4491_e030_1434_6cad_7be48c6f52e5 --> 42892443_e223_3da0_aeb9_e1b32a408fb0 f8f61929_42ba_4030_bc4f_a1c5484f5f32["ReactWorkTags"] a63f4491_e030_1434_6cad_7be48c6f52e5 --> f8f61929_42ba_4030_bc4f_a1c5484f5f32 3c38cd62_f628_0c7b_096c_856305caeada["getComponentNameFromType"] a63f4491_e030_1434_6cad_7be48c6f52e5 --> 3c38cd62_f628_0c7b_096c_856305caeada d73e9290_2d2e_5d3f_97dd_84929f205c77["ReactFiberWorkLoop.js"] d73e9290_2d2e_5d3f_97dd_84929f205c77 --> a63f4491_e030_1434_6cad_7be48c6f52e5 style a63f4491_e030_1434_6cad_7be48c6f52e5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {Instance} from './ReactFiberConfig';
import {
HostComponent,
HostHoistable,
HostSingleton,
HostText,
} from 'react-reconciler/src/ReactWorkTags';
import getComponentNameFromType from 'shared/getComponentNameFromType';
import {
findFiberRoot,
getBoundingRect,
getInstanceFromNode,
getTextContent,
isHiddenSubtree,
matchAccessibilityRole,
setFocusIfFocusable,
setupIntersectionObserver,
supportsTestSelectors,
} from './ReactFiberConfig';
let COMPONENT_TYPE: symbol | number = 0b000;
let HAS_PSEUDO_CLASS_TYPE: symbol | number = 0b001;
let ROLE_TYPE: symbol | number = 0b010;
let TEST_NAME_TYPE: symbol | number = 0b011;
let TEXT_TYPE: symbol | number = 0b100;
if (typeof Symbol === 'function' && Symbol.for) {
const symbolFor = Symbol.for;
COMPONENT_TYPE = symbolFor('selector.component');
HAS_PSEUDO_CLASS_TYPE = symbolFor('selector.has_pseudo_class');
ROLE_TYPE = symbolFor('selector.role');
TEST_NAME_TYPE = symbolFor('selector.test_id');
TEXT_TYPE = symbolFor('selector.text');
}
type Type = symbol | number;
type ComponentSelector = {
$$typeof: Type,
value: component(),
};
type HasPseudoClassSelector = {
$$typeof: Type,
value: Array<Selector>,
};
type RoleSelector = {
$$typeof: Type,
// ... (549 more lines)
Domain
Dependencies
- ReactFiberConfig.js
- ReactInternalTypes
- ReactWorkTags
- getComponentNameFromType
Source
Frequently Asked Questions
What does ReactTestSelectors.js do?
ReactTestSelectors.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does ReactTestSelectors.js depend on?
ReactTestSelectors.js imports 4 module(s): ReactFiberConfig.js, ReactInternalTypes, ReactWorkTags, getComponentNameFromType.
What files import ReactTestSelectors.js?
ReactTestSelectors.js is imported by 1 file(s): ReactFiberWorkLoop.js.
Where is ReactTestSelectors.js in the architecture?
ReactTestSelectors.js is located at packages/react-reconciler/src/ReactTestSelectors.js (domain: BabelCompiler, directory: packages/react-reconciler/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free