Home / File/ CompareDocumentPositionCase.js — react Source File

CompareDocumentPositionCase.js — react Source File

Architecture documentation for CompareDocumentPositionCase.js, a javascript file in the react codebase. 7 imports, 1 dependents.

File javascript BabelCompiler Entrypoint 7 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  a9262b9a_dffc_fb68_c0ef_7ba585994573["CompareDocumentPositionCase.js"]
  14dde3c9_48ef_6e34_3667_978d06aff15d["TestCase.js"]
  a9262b9a_dffc_fb68_c0ef_7ba585994573 --> 14dde3c9_48ef_6e34_3667_978d06aff15d
  e1e356f5_b085_dad5_a81f_4b4844381311["TestCase"]
  a9262b9a_dffc_fb68_c0ef_7ba585994573 --> e1e356f5_b085_dad5_a81f_4b4844381311
  bc8ae172_cc20_3692_943c_bbdb1ad34855["Fixture.js"]
  a9262b9a_dffc_fb68_c0ef_7ba585994573 --> bc8ae172_cc20_3692_943c_bbdb1ad34855
  2851624d_a736_f3f6_2132_5a20630983fe["Fixture"]
  a9262b9a_dffc_fb68_c0ef_7ba585994573 --> 2851624d_a736_f3f6_2132_5a20630983fe
  a3aeab4c_4f93_b8d8_01c2_7a351a28a3fb["Fixture"]
  a9262b9a_dffc_fb68_c0ef_7ba585994573 --> a3aeab4c_4f93_b8d8_01c2_7a351a28a3fb
  443b1272_3be6_b576_ea29_eeb3576c3c99["CompareDocumentPositionFragmentContainer.js"]
  a9262b9a_dffc_fb68_c0ef_7ba585994573 --> 443b1272_3be6_b576_ea29_eeb3576c3c99
  ab1ecfe4_2664_ff4a_e5c0_6ed644467744["CompareDocumentPositionFragmentContainer"]
  a9262b9a_dffc_fb68_c0ef_7ba585994573 --> ab1ecfe4_2664_ff4a_e5c0_6ed644467744
  463c662d_adfd_912e_a87b_b390bc35e100["index.js"]
  463c662d_adfd_912e_a87b_b390bc35e100 --> a9262b9a_dffc_fb68_c0ef_7ba585994573
  style a9262b9a_dffc_fb68_c0ef_7ba585994573 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import TestCase from '../../TestCase';
import Fixture from '../../Fixture';
import CompareDocumentPositionFragmentContainer from './CompareDocumentPositionFragmentContainer';

const React = window.React;

export default function CompareDocumentPositionCase() {
  return (
    <TestCase title="compareDocumentPosition">
      <TestCase.Steps>
        <li>Click the "Compare All Positions" button</li>
      </TestCase.Steps>
      <TestCase.ExpectedResult>
        The compareDocumentPosition method compares the position of the fragment
        relative to other elements in the DOM. The "Before Element" should be
        PRECEDING the fragment, and the "After Element" should be FOLLOWING.
        Elements inside the fragment should be CONTAINED_BY.
      </TestCase.ExpectedResult>
      <Fixture>
        <Fixture.Controls>
          <CompareDocumentPositionFragmentContainer>
            <div
              style={{
                padding: '10px',
                backgroundColor: 'lightblue',
                borderRadius: '4px',
                marginBottom: '8px',
              }}>
              First child element
            </div>
            <div
              style={{
                padding: '10px',
                backgroundColor: 'lightgreen',
                borderRadius: '4px',
                marginBottom: '8px',
              }}>
              Second child element
            </div>
            <div
              style={{
                padding: '10px',
                backgroundColor: 'lightpink',
                borderRadius: '4px',
              }}>
              Third child element
            </div>
          </CompareDocumentPositionFragmentContainer>
        </Fixture.Controls>
      </Fixture>
    </TestCase>
  );
}

Domain

Subdomains

Frequently Asked Questions

What does CompareDocumentPositionCase.js do?
CompareDocumentPositionCase.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What functions are defined in CompareDocumentPositionCase.js?
CompareDocumentPositionCase.js defines 1 function(s): CompareDocumentPositionCase.
What does CompareDocumentPositionCase.js depend on?
CompareDocumentPositionCase.js imports 7 module(s): CompareDocumentPositionFragmentContainer, CompareDocumentPositionFragmentContainer.js, Fixture, Fixture, Fixture.js, TestCase, TestCase.js.
What files import CompareDocumentPositionCase.js?
CompareDocumentPositionCase.js is imported by 1 file(s): index.js.
Where is CompareDocumentPositionCase.js in the architecture?
CompareDocumentPositionCase.js is located at fixtures/dom/src/components/fixtures/fragment-refs/CompareDocumentPositionCase.js (domain: BabelCompiler, subdomain: Entrypoint, directory: fixtures/dom/src/components/fixtures/fragment-refs).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free