Home / File/ index.js — react Source File

index.js — react Source File

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

File javascript BabelCompiler Entrypoint 7 imports 1 classes

Entity Profile

Dependency Diagram

graph LR
  e8b58972_c6ee_29aa_775b_d3e80463a004["index.js"]
  bc8ae172_cc20_3692_943c_bbdb1ad34855["Fixture.js"]
  e8b58972_c6ee_29aa_775b_d3e80463a004 --> bc8ae172_cc20_3692_943c_bbdb1ad34855
  2851624d_a736_f3f6_2132_5a20630983fe["Fixture"]
  e8b58972_c6ee_29aa_775b_d3e80463a004 --> 2851624d_a736_f3f6_2132_5a20630983fe
  a3aeab4c_4f93_b8d8_01c2_7a351a28a3fb["Fixture"]
  e8b58972_c6ee_29aa_775b_d3e80463a004 --> a3aeab4c_4f93_b8d8_01c2_7a351a28a3fb
  43315ad6_972b_89f2_a26c_ae2c6075675a["FixtureSet.js"]
  e8b58972_c6ee_29aa_775b_d3e80463a004 --> 43315ad6_972b_89f2_a26c_ae2c6075675a
  f3e4d030_5f7e_b1af_0ae5_fcdf80961e8c["FixtureSet"]
  e8b58972_c6ee_29aa_775b_d3e80463a004 --> f3e4d030_5f7e_b1af_0ae5_fcdf80961e8c
  14dde3c9_48ef_6e34_3667_978d06aff15d["TestCase.js"]
  e8b58972_c6ee_29aa_775b_d3e80463a004 --> 14dde3c9_48ef_6e34_3667_978d06aff15d
  e1e356f5_b085_dad5_a81f_4b4844381311["TestCase"]
  e8b58972_c6ee_29aa_775b_d3e80463a004 --> e1e356f5_b085_dad5_a81f_4b4844381311
  style e8b58972_c6ee_29aa_775b_d3e80463a004 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

const React = window.React;

export default class TextAreaFixtures extends React.Component {
  state = {value: ''};
  onChange = event => {
    this.setState({value: event.target.value});
  };
  render() {
    return (
      <FixtureSet title="Textareas">
        <TestCase
          title="Kitchen Sink"
          description="Verify that the controlled textarea displays its value under 'Controlled Output', and that both textareas can be typed in">
          <div>
            <form className="container">
              <fieldset>
                <legend>Controlled</legend>
                <textarea value={this.state.value} onChange={this.onChange} />
              </fieldset>
              <fieldset>
                <legend>Uncontrolled</legend>
                <textarea defaultValue="" />
              </fieldset>
            </form>
            <div className="container">
              <h4>Controlled Output:</h4>
              <div className="output">{this.state.value}</div>
            </div>
          </div>
        </TestCase>
        <TestCase title="Placeholders">
          <TestCase.ExpectedResult>
            The textarea should be rendered with the placeholder "Hello, world"
          </TestCase.ExpectedResult>
          <div style={{margin: '10px 0px'}}>
            <textarea placeholder="Hello, world" />
          </div>
        </TestCase>

        <TestCase
          title="Required Textareas"
          affectedBrowsers="Firefox"
          relatedIssues="16402">
          <TestCase.Steps>
            <li>View this test in Firefox</li>
          </TestCase.Steps>

          <TestCase.ExpectedResult>
            You should{' '}
            <b>
              <i>not</i>
            </b>{' '}
            see a red aura on initial page load, indicating the textarea is
            invalid.
            <br />
            This aura looks roughly like:
            <textarea style={{boxShadow: '0 0 1px 1px red', marginLeft: 8}} />
          </TestCase.ExpectedResult>

          <Fixture>
            <form className="control-box">
              <fieldset>
                <legend>Empty value prop string</legend>
                <textarea value="" required={true} />
              </fieldset>
              <fieldset>
                <legend>No value prop</legend>
                <textarea required={true} />
              </fieldset>
              <fieldset>
                <legend>Empty defaultValue prop string</legend>
                <textarea required={true} defaultValue="" />
              </fieldset>
            </form>
          </Fixture>
        </TestCase>
      </FixtureSet>
    );
  }
}

Domain

Subdomains

Frequently Asked Questions

What does index.js do?
index.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What does index.js depend on?
index.js imports 7 module(s): Fixture, Fixture, Fixture.js, FixtureSet, FixtureSet.js, TestCase, TestCase.js.
Where is index.js in the architecture?
index.js is located at fixtures/dom/src/components/fixtures/textareas/index.js (domain: BabelCompiler, subdomain: Entrypoint, directory: fixtures/dom/src/components/fixtures/textareas).

Analyze Your Own Codebase

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

Try Supermodel Free