Problem/Motivation
I have noticed that in all of the tests for photoswipe whenever there is a call to the method $session->waitForElementVisible() it is missing the appropriate $this->assertNotNull() assertion around it. If this assertion is not made, the $session->waitForElementVisible() method will not throw an error and continue even if the element is not visible after the specified timeout. This might have implications like tests turning out OK when in reality they are not.
Steps to reproduce
Proposed resolution
Wrap all calls to this method in the $this->assertNotNull() assertion.
Example: $this->assertNotNull($session->waitForElementVisible('css', '.some-class'));
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork photoswipe-3387336
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
Comment #3
anybody@LRWebs please prepare the MR for @Grevil to review. I'll give it a first shot as an example to safe us from misunderstandings.
Comment #5
anybodyComment #6
anybodyFunny, two test indeed fail and I think we don't expect the returned element to be NULL, perhaps we found two testing issues. Assigning this to Grevil for detailed checks.
Thanks @LRWebks, nothing left to do so far :)
Changing to a possible bug
Comment #7
anybody@Grevil: I think we also have such tests in other projects, especially COOKiES? If yes, please also open such an issue there.
Important finding :)
Comment #8
grevil commentedNice find! I'll take a look, once I fixed up the GitLab CI test issue: #3390116: Make Gitlab CI Pipeline succeed.
Comment #9
grevil commentedOk, let's see what the new CI pipeline has to say :)
Comment #10
grevil commentedAll green again! Just a few incorrect assertions, nothing to worry about. LGTM!
Comment #11
anybodyConfirming RTBC!
Comment #13
grevil commentedComment #14
grevil commented