index.js — react Source File
Architecture documentation for index.js, a javascript file in the react codebase. 14 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR ba53c75f_b711_f8f4_9a77_b020529fa33b["index.js"] 43315ad6_972b_89f2_a26c_ae2c6075675a["FixtureSet.js"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> 43315ad6_972b_89f2_a26c_ae2c6075675a f3e4d030_5f7e_b1af_0ae5_fcdf80961e8c["FixtureSet"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> f3e4d030_5f7e_b1af_0ae5_fcdf80961e8c 14dde3c9_48ef_6e34_3667_978d06aff15d["TestCase.js"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> 14dde3c9_48ef_6e34_3667_978d06aff15d e1e356f5_b085_dad5_a81f_4b4844381311["TestCase"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> e1e356f5_b085_dad5_a81f_4b4844381311 146d3328_8159_aa68_fad2_e4a3da02b729["RangeKeyboardFixture.js"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> 146d3328_8159_aa68_fad2_e4a3da02b729 d1d51617_ad04_c227_f8bd_1700e89ec396["RangeKeyboardFixture"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> d1d51617_ad04_c227_f8bd_1700e89ec396 d3372e4a_5372_b44a_3f0e_f4c4bc86caf9["RadioClickFixture.js"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> d3372e4a_5372_b44a_3f0e_f4c4bc86caf9 fec0ae1e_47a2_84da_b4c8_f28b0c784f3a["RadioClickFixture"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> fec0ae1e_47a2_84da_b4c8_f28b0c784f3a a6b5f2e2_eaaa_06e3_727c_a40bd7e187ce["RadioGroupFixture.js"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> a6b5f2e2_eaaa_06e3_727c_a40bd7e187ce ad51d421_98b0_391c_3898_ec8bb31d48bb["RadioGroupFixture"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> ad51d421_98b0_391c_3898_ec8bb31d48bb 41b01eb0_41d8_7611_eb36_f4fd0b56de8d["RadioNameChangeFixture.js"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> 41b01eb0_41d8_7611_eb36_f4fd0b56de8d 79701378_e6fc_9975_01f2_ddc1905caded["RadioNameChangeFixture"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> 79701378_e6fc_9975_01f2_ddc1905caded c06b8d5e_52d1_3bc6_33c8_4a36d75347fc["InputPlaceholderFixture.js"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> c06b8d5e_52d1_3bc6_33c8_4a36d75347fc de1b5ac7_be48_ea0c_e57e_1c5cf5538075["InputPlaceholderFixture"] ba53c75f_b711_f8f4_9a77_b020529fa33b --> de1b5ac7_be48_ea0c_e57e_1c5cf5538075 style ba53c75f_b711_f8f4_9a77_b020529fa33b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import FixtureSet from '../../FixtureSet';
import TestCase from '../../TestCase';
import RangeKeyboardFixture from './RangeKeyboardFixture';
import RadioClickFixture from './RadioClickFixture';
import RadioGroupFixture from './RadioGroupFixture';
import RadioNameChangeFixture from './RadioNameChangeFixture';
import InputPlaceholderFixture from './InputPlaceholderFixture';
const React = window.React;
class InputChangeEvents extends React.Component {
render() {
return (
<FixtureSet
title="Input change events"
description="Tests proper behavior of the onChange event for inputs">
<TestCase
title="Range keyboard changes"
description={`
Range inputs should fire onChange events for keyboard events
`}>
<TestCase.Steps>
<li>Focus range input</li>
<li>change value via the keyboard arrow keys</li>
</TestCase.Steps>
<TestCase.ExpectedResult>
The <code>onKeyDown</code> call count should be equal to the{' '}
<code>onChange</code> call count.
</TestCase.ExpectedResult>
<RangeKeyboardFixture />
</TestCase>
<TestCase
title="Radio input clicks"
description={`
Radio inputs should only fire change events when the checked
state changes.
`}
resolvedIn="16.0.0">
<TestCase.Steps>
<li>Click on the Radio input (or label text)</li>
</TestCase.Steps>
<TestCase.ExpectedResult>
The <code>onChange</code> call count should remain at 0
</TestCase.ExpectedResult>
<RadioClickFixture />
</TestCase>
<TestCase
title="Uncontrolled radio groups"
description={`
Radio inputs should fire change events when the value moved to
another named input
`}
introducedIn="15.6.0">
<TestCase.Steps>
<li>Click on the "Radio 2"</li>
<li>Click back to "Radio 1"</li>
<li>Click back to "Radio 2"</li>
</TestCase.Steps>
<TestCase.ExpectedResult>
The <code>onChange</code> call count increment on each value change
(at least 3+)
</TestCase.ExpectedResult>
<RadioGroupFixture />
</TestCase>
<TestCase
title="Inputs with placeholders"
description={`
Text inputs with placeholders should not trigger changes
when the placeholder is altered
`}
resolvedIn="15.0.0"
resolvedBy="#5004"
affectedBrowsers="IE9+">
<TestCase.Steps>
<li>Click on the Text input</li>
<li>Click on the "Change placeholder" button</li>
</TestCase.Steps>
<TestCase.ExpectedResult>
The <code>onChange</code> call count should remain at 0
</TestCase.ExpectedResult>
<InputPlaceholderFixture />
</TestCase>
<TestCase
title="Radio button groups with name changes"
description={`
A radio button group should have correct checked value when
the names changes
`}
resolvedBy="#11227"
affectedBrowsers="IE9+">
<TestCase.Steps>
<li>Click the toggle button</li>
</TestCase.Steps>
<TestCase.ExpectedResult>
The checked radio button should switch between the first and second
radio button
</TestCase.ExpectedResult>
<RadioNameChangeFixture />
</TestCase>
</FixtureSet>
);
}
}
export default InputChangeEvents;
Domain
Subdomains
Classes
Dependencies
Source
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, Optimization subdomain.
What does index.js depend on?
index.js imports 14 module(s): FixtureSet, FixtureSet.js, InputPlaceholderFixture, InputPlaceholderFixture.js, RadioClickFixture, RadioClickFixture.js, RadioGroupFixture, RadioGroupFixture.js, and 6 more.
Where is index.js in the architecture?
index.js is located at fixtures/dom/src/components/fixtures/input-change-events/index.js (domain: BabelCompiler, subdomain: Optimization, directory: fixtures/dom/src/components/fixtures/input-change-events).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free