From 9fb1ae839e0a47bd7bb5e2a3c6dd594fa6b0764c Mon Sep 17 00:00:00 2001 From: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Wed, 21 Dec 2022 18:47:11 -0800 Subject: [PATCH] [iOS] Add task for spell check integration test (#116222) * Add fix and test * Add test owner * Print error for testing * Make sure locale is the problem * Test capitalization fix * Take out Android specific test * Verify eng fix * Test fix * Empty-Commit * Test all tests * Up string size for testing * Remove test * Undo ci.yaml testing changes * Test android variant: * Change to testwidgets * Add widget tester * Remove android only attempt * Revert ci.yaml changes --- .ci.yaml | 2 +- TESTOWNERS | 1 + .../bin/tasks/spell_check_test_ios.dart | 12 ++++++++++ .../integration_test/integration_test.dart | 22 ------------------- 4 files changed, 14 insertions(+), 23 deletions(-) create mode 100644 dev/devicelab/bin/tasks/spell_check_test_ios.dart diff --git a/.ci.yaml b/.ci.yaml index 94e0d8f9d729..f2bde4168519 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -3895,7 +3895,7 @@ targets: properties: tags: > ["devicelab", "ios", "mac"] - task_name: spell_check_test + task_name: spell_check_test_ios - name: Mac native_ui_tests_macos recipe: devicelab/devicelab_drone diff --git a/TESTOWNERS b/TESTOWNERS index 60fac112cf25..46261a846507 100644 --- a/TESTOWNERS +++ b/TESTOWNERS @@ -259,6 +259,7 @@ /dev/devicelab/bin/tasks/web_benchmarks_html.dart @yjbanov @flutter/web /dev/devicelab/bin/tasks/windows_home_scroll_perf__timeline_summary.dart @jonahwilliams @flutter/engine /dev/devicelab/bin/tasks/windows_startup_test.dart @loic-sharma @flutter/desktop +/dev/devicelab/bin/tasks/spell_check_test_ios.dart @camsim99 @flutter/android ## Host only framework tests # Linux analyze diff --git a/dev/devicelab/bin/tasks/spell_check_test_ios.dart b/dev/devicelab/bin/tasks/spell_check_test_ios.dart new file mode 100644 index 000000000000..433ef993267b --- /dev/null +++ b/dev/devicelab/bin/tasks/spell_check_test_ios.dart @@ -0,0 +1,12 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter_devicelab/framework/devices.dart'; +import 'package:flutter_devicelab/framework/framework.dart'; +import 'package:flutter_devicelab/tasks/integration_tests.dart'; + +Future main() async { + deviceOperatingSystem = DeviceOperatingSystem.ios; + await task(createSpellCheckIntegrationTest()); +} diff --git a/dev/integration_tests/spell_check/integration_test/integration_test.dart b/dev/integration_tests/spell_check/integration_test/integration_test.dart index 45661e47574c..28d81a2cc1ef 100644 --- a/dev/integration_tests/spell_check/integration_test/integration_test.dart +++ b/dev/integration_tests/spell_check/integration_test/integration_test.dart @@ -176,26 +176,4 @@ void main() { expect(expectedTextSpanTreeFound, isTrue); }); - - test( - 'fetchSpellCheckSuggestions returns null when there is a pending request', - () async { - final String text = - 'neaf niofenaifn iofn iefnaoeifn ifneoa finoiafn inf ionfieaon ienf ifn ieonfaiofneionf oieafn oifnaioe nioenfio nefaion oifan' * - 10; - - defaultSpellCheckService.fetchSpellCheckSuggestions(locale, text); - - final String modifiedText = text.substring(5); - - final List? spellCheckSuggestionSpans = - await defaultSpellCheckService.fetchSpellCheckSuggestions( - locale, modifiedText); - - expect(spellCheckSuggestionSpans, isNull); - - // We expect it to be rare for the first request to complete before the - // second, so no text should be saved as of now. - expect(defaultSpellCheckService.lastSavedResults, null); - }); }