Skip to content

Commit

Permalink
Rename core/test-freeform to core/freeform in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Jul 19, 2023
1 parent 61f0bd8 commit 4c01a3b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions packages/block-editor/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe( 'selectors', () => {
parent: [ 'core/test-block-b' ],
} );

registerBlockType( 'core/test-freeform', {
registerBlockType( 'core/freeform', {
save: ( props ) => <RawHTML>{ props.attributes.content }</RawHTML>,
category: 'text',
title: 'Test Freeform Content Handler',
Expand Down Expand Up @@ -177,7 +177,7 @@ describe( 'selectors', () => {
ancestor: [ 'core/test-block-ancestor' ],
} );

setFreeformContentHandlerName( 'core/test-freeform' );
setFreeformContentHandlerName( 'core/freeform' );

cachedSelectors.forEach( ( { clear } ) => clear() );
} );
Expand All @@ -187,7 +187,7 @@ describe( 'selectors', () => {
unregisterBlockType( 'core/test-block-a' );
unregisterBlockType( 'core/test-block-b' );
unregisterBlockType( 'core/test-block-c' );
unregisterBlockType( 'core/test-freeform' );
unregisterBlockType( 'core/freeform' );
unregisterBlockType( 'core/post-content-child' );
unregisterBlockType( 'core/test-block-ancestor' );
unregisterBlockType( 'core/test-block-parent' );
Expand Down Expand Up @@ -3450,7 +3450,7 @@ describe( 'selectors', () => {
expect( firstBlockFirstCall.map( ( item ) => item.id ) ).toEqual( [
'core/test-block-a',
'core/test-block-b',
'core/test-freeform',
'core/freeform',
'core/test-block-ancestor',
'core/test-block-parent',
'core/block/1',
Expand All @@ -3466,7 +3466,7 @@ describe( 'selectors', () => {
expect( secondBlockFirstCall.map( ( item ) => item.id ) ).toEqual( [
'core/test-block-a',
'core/test-block-b',
'core/test-freeform',
'core/freeform',
'core/test-block-ancestor',
'core/test-block-parent',
'core/block/1',
Expand Down
26 changes: 13 additions & 13 deletions packages/editor/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ describe( 'selectors', () => {
parent: [ 'core/test-block-b' ],
} );

registerBlockType( 'core/test-freeform', {
registerBlockType( 'core/freeform', {
save: ( props ) => <RawHTML>{ props.attributes.content }</RawHTML>,
category: 'text',
title: 'Test Freeform Content Handler',
Expand All @@ -287,7 +287,7 @@ describe( 'selectors', () => {
save: () => null,
} );

setFreeformContentHandlerName( 'core/test-freeform' );
setFreeformContentHandlerName( 'core/freeform' );
setDefaultBlockName( 'core/test-default' );

cachedSelectors.forEach( ( { clear } ) => clear() );
Expand All @@ -298,7 +298,7 @@ describe( 'selectors', () => {
unregisterBlockType( 'core/test-block-a' );
unregisterBlockType( 'core/test-block-b' );
unregisterBlockType( 'core/test-block-c' );
unregisterBlockType( 'core/test-freeform' );
unregisterBlockType( 'core/freeform' );
unregisterBlockType( 'core/test-default' );

setFreeformContentHandlerName( undefined );
Expand Down Expand Up @@ -1335,7 +1335,7 @@ describe( 'selectors', () => {
value: [
{
clientId: 123,
name: 'core/test-freeform',
name: 'core/freeform',
isValid: true,
attributes: {
content: '',
Expand All @@ -1362,7 +1362,7 @@ describe( 'selectors', () => {
value: [
{
clientId: 123,
name: 'core/test-freeform',
name: 'core/freeform',
isValid: true,
attributes: {
content: '',
Expand Down Expand Up @@ -1736,7 +1736,7 @@ describe( 'selectors', () => {
value: [
{
clientId: 123,
name: 'core/test-freeform',
name: 'core/freeform',
isValid: true,
attributes: {
content: '',
Expand All @@ -1762,7 +1762,7 @@ describe( 'selectors', () => {
value: [
{
clientId: 123,
name: 'core/test-freeform',
name: 'core/freeform',
isValid: true,
attributes: {
content: '',
Expand Down Expand Up @@ -1790,7 +1790,7 @@ describe( 'selectors', () => {
value: [
{
clientId: 123,
name: 'core/test-freeform',
name: 'core/freeform',
isValid: true,
attributes: {
content: 'Test Data',
Expand Down Expand Up @@ -1818,15 +1818,15 @@ describe( 'selectors', () => {
value: [
{
clientId: 123,
name: 'core/test-freeform',
name: 'core/freeform',
isValid: true,
attributes: {
content: '',
},
},
{
clientId: 456,
name: 'core/test-freeform',
name: 'core/freeform',
isValid: true,
attributes: {
content: '',
Expand Down Expand Up @@ -2409,7 +2409,7 @@ describe( 'selectors', () => {
} );

it( "returns removep'd serialization of blocks for single unknown", () => {
const unknownBlock = createBlock( 'core/test-freeform', {
const unknownBlock = createBlock( 'core/freeform', {
content: '<p>foo</p>',
} );
const state = {
Expand All @@ -2431,10 +2431,10 @@ describe( 'selectors', () => {
} );

it( "returns non-removep'd serialization of blocks for multiple unknown", () => {
const firstUnknown = createBlock( 'core/test-freeform', {
const firstUnknown = createBlock( 'core/freeform', {
content: '<p>foo</p>',
} );
const secondUnknown = createBlock( 'core/test-freeform', {
const secondUnknown = createBlock( 'core/freeform', {
content: '<p>bar</p>',
} );
const state = {
Expand Down

0 comments on commit 4c01a3b

Please sign in to comment.