Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#53606 closed defect (bug) (fixed)

wp-api-generated.js needs updating, needs CI to test for changes

Reported by: johnbillion's profile johnbillion Owned by: johnbillion's profile johnbillion
Milestone: 5.8 Priority: normal
Severity: normal Version: 5.8
Component: Build/Test Tools Keywords: has-unit-tests dev-reviewed commit
Focuses: Cc:

Description

The tests/qunit/fixtures/wp-api-generated.js file is under version control and it gets written to during the test_build_wp_api_client_fixtures() test. Sometimes when the REST API schema gets updated this file gets forgotten.

This is currently the case and was introduced in [51241]. The file is not up to date with the latest REST API schema.

To reproduce:

composer test -- --filter test_build_wp_api_client_fixtures && git status --exit-code

We should:

  • Update wp-api-generated.js to reflect the latest schema
  • Add tests to CI so it fails if this happens again

Change History (9)

#1 @desrosj
2 years ago

In 51351:

Tests: Update the wp-api-generated.js fixture.

Follow up to [51241].

Props johnbillion.
See #53606.

#2 @johnbillion
2 years ago

  • Keywords has-unit-tests dev-feedback added; needs-patch needs-unit-tests removed

#3 @desrosj
2 years ago

  • Keywords dev-reviewed commit added; dev-feedback removed

PR looks good. Marking for commit and backport.

#4 @johnbillion
2 years ago

  • Component changed from REST API to Build/Test Tools
  • Owner set to johnbillion
  • Status changed from new to accepted

#5 @johnbillion
2 years ago

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

In 51355:

Build/Test Tools: Add assertions to ensure version-controlled files are not modified during CI, and fix the grunt clean command.

Some tests and some commands that run during the build steps modify files that are under version control. This adds assertions to ensure that these files don't remain in a modified state after the test runs on CI.

This also fixes the grunt clean command which erroneously deletes script-loader-packages.php. This file is re-populated during the build, but deleting it during the clean is undesirable.

Fixes #53606

#6 @johnbillion
2 years ago

In 51357:

Build/Test Tools: Add assertions to ensure version-controlled files are not modified during CI, and fix the grunt clean command.

Some tests and some commands that run during the build steps modify files that are under version control. This adds assertions to ensure that these files don't remain in a modified state after the test runs on CI.

This also fixes the grunt clean command which erroneously deletes script-loader-packages.php. This file is re-populated during the build, but deleting it during the clean is undesirable.

Merges [51355] to the 5.8 branch.

Fixes #53606

#7 @peterwilsoncc
2 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

[51351] looks good for backporting to the 5.8 branch.

#8 @desrosj
2 years ago

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

In 51361:

Tests: Update the wp-api-generated.js fixture.

Follow up to [51241].

Props johnbillion, peterwilsoncc.
Merges [51351] to the 5.8 branch.
Fixes #53606.

Note: See TracTickets for help on using tickets.