minor
This commit is contained in:
24
dashboard/test/widget_test.dart
Normal file
24
dashboard/test/widget_test.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
// This is a basic Flutter widget test.
|
||||
//
|
||||
// To perform an interaction with a widget in your test, use the WidgetTester
|
||||
// utility in the flutter_test package. For example, you can send tap and scroll
|
||||
// gestures. You can also use WidgetTester to find child widgets in the widget
|
||||
// tree, read text, and verify that the values of widget properties are correct.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:dashboard/main.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Dashboard renders title', (WidgetTester tester) async {
|
||||
tester.view.physicalSize = const Size(1600, 900);
|
||||
tester.view.devicePixelRatio = 1.0;
|
||||
addTearDown(tester.view.reset);
|
||||
|
||||
await tester.pumpWidget(
|
||||
const CatalogDashboardApp(apiBaseUrl: 'http://localhost:8080/api/v1'),
|
||||
);
|
||||
expect(find.text('Каталог стройматериалов'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user