This issue is parallel to drupal core's

#2942900: Convert JavascriptTestBase Tests to use DrupalSelenium2Driver

What is actually on my mind is that this a first step to resolving a newly discovered test instability.

Recently to prove if we had a test instability I changed only code comments and observed that the test failures changed. :(

https://www.drupal.org/project/flag/issues/2894095#comment-12670926

Before I chase down the bug I want to update to the latest way of working ..
The last time we resolved some test instability, in the flag module, it was due in part because of differences between modern and deprecated versions of core behaving subtly different.

I hope this explains why I have graded a seemingly simple maintenance task as a critical bug....

Comments

martin107 created an issue. See original summary.

martin107’s picture

Status: Active » Needs review
StatusFileSize
new4.57 KB

This patch also updates flag_bookmark.

martin107’s picture

Status: Needs review » Postponed

My patch is a little premature, as #2942900: Convert JavascriptTestBase Tests to use DrupalSelenium2Driver is still RTBC

martin107’s picture

Assigned: martin107 » Unassigned
Status: Postponed » Needs review

The eagle has landed.

socketwench’s picture

Reeeeeeee----testing!

socketwench’s picture

Status: Needs review » Needs work

I'm getting the same error. Does this only work on 8.6?

martin107’s picture

Does this only work on 8.6?

Ah yes, sorry forgot to mention that, my bad... 8.6 'cos #2942900: Convert JavascriptTestBase Tests to use DrupalSelenium2Driver

socketwench’s picture

Hm. 8 failures even on 8.6.

martin107’s picture

Ah, sorry, I am having to juggle my time carefully ... at the moment...

I will try and find time to look at this ... soon.

martin107’s picture

triggering a test on D8.7

martin107’s picture

Assigned: Unassigned » martin107
Status: Needs work » Needs review
StatusFileSize
new5.59 KB
new1.66 KB

In the cold light of day - Most, but not all of the errors are trivial to see and fix.... one remains.

socketwench’s picture

Running it through the test again since I wonder if we're still getting erratic failures.

socketwench’s picture

Nope, doesn't look like that issue.

martin107’s picture

Thanks for looking at this.

My sense from local tests is that the failure is very repeatable - with all the good and bad that brings.

I need to carve out a little time over the weekend but my current theory is that things are now much faster in testing - and our waiting strategy needs to be tighter.

so the click button, wait for DOM sequence is muddled - the second AJAX command response is maybe not complete, or the DOM render is not finished... that is what is out of my grasp

I will try and sit down with a coffee on Saturday and get to the bottom of it.

martin107’s picture

StatusFileSize
new7.52 KB
new2.17 KB

Before I start... to my mind, I am open to the criticism that I haven't got to the bottom of the issue ... and than I am just playing with my food...

So went back to 'Question all the things' and one aspect unrelated to the test failures was ..

"Our test are ok but being paranoid our tests do not actually check that the message vanishes."

If the link is visible it should be clickable ... and our previous tests should be water tight!

In this patch I have inserted a delay while waiting for the message to go... and hey presto the test accidentally now pass locally...

I just want to see if this is fixed remotely/definitely.

berdir’s picture

StatusFileSize
new9.19 KB
new3.75 KB

This was a tricky one.

* $assert_session wasn't actually an assert session ;)
* waitForElementNotVisible() didn't actually exist, but assertNoElementAfterWait() has been added recently.
* Drupal core disabled animations in tests by default, that confused me for a while, have to set a flag to allow them in this specific test.

Also sneaking in a php 7.2 warning fix about count() in a kernel test.

  • Berdir committed cadf391 on 8.x-4.x
    Issue #2983268 by martin107, Berdir: Convert JavascriptTestBase Tests to...
berdir’s picture

Status: Needs review » Fixed

Much green, such wow.

In you go.

martin107’s picture

Assigned: martin107 » Unassigned

Thank you, thank you

Status: Fixed » Closed (fixed)

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