-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix browser tests for iframed message parts
- Loading branch information
Showing
2 changed files
with
16 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,8 +55,10 @@ public function testPreview() | |
->assertSeeIn('#remote-objects-message', 'To protect your privacy remote resources have been blocked.'); | ||
|
||
// Images | ||
$this->assertMatchesRegularExpression('/action=get/', $browser->attribute('p#v1attached > img', 'src')); | ||
$this->assertMatchesRegularExpression('/blocked/', $browser->attribute('p#v1remote > img', 'src')); | ||
$browser->withinFrame('#message-htmlpart1', function ($browser) { | ||
$this->assertMatchesRegularExpression('/action=get/', $browser->attribute('p#attached > img', 'src')); | ||
$this->assertMatchesRegularExpression('/blocked/', $browser->attribute('p#remote > img', 'src')); | ||
}); | ||
|
||
// Attachments list | ||
$browser->assertMissing('#attachment-list'); | ||
|
@@ -151,9 +153,7 @@ public function testPreviewMorelink() | |
$browser->withinFrame('#messagecontframe', static function ($browser) { | ||
$browser->waitFor('img.contactphoto'); | ||
|
||
$browser->assertSeeIn('.subject', 'Lines') | ||
->assertSeeIn('.message-part div.pre', 'Plain text message body.') | ||
->assertVisible('.message-part div.pre .sig'); | ||
$browser->assertSeeIn('.subject', 'Lines'); | ||
|
||
$browser->assertMissing('.header-headers') | ||
->click('a.headers-details') | ||
|
@@ -163,6 +163,11 @@ public function testPreviewMorelink() | |
->assertDontSeeIn('.header.cc', '[email protected]') | ||
->assertSeeIn('.header.cc a.morelink', '2 more...') | ||
->click('.header.cc a.morelink'); | ||
|
||
$browser->withinFrame('#message-part1', static function ($browser) { | ||
$browser->assertSeeIn('div.pre', 'Plain text message body.') | ||
->assertVisible('div.pre .sig'); | ||
}); | ||
}); | ||
|
||
$browser->with(new Dialog(), static function ($browser) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,10 +54,14 @@ public function testPrint() | |
]); | ||
}); | ||
|
||
// Check iframed body. | ||
$browser->withinFrame('#message-part1', static function ($browser) { | ||
$browser->assertSeeIn('div.pre', 'Plain text message body.') | ||
->assertVisible('div.pre .sig'); | ||
}); | ||
// Check headers. | ||
$browser->assertVisible('img.contactphoto') | ||
->assertSeeIn('.subject', 'Lines') | ||
->assertSeeIn('.message-part div.pre', 'Plain text message body.') | ||
->assertVisible('.message-part div.pre .sig') | ||
// Tests "more recipients" link | ||
->with('.header-headers .header.cc', static function ($browser) { | ||
$browser->assertSee('[email protected]') | ||
|