1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
thesis_shop/test/total_price_test.dart

21 lines
646 B

import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:thesis_shop/screens/cart/total_price_text.dart';
import 'package:thesis_shop/stores/cart_store.dart';
void main() {
testWidgets('test total price widget', (tester) async {
await tester.pumpWidget(
MaterialApp(
home: ProviderScope(
overrides: [
totalPriceProvider.overrideWithValue(10.0),
],
child: const TotalPriceText(),
),
),
);
expect(find.text('Gesamtpreis: 10.00€'), findsOneWidget);
});
}