Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Migrate test to null safety, and update pubspec.yaml (WIP)
  • Loading branch information
ditman committed Feb 10, 2021
commit 01bde668202266f2b56c3e16e0943f02f87604a5
7 changes: 4 additions & 3 deletions packages/url_launcher/url_launcher_web/test/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: regular_integration_tests
publish_to: none

environment:
sdk: ">=2.10.0-56.0.dev <3.0.0"
sdk: ">=2.12.0-0 <3.0.0"
flutter: ">=1.26.0-0" # For integration_test from sdk

dependencies:
flutter:
Expand All @@ -14,9 +15,9 @@ dev_dependencies:
flutter_test:
sdk: flutter
http: ^0.12.2
mockito: ^4.1.1
mockito: ^5.0.0-nullsafety.5
url_launcher_web:
path: ../
integration_test:
path: ../../../integration_test
sdk: flutter

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// @dart = 2.9
import 'dart:html' as html;
import 'dart:js_util';
import 'package:flutter/widgets.dart';
Expand Down Expand Up @@ -219,7 +218,7 @@ void main() {
child: WebLinkDelegate(TestLinkInfo(
uri: uri,
target: LinkTarget.blank,
builder: (BuildContext context, FollowLink followLink) {
builder: (BuildContext context, FollowLink? followLink) {
return Container(width: 100, height: 100);
},
)),
Expand All @@ -237,7 +236,7 @@ void main() {
child: WebLinkDelegate(TestLinkInfo(
uri: uri2,
target: LinkTarget.self,
builder: (BuildContext context, FollowLink followLink) {
builder: (BuildContext context, FollowLink? followLink) {
return Container(width: 100, height: 100);
},
)),
Expand All @@ -260,7 +259,7 @@ void main() {
child: WebLinkDelegate(TestLinkInfo(
uri: uri,
target: LinkTarget.blank,
builder: (BuildContext context, FollowLink followLink) {
builder: (BuildContext context, FollowLink? followLink) {
return Container(
key: containerKey,
child: SizedBox(width: 50.0, height: 50.0),
Expand Down Expand Up @@ -294,7 +293,7 @@ html.Element _findSingleAnchor() {
// Search inside platform views with shadow roots as well.
for (final html.Element platformView
in html.document.querySelectorAll('flt-platform-view')) {
final html.ShadowRoot shadowRoot = platformView.shadowRoot;
final html.ShadowRoot shadowRoot = platformView.shadowRoot!;
if (shadowRoot != null) {
for (final html.Element anchor in shadowRoot.querySelectorAll('a')) {
if (hasProperty(anchor, linkViewIdProperty)) {
Expand All @@ -321,8 +320,8 @@ class TestLinkInfo extends LinkInfo {
bool get isDisabled => uri == null;

TestLinkInfo({
@required this.uri,
@required this.target,
@required this.builder,
required this.uri,
required this.target,
required this.builder,
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// @dart = 2.9
import 'package:integration_test/integration_test_driver.dart';

Future<void> main() async => integrationDriver();