From dca4d080df8d508b6a26511fc0dfe6b574ef3357 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 31 Jan 2023 14:13:45 -0800 Subject: [PATCH] Fix Tor tests, Remove Waits in 01_general tests --- .drone.yml | 3 +++ .gitignore | 2 ++ .../features/01_general/01_splash.feature | 2 +- .../features/01_general/02_save_load.feature | 18 ++++++------------ 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.drone.yml b/.drone.yml index ee5eaf11..ca12a8a4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -71,6 +71,9 @@ steps: - sudo apt-get install --fix-missing -y xvfb - export DISPLAY=:99 - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & + - ./fetch-tor.sh + - export PATH=$PATH:$PWD/linux/Tor + - tor --version - ./run-tests.sh 01_general - name: test-build-android diff --git a/.gitignore b/.gitignore index 9a101cea..85f4ee78 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,8 @@ integration_test/gherkin/ integration_test/CustomSteps.md analysis_options.yaml integration_test/env/default/tor +linux/Tor +linux/tor.tar.gz coverage test/failures diff --git a/integration_test/features/01_general/01_splash.feature b/integration_test/features/01_general/01_splash.feature index 0bd676c6..67d48c18 100644 --- a/integration_test/features/01_general/01_splash.feature +++ b/integration_test/features/01_general/01_splash.feature @@ -1,7 +1,7 @@ @env:clean Feature: Splash screen displays and then closes Scenario: splash screen appears - Then I expect the widget 'SplashView' to be present within 1 second + Then I expect the widget 'SplashView' to be present within 10 seconds Then I expect the widget 'ProfileManagerView' to be present within 10 seconds # first-run of cwtch creates expected files and folders Then I expect the folder 'integration_test/env/temp' to exist diff --git a/integration_test/features/01_general/02_save_load.feature b/integration_test/features/01_general/02_save_load.feature index c32057fe..29d97f82 100644 --- a/integration_test/features/01_general/02_save_load.feature +++ b/integration_test/features/01_general/02_save_load.feature @@ -3,30 +3,24 @@ Feature: Settings pane opens and can save settings persistently Scenario: Open the Settings pane Given I wait until the widget with type 'ProfileMgrView' is present And I tap the 'OpenSettingsView' button - And I wait for 1 second - Then I expect the text 'Cwtch Settings' to be present + Then I expect the text 'Cwtch Settings' to be present within 5 seconds And I take a screenshot Scenario: Change every setting (except Language) Given I wait until the widget with type 'ProfileMgrView' is present Given I tap the 'OpenSettingsView' button - And I wait for 1 second + And I wait until the text 'Use Light Themes' is present 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 - #And I tap the first "ddi_mermaid" element - #And I tap the element that contains the text "Mermaid" - #And I tap the element that contains the text "Mermaid" within the "DropdownTheme" And I tap the widget that contains the text "Block Unknown Contacts" And I tap the widget that contains the text "Streamer/Presentation Mode" And I tap the widget that contains the text "Enable Experiments" - And I wait for 1 second + And I wait until the text 'Enable Group Chat' is present And I tap the widget that contains the text "Enable Group Chat" And I tap the widget that contains the text "Hosting Servers" And I tap the widget that contains the text "File Sharing" - And I wait for 1 seconds + And I wait until the text 'Image Previews and Profile Pictures' is present And I tap the widget that contains the text "Image Previews and Profile Pictures" - And I wait for 1 seconds + And I wait until the text 'Download Folder' is present And I fill the "DownloadFolderPicker" field with "/this/is/a/test" And I tap the widget that contains the text "Enable Clickable Links" Then I expect the switch that contains the text "Use Light Themes" to be checked @@ -43,7 +37,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 wait until the widget with type 'ProfileMgrView' is present Given I tap the 'OpenSettingsView' button - And I wait for 1 second + And I wait until the text 'Use Light Themes' is present 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