Follow up for #2863267: Convert web tests of views
Add \Drupal\simpletest\WebTestBase::assertBlockAppears and ::assertNoBlockAppears to \Drupal\FunctionalTests\AssertLegacyTrait.
These assertions are needed for #2863644: Convert web tests of block and #2864088: Convert web tests to browser tests for shortcut module
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2865336-3.patch | 2.03 KB | lendude |
Comments
Comment #2
lendudeComment #3
lendudeMy new favourite way of testing if something is empty :
$this->assertFalse(!empty($result));Since these are all just wrappers for xpath, does this need tests in
\Drupal\FunctionalTests\AssertLegacyTrait?Comment #4
lendudeComment #5
dawehner#2864088: Convert web tests to browser tests for shortcut module adds the same kind of methods, but with
@trigger_errorwhich would be nice here, of course :)Comment #6
michielnugter commentedIt seems to me it's best to add it here and not in another conversion?
Would mean we have to postpone #2864088: Convert web tests to browser tests for shortcut module on this I think?
The trigger error is a nice addition but then we could argue that every method in AssertLegacyTrait should have it. I'm in favor of not doing it in this issue and if we do see the need to open up a new issue for it.
The new assertions do need tests though, setting it back to needs work for that.
Comment #7
michielnugter commentedComment #9
jonathan1055 commentedRe-queued for 8.5.x
I thought it would be useful to check the patch again as the last test was at 8.4 more than four months ago.
Comment #10
jonathan1055 commentedPatch failed to apply at 8.5.x. OK I will get the patch working again.
Comment #11
lendudeHmm I'd forgotten about this one, in #2863644: Convert web tests of block, we've moved this to a Trait in the block module instead of onto
AssertLegacyTraitComment #12
jonathan1055 commentedOK, that sounds good. So #2864088: Convert web tests to browser tests for shortcut module can use the same Trait and then this issue can be discarded and closed.
I will test the patches on the Shortcut module and Block module together, locally, just to check it works. Those two modules are the only ones which use these assertions.
Comment #13
jonathan1055 commentedClosing this now, because the assertions will be added via #2863644: Convert web tests of block
Issue #2864088: Convert web tests to browser tests for shortcut module has a patch which uses the file from the Block module.
Comment #14
jonathan1055 commented"Duplicate" is not quite the right status. I've often wanted to have a "Closed (no longer required)" status.
Using "Outdated" because this solution has been abandoned, in favour of adding to the Block module.
Comment #15
dawehnerMaybe
closed (fixed)is the right state so :)