mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 14:58:34 +00:00
Tidyup varfont_shader_puzzle (#1629)
* Tidyup `varfont_shader_puzzle` * Add a rebuild script and a test * Simplify fragment shaders * Drop web * Enable `beta` CI * make it `beta` inclusive * Pull out the program loading code
This commit is contained in:
26
experimental/varfont_shader_puzzle/test/widget_test.dart
Normal file
26
experimental/varfont_shader_puzzle/test/widget_test.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright 2023 The Flutter team. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:varfont_shader_puzzle/main.dart';
|
||||
|
||||
void main() {
|
||||
const welcomeText =
|
||||
'Welcome to your first day on the FontCo team! Are you ready to help us publish our newest font, Designer Pro?';
|
||||
const welcomeTextStep2 =
|
||||
'Oh no, you clicked the button too hard! Now the font file is glitched. Help us put the letters back together so we can launch!';
|
||||
|
||||
testWidgets('Initial display', (tester) async {
|
||||
// Build our app and trigger a frame.
|
||||
await tester.pumpWidget(const TypePuzzle());
|
||||
|
||||
// Verify intro text
|
||||
expect(find.text(welcomeText), findsOneWidget);
|
||||
expect(find.text(welcomeTextStep2), findsNothing);
|
||||
|
||||
// Verify OK button
|
||||
expect(find.text('OK'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user