From 6188a4c545e6e6794eba943431ec20108553b98f Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 31 Jul 2024 11:30:22 -0400 Subject: Add support for CI screenshot testing Rework the high-level App & AppView widgets a bit to allow conditionally displaying a simple fixed pattern if the HOMESCREEN_DEMO_CI environment variable is set to anything other than "0". The pattern displayed matches what the Qt homescreen shows for this to allow the CI test to be common. Bug-AGL: SPEC-5203 Change-Id: I36ed77c91304e3b6cdbce6a7350831d52d20d378 Signed-off-by: Scott Murray (cherry picked from commit 25b6a079d5fe9c1365d776298ae5230a4de1ba16) --- lib/presentation/screens/home/home_ci.dart | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/presentation/screens/home/home_ci.dart (limited to 'lib/presentation') diff --git a/lib/presentation/screens/home/home_ci.dart b/lib/presentation/screens/home/home_ci.dart new file mode 100644 index 0000000..8584420 --- /dev/null +++ b/lib/presentation/screens/home/home_ci.dart @@ -0,0 +1,20 @@ +import 'package:flutter_ics_homescreen/export.dart'; + +// Simple fixed pattern homescreen for AGL CI screenshot testing + +class HomeScreenCI extends StatelessWidget { + const HomeScreenCI({super.key}); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + // Note that the colors are specified with hex in order to match + // Qt's red/blue/green constants, which are different than Flutter's. + Container(width: 1080, height: 216, color: Color(0xFF0000FF)), + Container(width: 1080, height: 1488, color: Color(0xFFFF0000)), + Container(width: 1080, height: 216, color: Color(0xFF008000)) + ], + ); + } +} -- cgit