This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
packages/url_launcher/url_launcher_web/example/integration_test Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,36 @@ void main() {
123
123
final html.Element anchor = _findSingleAnchor ();
124
124
expect (anchor.hasAttribute ('href' ), false );
125
125
});
126
+
127
+ testWidgets ('can be created and disposed' , (WidgetTester tester) async {
128
+ final Uri uri = Uri .parse ('http://foobar' );
129
+ const int itemCount = 500 ;
130
+ await tester.pumpWidget (
131
+ Directionality (
132
+ textDirection: TextDirection .ltr,
133
+ child: MediaQuery (
134
+ data: const MediaQueryData (),
135
+ child: ListView .builder (
136
+ itemCount: itemCount,
137
+ itemBuilder: (_, int index) => WebLinkDelegate (TestLinkInfo (
138
+ uri: uri,
139
+ target: LinkTarget .defaultTarget,
140
+ builder: (BuildContext context, FollowLink ? followLink) =>
141
+ Text ('#$index ' , textAlign: TextAlign .center),
142
+ )),
143
+ ),
144
+ ),
145
+ ),
146
+ );
147
+
148
+ await tester.pumpAndSettle ();
149
+
150
+ await tester.scrollUntilVisible (
151
+ find.text ('#${itemCount - 1 }' ),
152
+ 2500 ,
153
+ maxScrolls: 1000 ,
154
+ );
155
+ });
126
156
});
127
157
}
128
158
You can’t perform that action at this time.
0 commit comments