Make WordPress Core

Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#54551 closed task (blessed) (fixed)

Block Template Utils: Enable currently incomplete unit test

Reported by: bernhard-reiter's profile Bernhard Reiter Owned by: hellofromtonya's profile hellofromTonya
Milestone: 5.9 Priority: normal
Severity: normal Version: 5.9
Component: Editor Keywords: has-patch has-unit-tests commit
Focuses: Cc:

Description

We currently have one Block Template Utils unit test marked as incomplete, as it needs a block template theme, which at the time the test was backported from Gutenberg wasn't yet available.

We should enable it now that we have both Twenty Twenty Two and the block-theme and block-theme-child test fixture block template themes are available.

Change History (8)

This ticket was mentioned in PR #1990 on WordPress/wordpress-develop by ockham.


18 months ago
#1

  • Keywords has-patch has-unit-tests added

We currently have one Block Template Utils unit test marked as incomplete, as it needs a block template theme, which at the time the test was backported from Gutenberg wasn't yet available.

We should enable it now that we have both Twenty Twenty Two and the block-theme and block-theme-child test fixture block template themes are available.

Trac ticket: https://core.trac.wordpress.org/ticket/54551

#2 @davidbaumwald
18 months ago

  • Milestone changed from Awaiting Review to 5.9
  • Type changed from enhancement to task (blessed)

ockham commented on PR #1990:


18 months ago
#3

Ah, tests need some more tweaking, probably akin to https://github.com/WordPress/wordpress-develop/pull/1920.

ockham commented on PR #1990:


18 months ago
#4

cc/ @WordPress/gutenberg-core for review 🙂

#5 @noisysocks
18 months ago

  • Keywords commit added

https://github.com/WordPress/wordpress-develop/pull/1990 looks good to me. Thanks @bernhard-reiter!

#6 @hellofromTonya
18 months ago

  • Owner set to hellofromTonya
  • Status changed from new to reviewing

Self-assigning for commit, I already reviewed it.

#7 @hellofromTonya
18 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 52314:

Editor: Enable incomplete unit tests in Tests_Block_Template_Utils:: test_get_block_template_from_file().

At the time tests were backported from Gutenberg, a block template theme was not available in the test suite; thus, the test was marked as markTestIncomplete().

Now that block-theme and block-theme-child test fixture block template themes are available, this commit removes the markTestIncomplete() and adjusts the test to run by switching to the block-theme test fixture.

Follow-up to [51003], [52062], [52247].

Props bernhard-reiter.
Fixes #54551.

Note: See TracTickets for help on using tickets.