From 53cd3c58b7f2e9487c75740d7213ccce75dd170b Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 9 Feb 2022 17:29:30 -0500 Subject: [PATCH] gherkin tests: more timing --- .drone.yml | 2 +- integration_test/features/01_general/02_save_load.feature | 4 ++-- .../features/02_global_settings/01_language.feature | 2 +- integration_test/features/02_global_settings/02_theme.feature | 4 ++-- .../features/02_global_settings/04_block_unknown.feature | 3 ++- .../features/02_global_settings/05_streamer.feature | 2 +- integration_test/gherkin_suite_test.editable.dart | 2 +- run-tests.sh | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 177fde06..82440f18 100644 --- a/.drone.yml +++ b/.drone.yml @@ -348,7 +348,7 @@ steps: - name: ui-tests commands: - - export PATH=$PATH:/Users/Dan/development/flutter/bin + - export PATH=$PATH:/Users/Dan/development/flutter/bin:/usr/local/bin - export GEM_HOME=$HOME/.gem - export PATH=$GEM_HOME/ruby/2.6.0/bin:$PATH - ./run-tests.sh diff --git a/integration_test/features/01_general/02_save_load.feature b/integration_test/features/01_general/02_save_load.feature index 37146e7f..7298c8a6 100644 --- a/integration_test/features/01_general/02_save_load.feature +++ b/integration_test/features/01_general/02_save_load.feature @@ -7,7 +7,7 @@ Feature: Settings pane opens and can save settings persistently Scenario: Change every setting (except Language) Given I tap the 'OpenSettingsView' button - And I wait for 1 second + And I wait for 4 second When I tap the widget that contains the text "Use Light Themes" #And I choose option 3 from the "DropdownTheme" dropdown #When I tap the "DropdownTheme" button @@ -36,7 +36,7 @@ Feature: Settings pane opens and can save settings persistently Scenario: When the app is reloaded, settings from the previous scenario have persisted Given I tap the 'OpenSettingsView' button - And I wait for 1 second + And I wait for 2 second Then I expect the switch that contains the text "Use Light Themes" to be checked And I expect the switch that contains the text "Block Unknown Contacts" to be checked And I expect the switch that contains the text "Streamer/Presentation Mode" to be checked diff --git a/integration_test/features/02_global_settings/01_language.feature b/integration_test/features/02_global_settings/01_language.feature index 0c5903d0..f0daf090 100644 --- a/integration_test/features/02_global_settings/01_language.feature +++ b/integration_test/features/02_global_settings/01_language.feature @@ -1,7 +1,7 @@ Feature: Global 'language' setting Scenario: Change the language to French and back Given I tap the 'OpenSettingsView' button - And I wait for 1 second + And I wait for 2 second Then I expect the text 'Language' to be present And I expect the text 'Langue' to be absent When I tap the widget that contains the text "English" diff --git a/integration_test/features/02_global_settings/02_theme.feature b/integration_test/features/02_global_settings/02_theme.feature index 860f4dcb..3edc9fa1 100644 --- a/integration_test/features/02_global_settings/02_theme.feature +++ b/integration_test/features/02_global_settings/02_theme.feature @@ -1,10 +1,10 @@ Feature: Global 'Theme' setting Scenario: Change the theme to Mermaid Given I tap the 'OpenSettingsView' button - And I wait for 1 second + And I wait for 2 second When I tap the "DropdownTheme" button And I tap the element that contains the text "Mermaid" Scenario: Change the theme to Light Mode Given I tap the 'OpenSettingsView' button - And I wait for 1 second + And I wait for 2 second And I tap the widget that contains the text "Theme" \ No newline at end of file diff --git a/integration_test/features/02_global_settings/04_block_unknown.feature b/integration_test/features/02_global_settings/04_block_unknown.feature index 62190fae..21eadf9b 100644 --- a/integration_test/features/02_global_settings/04_block_unknown.feature +++ b/integration_test/features/02_global_settings/04_block_unknown.feature @@ -3,6 +3,7 @@ Feature: Block unknown contacts setting Scenario: Carol adds Alice but Alice doesn't see it because Block Unknowns is enabled Given I wait until the widget with type 'ProfileMgrView' is present Given I tap the 'OpenSettingsView' button + And I wait for 2 second When I tap the widget that contains the text "Block Unknown Contacts" Then I expect the switch that contains the text "Block Unknown Contacts" to be checked Given I tap the back button @@ -10,7 +11,7 @@ Feature: Block unknown contacts setting And I tap the button that contains the text "Carol" And I tap the button with tooltip "Add a new contact or conversation" When I fill the "txtAddP2P" field with "vbmmsbx3rhndpfz6t3jkrd7m3yu62xzrldxkdgsw4rsehiwuw3tmo7yd" - And I wait for 1 second + And I wait for 2 second And I take a screenshot And I tap the back button And I wait until the text "Alice" is present diff --git a/integration_test/features/02_global_settings/05_streamer.feature b/integration_test/features/02_global_settings/05_streamer.feature index cc53babf..c5741836 100644 --- a/integration_test/features/02_global_settings/05_streamer.feature +++ b/integration_test/features/02_global_settings/05_streamer.feature @@ -5,7 +5,7 @@ Feature: Streamer mode And I wait until the text "vbmmsbx3rhndpfz6t3jkrd7m3yu62xzrldxkdgsw4rsehiwuw3tmo7yd" is present And I wait until the text "pjurzypqui3dnpxj6aemk6cqz22yx6zfr5lq4jzu7muwe2yyx2zrnzyd" is present Given I tap the 'OpenSettingsView' button - And I wait for 1 second + And I wait for 2 second And I tap the widget that contains the text "Streamer/Presentation Mode" Then I expect the switch that contains the text "Streamer/Presentation Mode" to be checked When I tap the back button diff --git a/integration_test/gherkin_suite_test.editable.dart b/integration_test/gherkin_suite_test.editable.dart index 5415367e..0da89f89 100644 --- a/integration_test/gherkin_suite_test.editable.dart +++ b/integration_test/gherkin_suite_test.editable.dart @@ -95,6 +95,6 @@ void main() { ResetCwtchEnvironment(), AttachScreenshotOnFailedStepHook(), ], - (World world) { var res = app.main(); sleep(Duration(seconds:1)); return res;}, + (World world) { var res = app.main(); sleep(Duration(seconds:2)); return res;}, ); } \ No newline at end of file diff --git a/run-tests.sh b/run-tests.sh index ee881e91..62a48f6b 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -26,7 +26,7 @@ source run-tests.env # macos sed doesn't have -z paths=$(find . -wholename "./integration_test/features/*/$1*.feature" | sort | awk '!/0$/{printf $0}/0$/' | sed "s/\.\//','\.\//g;s/^','/'/g;s/$/'/g") sed "s|featurePaths: REPLACED_BY_SCRIPT|featurePaths: [$paths]|" integration_test/gherkin_suite_test.editable.dart > integration_test/gherkin_suite_test.dart -# flutter pub run build_runner clean +flutter pub run build_runner clean flutter pub run build_runner build --delete-conflicting-outputs LD_LIBRARY_PATH=$LDPATH DYLD_LIBRARY_PATH=$LDPATH CWTCH_HOME=./integration_test/env/temp/ flutter drive --headless --dart-define TEST_MODE=true --driver=test_driver/integration_test_driver.dart --target=integration_test/gherkin_suite_test.dart -d $DEVICE node index2.js