@@ -166,8 +166,8 @@ TEST_CASE("AppWidget", "[rocket]") {
166166
167167 bool current = GENERATE (true , false );
168168
169- ctx.pumpWidget (Center (
170- RunningAppWidget ( app, [&] { tapped++; }, [&] { killed++; }, current)));
169+ ctx.pumpWidget (Center (RunningAppWidget (
170+ app, [&] { tapped++; }, [&] { killed++; }, current, Rotation::None )));
171171
172172 auto appWidget = ctx.findByType <RunningAppWidget>();
173173 REQUIRE_THAT (
@@ -183,12 +183,12 @@ TEST_CASE("AppWidget", "[rocket]") {
183183 }
184184}
185185
186- TEST_CASE (" Launcher" , " [rocket]" ) {
186+ TemporaryDirectory
187+ makeDrafts () {
187188 TemporaryDirectory tmp;
188189
189190 const auto configPath = tmp.dir / " .config" / " draft" ;
190191 REQUIRE_NOTHROW (std::filesystem::create_directories (configPath));
191- setenv (" HOME" , tmp.dir .c_str (), true );
192192
193193 writeFile (configPath / " a.draft" , R"(
194194name=a
@@ -202,6 +202,24 @@ name=b
202202call=yes
203203 )" );
204204
205+ return tmp;
206+ }
207+
208+ TEST_CASE (" Landscape" , " [rocket]" ) {
209+ auto tmp = makeDrafts ();
210+ setenv (" HOME" , tmp.dir .c_str (), true );
211+
212+ auto ctx = TestContext::make (/* keyboardAttached=*/ true );
213+ ctx.pumpWidget (Center (LauncherWidget ()));
214+ auto launcher = ctx.findByType <LauncherWidget>();
215+
216+ REQUIRE_THAT (launcher, ctx.matchesGolden (" rocket-landscape.png" ));
217+ }
218+
219+ TEST_CASE (" Launcher" , " [rocket]" ) {
220+ auto tmp = makeDrafts ();
221+ setenv (" HOME" , tmp.dir .c_str (), true );
222+
205223 auto ctx = TestContext::make ();
206224 ctx.pumpWidget (Center (LauncherWidget ()));
207225 auto launcher = ctx.findByType <LauncherWidget>();
0 commit comments