Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
2d0af0aa
Unverified
Commit
2d0af0aa
authored
Sep 24, 2018
by
Hans Muller
Committed by
GitHub
Sep 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gallery accessibility test: check default themes, gallery themes (#22141)
parent
8553497b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
249 additions
and
231 deletions
+249
-231
accessibility_test.dart
examples/flutter_gallery/test/accessibility_test.dart
+249
-231
No files found.
examples/flutter_gallery/test/accessibility_test.dart
View file @
2d0af0aa
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_gallery/demo/all.dart'
;
import
'package:flutter_gallery/demo/all.dart'
;
import
'package:flutter_gallery/gallery/themes.dart'
;
void
main
(
)
{
void
main
(
)
{
group
(
'All material demos meet recommended tap target sizes'
,
()
{
group
(
'All material demos meet recommended tap target sizes'
,
()
{
...
@@ -237,235 +238,252 @@ void main() {
...
@@ -237,235 +238,252 @@ void main() {
});
});
group
(
'All material demos meet text contrast guidelines'
,
()
{
group
(
'All material demos meet text contrast guidelines'
,
()
{
testWidgets
(
'backdrop_demo'
,
(
WidgetTester
tester
)
async
{
final
List
<
ThemeData
>
themes
=
<
ThemeData
>[
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
kLightGalleryTheme
.
data
,
await
tester
.
pumpWidget
(
MaterialApp
(
home:
BackdropDemo
()));
ThemeData
.
light
(),
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
// TODO(hansmuller): add kDarkGalleryTheme.data, ThemeData.dark(), see #22044
handle
.
dispose
();
];
});
const
List
<
String
>
themeNames
=
<
String
>[
testWidgets
(
'bottom_app_bar_demo'
,
(
WidgetTester
tester
)
async
{
'kLightGalleryTheme'
,
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
'ThemeData.light()'
,
await
tester
.
pumpWidget
(
MaterialApp
(
home:
BottomAppBarDemo
()));
// TODO(hansmuller): add 'kDarkGalleryTheme', 'ThemeData.dark()', see 22044
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
];
handle
.
dispose
();
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21651
for
(
int
themeIndex
=
0
;
themeIndex
<
themes
.
length
;
themeIndex
+=
1
)
{
final
ThemeData
theme
=
themes
[
themeIndex
];
testWidgets
(
'bottom_navigation_demo'
,
(
WidgetTester
tester
)
async
{
final
String
themeName
=
themeNames
[
themeIndex
];
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
BottomNavigationDemo
()));
testWidgets
(
'backdrop_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
BackdropDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'buttons_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
ButtonsDemo
()));
testWidgets
(
'bottom_app_bar_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
BottomAppBarDemo
()));
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21647
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'cards_demo'
,
(
WidgetTester
tester
)
async
{
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21651
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
CardsDemo
()));
testWidgets
(
'bottom_navigation_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
BottomNavigationDemo
()));
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21651
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'chip_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
ChipDemo
()));
testWidgets
(
'buttons_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
ButtonsDemo
()));
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21647
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'data_table_demo'
,
(
WidgetTester
tester
)
async
{
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21647
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
DataTableDemo
()));
testWidgets
(
'cards_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
CardsDemo
()));
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21647
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'date_and_time_picker_demo'
,
(
WidgetTester
tester
)
async
{
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21651
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
DateAndTimePickerDemo
()));
testWidgets
(
'chip_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
ChipDemo
()));
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21647
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'dialog_demo'
,
(
WidgetTester
tester
)
async
{
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21647
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
DialogDemo
()));
testWidgets
(
'data_table_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
DataTableDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'drawer_demo'
,
(
WidgetTester
tester
)
async
{
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21647
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
DrawerDemo
()));
testWidgets
(
'date_and_time_picker_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
DateAndTimePickerDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'elevation_demo'
,
(
WidgetTester
tester
)
async
{
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21647
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
ElevationDemo
()));
testWidgets
(
'dialog_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
DialogDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'expansion_panels_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
ExpansionPanelsDemo
()));
testWidgets
(
'drawer_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
DrawerDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'grid_list_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
const
GridListDemo
()));
testWidgets
(
'elevation_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
ElevationDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'icons_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
IconsDemo
()));
testWidgets
(
'expansion_panels_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
ExpansionPanelsDemo
()));
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21647
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'leave_behind_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
const
LeaveBehindDemo
()));
testWidgets
(
'grid_list_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
const
GridListDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'list_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
const
ListDemo
()));
testWidgets
(
'icons_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
IconsDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'menu_demo'
,
(
WidgetTester
tester
)
async
{
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21647
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
const
MenuDemo
()));
testWidgets
(
'leave_behind_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
const
LeaveBehindDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'modal_bottom_sheet_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
ModalBottomSheetDemo
()));
testWidgets
(
'list_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
const
ListDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'overscroll_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
const
OverscrollDemo
()));
testWidgets
(
'menu_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
const
MenuDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'page_selector_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
PageSelectorDemo
()));
testWidgets
(
'modal_bottom_sheet_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
ModalBottomSheetDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'persistent_bottom_sheet_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
PersistentBottomSheetDemo
()));
testWidgets
(
'overscroll_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
const
OverscrollDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'progress_indicator_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
ProgressIndicatorDemo
()));
testWidgets
(
'page_selector_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
PageSelectorDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'reorderable_list_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
const
ReorderableListDemo
()));
testWidgets
(
'persistent_bottom_sheet_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
PersistentBottomSheetDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'scrollable_tabs_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
ScrollableTabsDemo
()));
testWidgets
(
'progress_indicator_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
ProgressIndicatorDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'search_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
SearchDemo
()));
testWidgets
(
'reorderable_list_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
const
ReorderableListDemo
()));
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21651
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'selection_controls_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
SelectionControlsDemo
()));
testWidgets
(
'scrollable_tabs_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
ScrollableTabsDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'slider_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
SliderDemo
()));
testWidgets
(
'search_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
SearchDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'snack_bar_demo'
,
(
WidgetTester
tester
)
async
{
},
skip:
true
);
// https://github.com/flutter/flutter/issues/21651
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
const
SnackBarDemo
()));
testWidgets
(
'selection_controls_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
SelectionControlsDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'tabs_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
TabsDemo
()));
testWidgets
(
'slider_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
SliderDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'tabs_fab_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
TabsFabDemo
()));
testWidgets
(
'snack_bar_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
const
SnackBarDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'text_form_field_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
const
TextFormFieldDemo
()));
testWidgets
(
'tabs_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
TabsDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'tooltip_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
TooltipDemo
()));
testWidgets
(
'tabs_fab_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
TabsFabDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
testWidgets
(
'two_level_list_demo'
,
(
WidgetTester
tester
)
async
{
});
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
TwoLevelListDemo
()));
testWidgets
(
'text_form_field_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
handle
.
dispose
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
const
TextFormFieldDemo
()));
});
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
});
testWidgets
(
'tooltip_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
TooltipDemo
()));
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
});
testWidgets
(
'two_level_list_demo
$themeName
'
,
(
WidgetTester
tester
)
async
{
final
SemanticsHandle
handle
=
tester
.
ensureSemantics
();
await
tester
.
pumpWidget
(
MaterialApp
(
theme:
theme
,
home:
TwoLevelListDemo
()));
await
expectLater
(
tester
,
meetsGuideline
(
textContrastGuideline
));
handle
.
dispose
();
});
}
});
});
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment