Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mj12albert committed Sep 21, 2023
1 parent 58dd266 commit 8e940b8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
20 changes: 10 additions & 10 deletions packages/mui-material-next/src/FormControl/FormControl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { expect } from 'chai';
import { spy } from 'sinon';
import { describeConformance, act, createRenderer, fireEvent } from 'test/utils';
import FormControl, { formControlClasses as classes } from '@mui/material-next/FormControl';
// TODO: replace with material-next/OutlinedInput
// TODO v6: replace with material-next/FilledInput
import InputBase from '@mui/material-next/InputBase';
// TODO: replace with material-next/Select
// TODO v6: replace with material-next/Select
import Select from '@mui/material/Select';
import useFormControl from './useFormControl';

Expand Down Expand Up @@ -177,7 +177,7 @@ describe('<FormControl />', () => {
{flag ? (
<InputBase />
) : (
// TODO: use material-next/Select
// TODO v6: use material-next/Select
<Select native>
<option value="">empty</option>
</Select>
Expand All @@ -196,14 +196,14 @@ describe('<FormControl />', () => {
});
});

// TODO: needs Outlined|FilledInput + FormControl integrated
// TODO v6: needs FilledInput + FormControl integrated
// eslint-disable-next-line mocha/no-skipped-tests
describe.skip('input', () => {
it('should be filled when a value is set', () => {
const readContext = spy();
render(
<FormControl>
{/* TODO: use material-next/OutlinedInput */}
{/* TODO v6: use material-next/FilledInput */}
<InputBase value="bar" />
<TestComponent contextCallback={readContext} />
</FormControl>,
Expand All @@ -215,7 +215,7 @@ describe('<FormControl />', () => {
const readContext = spy();
render(
<FormControl>
{/* TODO: use material-next/OutlinedInput */}
{/* TODO v6: use material-next/FilledInput */}
<InputBase inputProps={{ value: 'bar' }} />
<TestComponent contextCallback={readContext} />
</FormControl>,
Expand All @@ -227,7 +227,7 @@ describe('<FormControl />', () => {
const readContext = spy();
render(
<FormControl>
{/* TODO: use material-next/OutlinedInput */}
{/* TODO v6: use material-next/FilledInput */}
<InputBase defaultValue="bar" />
<TestComponent contextCallback={readContext} />
</FormControl>,
Expand All @@ -239,7 +239,7 @@ describe('<FormControl />', () => {
const readContext = spy();
render(
<FormControl>
{/* TODO: use material-next/OutlinedInput */}
{/* TODO v6: use material-next/FilledInput */}
<InputBase endAdornment={<div />} />
<TestComponent contextCallback={readContext} />
</FormControl>,
Expand All @@ -251,7 +251,7 @@ describe('<FormControl />', () => {
const readContext = spy();
render(
<FormControl>
{/* TODO: use material-next/OutlinedInput */}
{/* TODO v6: use material-next/FilledInput */}
<InputBase startAdornment={<div />} />
<TestComponent contextCallback={readContext} />
</FormControl>,
Expand All @@ -260,7 +260,7 @@ describe('<FormControl />', () => {
});
});

// TODO: needs material-next/Select + FormControl integrated
// TODO v6: needs material-next/Select + FormControl integrated
// eslint-disable-next-line mocha/no-skipped-tests
describe.skip('select', () => {
it('should not be adorned without a startAdornment', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// TODO v6: decide whether to update/refactor this, keep as-is, or drop it
export default function formControlState({ props, states, muiFormControl }) {
// for every prop in `states` that is undefined, set it with the value from formControlContext
return states.reduce((acc, state) => {
acc[state] = props[state];

Expand Down
8 changes: 4 additions & 4 deletions packages/mui-material-next/src/InputBase/InputBase.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe('<InputBase />', () => {
);
const input = getByRole('textbox');

// TODO: refactor this test with @testing-library/user-event
// TODO v6: refactor this test with @testing-library/user-event
// simulating user input: gain focus, key input (keydown, (input), change, keyup), blur
act(() => {
input.focus();
Expand Down Expand Up @@ -215,7 +215,7 @@ describe('<InputBase />', () => {
});

describe('prop: slots', () => {
// TODO: figure out if this is covered by describeConformance
// TODO v6: figure out if this is covered by describeConformance
it('should accept any html component', () => {
const { getByTestId } = render(
<InputBase
Expand Down Expand Up @@ -638,7 +638,7 @@ describe('<InputBase />', () => {
expect(getByTestId('adornment')).not.to.equal(null);
});

// TODO: use material-next/Select
// TODO v6: use material-next/Select
it('should allow a Select as an adornment', () => {
render(
<InputBase
Expand Down Expand Up @@ -670,7 +670,7 @@ describe('<InputBase />', () => {
});

describe('prop: focused', () => {
// TODO: use material-next/TextField
// TODO v6: use material-next/TextField
// eslint-disable-next-line mocha/no-skipped-tests
it.skip('should render correct border color with `ThemeProvider` imported from `@emotion/react`', function test() {
if (/jsdom/.test(window.navigator.userAgent)) {
Expand Down

0 comments on commit 8e940b8

Please sign in to comment.