• Add a new assertion trait (assertErrorMessage()) into tests/src/Traits/CloudAssertionTrait.php
      protected function assertErrorMessage() {
        $this->assertSession()->statusCodeEquals(200);
        $this->assertSession()->pageTextNotContains($this->t('Warning message'));
        $this->assertSession()->pageTextContains($this->t('Error message'));
      }
    
CommentFileSizeAuthor
#2 3159394-2.patch5.69 KBliuchanggang
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

liuchanggang created an issue. See original summary.

liuchanggang’s picture

Status: Needs work » Needs review
FileSize
5.69 KB
yas’s picture

Title: Add an assertion for an error status message » add an an assertErrorMessage() method to assert an error status message
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

@liuchanggang

Thank you for refactoring. The patch looks good to me. I'll merge the patch to 8.x-1.x and 8.x-2.x and close this issue as Fixed.

  • yas committed c283019 on 8.x-1.x authored by liuchanggang
    Issue #3159394 by liuchanggang, yas: add an an assertErrorMessage()...

  • yas committed d3d63f0 on 8.x-2.x authored by liuchanggang
    Issue #3159394 by liuchanggang, yas: add an an assertErrorMessage()...
yas’s picture

Title: add an an assertErrorMessage() method to assert an error status message » add an assertErrorMessage() method to assert an error status message
Status: Reviewed & tested by the community » Fixed
yas’s picture

Title: add an assertErrorMessage() method to assert an error status message » Add an assertErrorMessage() method to assert an error status message

Status: Fixed » Closed (fixed)

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