* use TextControl instead of PlainText

* update e2e test

* revert changes for label

* update test
This commit is contained in:
Seghir Nadir 2020-08-18 12:25:48 +01:00 committed by GitHub
parent c0dbb08ef9
commit 69ff731b4e
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ import { __ } from '@wordpress/i18n';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import { InspectorControls, PlainText } from '@wordpress/block-editor';
import { PanelBody, ToggleControl } from '@wordpress/components';
import { PanelBody, ToggleControl, TextControl } from '@wordpress/components';
import { withInstanceId } from '@wordpress/compose';
/**
@ -75,7 +75,7 @@ const Edit = ( {
/>
) }
<div className="wc-block-product-search__fields">
<PlainText
<TextControl
className="wc-block-product-search__field input-control"
value={ placeholder }
onChange={ ( value ) =>

View File

@ -50,7 +50,7 @@ describe( `${ block.name } Block`, () => {
);
await expect( page ).toFill(
'textarea.wc-block-product-search__field',
'.wc-block-product-search__field input',
'I am a new placeholder'
);
@ -59,7 +59,7 @@ describe( `${ block.name } Block`, () => {
'The Label'
);
await clearAndFillInput(
'textarea.wc-block-product-search__field',
'.wc-block-product-search__field input',
'The Placeholder'
);