mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-11-04 03:54:44 +00:00 
			
		
		
		
	* fix: notifications setting * fix: remove dependency in reminder bloc * test: remove redundant lines
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'package:appflowy/workspace/application/settings/settings_dialog_bloc.dart';
 | 
						|
import 'package:flutter/material.dart';
 | 
						|
import 'package:flutter_test/flutter_test.dart';
 | 
						|
import 'package:integration_test/integration_test.dart';
 | 
						|
 | 
						|
import '../util/util.dart';
 | 
						|
 | 
						|
void main() {
 | 
						|
  IntegrationTestWidgetsFlutterBinding.ensureInitialized();
 | 
						|
 | 
						|
  group('board add row test', () {
 | 
						|
    testWidgets('Add card from header', (tester) async {
 | 
						|
      await tester.initializeAppFlowy();
 | 
						|
      await tester.tapGoButton();
 | 
						|
 | 
						|
      await tester.openSettings();
 | 
						|
      await tester.openSettingsPage(SettingsPage.notifications);
 | 
						|
      await tester.pumpAndSettle();
 | 
						|
 | 
						|
      final switchFinder = find.byType(Switch);
 | 
						|
 | 
						|
      // Defaults to enabled
 | 
						|
      Switch switchWidget = tester.widget(switchFinder);
 | 
						|
      expect(switchWidget.value, true);
 | 
						|
 | 
						|
      // Disable
 | 
						|
      await tester.tap(switchFinder);
 | 
						|
      await tester.pumpAndSettle();
 | 
						|
 | 
						|
      switchWidget = tester.widget(switchFinder);
 | 
						|
      expect(switchWidget.value, false);
 | 
						|
 | 
						|
      // Enable again
 | 
						|
      await tester.tap(switchFinder);
 | 
						|
      await tester.pumpAndSettle();
 | 
						|
 | 
						|
      switchWidget = tester.widget(switchFinder);
 | 
						|
      expect(switchWidget.value, true);
 | 
						|
    });
 | 
						|
  });
 | 
						|
}
 |