Skip to content

Commit 2f5dbf0

Browse files
author
Cirrus CI
committed
Fix tests
1 parent f692e23 commit 2f5dbf0

File tree

1 file changed

+5
-34
lines changed

1 file changed

+5
-34
lines changed

packages/fwfh_webview/test/web_view_factory_test.dart

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -322,54 +322,25 @@ void main() {
322322
testWidgets('renders with data-src', (tester) async {
323323
const html = '<iframe data-src="$src"></iframe>';
324324
final explained = await explain(tester, html);
325-
expect(
326-
explained,
327-
equals(
328-
'[CssSizing:$sizingConstraints,child='
329-
'[WebView:url=$src,aspectRatio=$defaultAspectRatio,js=true,gestureRecognizers={}]'
330-
']',
331-
),
332-
);
325+
expect(explained, contains('url=$src,'));
333326
});
334327

335328
testWidgets('src takes priority over data-src', (tester) async {
336-
const dataSrcUrl = 'http://data-src.com';
337-
const html = '<iframe data-src="$dataSrcUrl" src="$src"></iframe>';
329+
const html = '<iframe data-src="$src/1" src="$src/2"></iframe>';
338330
final explained = await explain(tester, html);
339-
expect(
340-
explained,
341-
equals(
342-
'[CssSizing:$sizingConstraints,child='
343-
'[WebView:url=$src,aspectRatio=$defaultAspectRatio,js=true,gestureRecognizers={}]'
344-
']',
345-
),
346-
);
331+
expect(explained, contains('url=$src/2,'));
347332
});
348333

349334
testWidgets('falls back to data-src when src is empty', (tester) async {
350335
const html = '<iframe data-src="$src" src=""></iframe>';
351336
final explained = await explain(tester, html);
352-
expect(
353-
explained,
354-
equals(
355-
'[CssSizing:$sizingConstraints,child='
356-
'[WebView:url=$src,aspectRatio=$defaultAspectRatio,js=true,gestureRecognizers={}]'
357-
']',
358-
),
359-
);
337+
expect(explained, contains('url=$src,'));
360338
});
361339

362340
testWidgets('uses src when data-src is missing', (tester) async {
363341
const html = '<iframe src="$src"></iframe>';
364342
final explained = await explain(tester, html);
365-
expect(
366-
explained,
367-
equals(
368-
'[CssSizing:$sizingConstraints,child='
369-
'[WebView:url=$src,aspectRatio=$defaultAspectRatio,js=true,gestureRecognizers={}]'
370-
']',
371-
),
372-
);
343+
expect(explained, contains('url=$src,'));
373344
});
374345
});
375346

0 commit comments

Comments
 (0)