Problem/Motivation

https://git.drupalcode.org/issue/drupal-2840283/-/jobs/8139558#L547

Inline Block (Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlock)
     ✔ Inline blocks
     ✔ No layout save with discard_changes
     ✔ No layout save with revert
     ✘ Inline blocks revisioning
       ┐
       ├ TypeError: str_starts_with(): Argument #1 ($haystack) must be of type string, array given
       │
       │ /builds/issue/drupal-2840283/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php:115
       ┴
     ✔ Inline blocks revisioning integrity
     ✔ Deletion
     ✔ Access
     ✔ Add work flow
     ✔ Add inline blocks permission
     ✔ Edit inline blocks permission
     ✔ Inline block parent revert
    
    ERRORS!
    Tests: 11, Assertions: 238, Errors: 1.

Steps to reproduce

See random fails in core MRs.

Proposed resolution

The test does not need to be FunctionalJavascript test as its not testing anything that requires JS. Convert it to a Functional test.

Remaining tasks

  1. Verify results of baseline vs. fix repeat jobs
  2. Reviews / refinements
  3. RTBC
  4. Commit / rejoice

Issue fork drupal-3568635

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

Status: Fixed » Active
joelpittet’s picture

Component: block.module » layout_builder.module

Fixing the component as I noticed it's layout_builder in the namespace.

jsacksick’s picture

I just wanted to report that Commerce is suffering from the exact same issue: See https://git.drupalcode.org/project/commerce/-/jobs/8222384#L345.

danielveza’s picture

Like many LB tests, I don't think this should be a FunctionalJS test. We should try rewrite it to just be functional

danielveza’s picture

Had a bit of time before wrapping up for the day. Converted the test to a Functional to stop the random fails

danielveza’s picture

Status: Active » Needs review

Moved the test to a functional test, tests are green. I think this is ready for review.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Small comment on the MR but can we update the summary to help with the review please.

helps when we can map the solution to the MR and make sure everything is inline

Thanks!

danielveza’s picture

Issue summary: View changes
danielveza’s picture

Status: Needs work » Needs review
Issue tags: -Needs issue summary update

Addressed MR feedback, tests are green, IS updated.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Nice catch noticing that it doesn't need to be a FunctionalJavascript test. The feedback from the last review was addressed. I reviewed the changes myself, comparing the new test to the old one. It looks to me like the test's functionality was preserved. In addition to comparing the code changes I also compared the HTML output of the tests. It's a little difficult because the flow of the tests is slightly different, but for the most part they match up. I think it looks good.

  • catch committed 5b151198 on 11.x
    fix: #3568635 [random test failure] InlineBlock::...

  • catch committed 157fcc04 on main
    fix: #3568635 [random test failure] InlineBlock::...

catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.