Make WordPress Core

Opened 8 weeks ago

Closed 7 weeks ago

Last modified 7 weeks ago

#54551 closed task (blessed) (fixed)

Block Template Utils: Enable currently incomplete unit test

Reported by: Bernhard Reiter Owned by: hellofromTonya
Milestone: 5.9 Priority: normal
Severity: normal Version: trunk
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.


8 weeks ago

  • 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
8 weeks ago

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

#3 @prbot
8 weeks ago

ockham commented on PR #1990:

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

#4 @prbot
8 weeks ago

ockham commented on PR #1990:

cc/ @WordPress/gutenberg-core for review 🙂

#5 @noisysocks
8 weeks ago

  • Keywords commit added

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

#6 @hellofromTonya
7 weeks ago

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

Self-assigning for commit, I already reviewed it.

#7 @hellofromTonya
7 weeks 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.