From 4a3770d0ecd2ba052f6a96763c30e41b62c63d24 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 14 Jun 2023 12:27:22 -0700 Subject: [PATCH] Make Tor Version Check nicer --- integration_test/steps/text.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/integration_test/steps/text.dart b/integration_test/steps/text.dart index fde658e0..6af94916 100644 --- a/integration_test/steps/text.dart +++ b/integration_test/steps/text.dart @@ -40,15 +40,16 @@ StepDefinitionGeneric TorVersionPresent() { context.expect(versionString, "#.#.#", reason: "error reading version string from fetch-tor.sh"); return; } - context.world.attach(versionString, "text/plain", "Then I expect the Tor version to be present"); + context.world.attach( versionString.substring(0,4), "text/plain", "Then I expect the Tor version to be present"); //context.reporter.message("test!!!", MessageLevel.info); print("looking for version string $versionString"); return await context.world.appDriver.waitUntil(() async { + await context.world.appDriver.waitForAppToSettle(); final finder = context.world.appDriver.findBy( - versionString, + versionString.substring(0,4), FindType.text, ); - final isP = await context.world.appDriver.isPresent(finder); + final isP = context.world.appDriver.isPresent(finder); return isP; }); },