@@ -19,6 +19,7 @@ public static function setUpBeforeClass(): void
1919 foreach (glob (TESTS_DIR . 'data/mail/list_00.eml ' ) as $ f ) {
2020 Bootstrap::import_message ($ f , 'INBOX ' );
2121 }
22+ Bootstrap::import_message ($ TESTS_DIR . 'data/mail/long_lines.eml ' , 'INBOX ' );
2223 }
2324
2425 /**
@@ -73,4 +74,53 @@ public function testPrint()
7374 $ browser ->driver ->switchTo ()->window ($ current_window );
7475 });
7576 }
77+
78+ /**
79+ * Test visibility of long lines in print view
80+ */
81+ public function testPrintLongLines ()
82+ {
83+ $ this ->browse (function ($ browser ) {
84+ $ browser ->go ('mail ' );
85+
86+ $ browser ->waitFor ('#messagelist tbody tr:nth-child(2) ' )
87+ ->ctrlClick ('#messagelist tbody tr:nth-child(2) ' );
88+
89+ $ browser ->clickToolbarMenuItem ('more ' , null , false );
90+
91+ $ browser ->with (new Popupmenu ('message-menu ' ), function ($ browser ) use (&$ current_window , &$ new_window ) {
92+ if ($ browser ->isPhone ()) {
93+ $ browser ->assertMissing ('a.print ' );
94+ $ this ->markTestSkipped ();
95+ }
96+
97+ [$ current_window , $ new_window ] = $ browser ->openWindow (static function ($ browser ) {
98+ $ browser ->clickMenuItem ('print ' );
99+ });
100+ });
101+
102+ $ browser ->driver ->switchTo ()->window ($ new_window );
103+
104+ $ browser ->with (new App (), static function ($ browser ) {
105+ $ browser ->assertEnv ([
106+ 'task ' => 'mail ' ,
107+ 'action ' => 'print ' ,
108+ ]);
109+ });
110+
111+ $ browser ->assertSeeIn ('.subject ' , 'Very long lines ' )
112+ ->assertSeeIn ('.message-part div.pre ' , 'QuovoluptatemquiasuscipitquamconsecteturofficiaaquiaQuisedestcumvoluptatedoloremremInametvoluptatumsuntharumfugiatnihilmagnam.
113+
114+ AperiamcupiditatedoloribusreprehenderitnonEtnihilvelititaquefacilisvelitinventoreDoloraperiamperspiciatisautemeiusconsequaturtempora.
115+
116+ EsseevenietharumattotaminciduntesseQuiitaquenullarepellatRepellendusidvoluptatemcorruptiassumendaofficiaaetDolorembeataelaborumasperioresratione.
117+
118+ OptiodoloremtotamfugiatblanditiisexercitationemcorruptinecessitatibusoccaecatiNemodelenitiquiafugitutrepellendusFacilisteneturautidfacereRepellendusatquesitminimaminimaculpateneturidreiciendisVoluptasdignissimosdignissimosquodvoluptatibusexplicaboSedaliasasperioresmaioresoccaecatietnemo.
119+
120+ AliasquisquaminsedVeniamvelitconsecteturquitemporeanimiutautsapienteFugitteneturvoluptasquiaetfacere. ' );
121+
122+ $ browser ->driver ->close ();
123+ $ browser ->driver ->switchTo ()->window ($ current_window );
124+ });
125+ }
76126}
0 commit comments