How to use the @wordpress/e2e-test-utils.setPostContent function in @wordpress/e2e-test-utils

To help you get started, we’ve selected a few @wordpress/e2e-test-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liip / bootstrap-blocks-wordpress-plugin / e2e-tests / row / row-block-backwards-compat.spec.js View on Github external
it( 'v1.0.0 row block content should be compatible', async () => {
		await setPostContent( rowContent100 );

		// Row blocks should be successfully inserted
		expect( await page.$$( '[data-type="wp-bootstrap-blocks/row"]' ) ).toHaveLength( 2 );
		expect( await page.$$( '[data-type="wp-bootstrap-blocks/column"]' ) ).toHaveLength( 4 );

		expect( await getEditedPostContent() ).toMatchSnapshot();

		await testVersion100RowFeatures();

		expect( console ).toHaveWarned();
	} );
github liip / bootstrap-blocks-wordpress-plugin / e2e-tests / row / row-block-backwards-compat.spec.js View on Github external
it( 'v1.1.0 row block content should be compatible', async () => {
		await setPostContent( rowContent110 );

		// Row blocks should be successfully inserted
		expect( await page.$$( '[data-type="wp-bootstrap-blocks/row"]' ) ).toHaveLength( 3 );
		expect( await page.$$( '[data-type="wp-bootstrap-blocks/column"]' ) ).toHaveLength( 6 );

		expect( await getEditedPostContent() ).toMatchSnapshot();

		await testVersion100RowFeatures();

		await testVersion110RowFeatures();

		expect( console ).toHaveWarned();
	} );
github liip / bootstrap-blocks-wordpress-plugin / e2e-tests / row / row-block-backwards-compat.spec.js View on Github external
it( 'v1.4.0 column block content should be compatible', async () => {
		await setPostContent( rowContent140 );

		await testVersion100ColumnFeatures();

		await testVersion110ColumnFeatures();

		await testVersion140ColumnFeatures();

		expect( console ).toHaveWarned();
	} );
} );