@@ -64,68 +64,6 @@ void main() {
6464 expect (element.id, 'background-html-view' );
6565 }, semanticsEnabled: false );
6666 });
67-
68- group ('With semantics' , () {
69- testWidgets ('finds semantics of wrapped widgets' ,
70- (WidgetTester tester) async {
71- await _fullyRenderApp (tester);
72-
73- final web.Element element =
74- _getHtmlElementAtCenter (clickableButtonFinder, tester);
75-
76- expect (element.tagName.toLowerCase (), 'flt-semantics' );
77- expect (element.getAttribute ('aria-label' ), 'Works As Expected' );
78- },
79- // TODO(bparrishMines): The semantics label is returning null.
80- // See https://github.com/flutter/flutter/issues/145238
81- skip: true );
82-
83- testWidgets (
84- 'finds semantics of wrapped widgets with intercepting set to false' ,
85- (WidgetTester tester) async {
86- await _fullyRenderApp (tester);
87-
88- final web.Element element =
89- _getHtmlElementAtCenter (clickableWrappedButtonFinder, tester);
90-
91- expect (element.tagName.toLowerCase (), 'flt-semantics' );
92- expect (element.getAttribute ('aria-label' ),
93- 'Never calls onPressed transparent' );
94- },
95- // TODO(bparrishMines): The semantics label is returning null.
96- // See https://github.com/flutter/flutter/issues/145238
97- skip: true );
98-
99- testWidgets ('finds semantics of unwrapped elements' ,
100- (WidgetTester tester) async {
101- await _fullyRenderApp (tester);
102-
103- final web.Element element =
104- _getHtmlElementAtCenter (nonClickableButtonFinder, tester);
105-
106- expect (element.tagName.toLowerCase (), 'flt-semantics' );
107- expect (element.getAttribute ('aria-label' ), 'Never calls onPressed' );
108- },
109- // TODO(bparrishMines): The semantics label is returning null.
110- // See https://github.com/flutter/flutter/issues/145238
111- skip: true );
112-
113- // Notice that, when hit-testing the background platform view, instead of
114- // finding a semantics node, the platform view itself is found. This is
115- // because the platform view does not add interactive semantics nodes into
116- // the framework's semantics tree. Instead, its semantics is determined by
117- // the HTML content of the platform view itself. Flutter's semantics tree
118- // simply allows the hit test to land on the platform view by making itself
119- // hit test transparent.
120- testWidgets ('on background directly' , (WidgetTester tester) async {
121- await _fullyRenderApp (tester);
122-
123- final web.Element element =
124- _getHtmlElementAt (tester.getTopLeft (backgroundFinder));
125-
126- expect (element.id, 'background-html-view' );
127- });
128- });
12967}
13068
13169Future <void > _fullyRenderApp (WidgetTester tester) async {
0 commit comments