Skip to content

Commit

Permalink
add test for SettingsTile widget
Browse files Browse the repository at this point in the history
  • Loading branch information
smart7even committed Aug 19, 2024
1 parent b59dbf2 commit 7209acd
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/widget/settings_tile_widget_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:uneconly/feature/settings/widget/settings_tile.dart';

void main() {
group('SettingsTile widget', () {
testWidgets(
'should show settings tile with title and description',
(widgetTester) async {
await widgetTester.pumpWidget(
const MaterialApp(
home: Scaffold(
body: SettingsTile(
title: 'Hello',
description: 'World',
),
),
),
);

final titleText = find.text('Hello');
final descriptionText = find.text('World');

expect(titleText, findsOne);
expect(descriptionText, findsOne);
},
);
});
}

0 comments on commit 7209acd

Please sign in to comment.