From bb8ed805b0b9ef2ce7692e82f25f56c4327dd830 Mon Sep 17 00:00:00 2001 From: ashuntu Date: Mon, 9 Dec 2024 19:17:29 -0600 Subject: [PATCH] Fix integration tests --- .../ubuntu_pro_for_wsl_test.dart | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/gui/packages/ubuntupro/integration_test/ubuntu_pro_for_wsl_test.dart b/gui/packages/ubuntupro/integration_test/ubuntu_pro_for_wsl_test.dart index 26e210dca..5585fc4ac 100644 --- a/gui/packages/ubuntupro/integration_test/ubuntu_pro_for_wsl_test.dart +++ b/gui/packages/ubuntupro/integration_test/ubuntu_pro_for_wsl_test.dart @@ -183,14 +183,10 @@ void main() { // check that we transitioned to the LandscapePage l10n = tester.l10n(); - final selfHostedRadio = find.ancestor( - of: find.text(l10n.landscapeQuickSetupSelfHosted), - matching: find.byType(YaruSelectableContainer), - ); - final continueButton = find.button(l10n.buttonNext); + final continueButton = find.button(l10n.landscapeRegister); // check that invalid input disables continue - await tester.tap(selfHostedRadio); + await tester.tap(find.text(l10n.landscapeSetupManual)); await tester.pump(); final fqdnInput = find.ancestor( of: find.text(l10n.landscapeFQDNLabel), @@ -198,12 +194,18 @@ void main() { ); await tester.enterText(fqdnInput, '::'); await tester.pump(); - expect(tester.widget(continueButton).enabled, isFalse); + expect( + tester.widget(continueButton).enabled, + isFalse, + ); // check that valid input enabled continue, and continue await tester.enterText(fqdnInput, 'localhost'); await tester.pump(); - expect(tester.widget(continueButton).enabled, isTrue); + expect( + tester.widget(continueButton).enabled, + isTrue, + ); await tester.tap(continueButton); await tester.pumpAndSettle(); @@ -324,11 +326,7 @@ landscape: await tester.tap(landscapeButton); await tester.pumpAndSettle(); final landscapeL10n = tester.l10n(); - final selfHosted = find.ancestor( - of: find.text(landscapeL10n.landscapeQuickSetupSelfHosted), - matching: find.byType(YaruSelectableContainer), - ); - await tester.tap(selfHosted); + await tester.tap(find.text(l10n.landscapeSetupManual)); final fqdnInput = find.ancestor( of: find.text(landscapeL10n.landscapeFQDNLabel), matching: find.byType(TextField), @@ -336,7 +334,7 @@ landscape: await tester.tap(fqdnInput); await tester.enterText(fqdnInput, 'localhost'); await tester.pump(); - final continueButton = find.button(landscapeL10n.buttonNext); + final continueButton = find.button(landscapeL10n.landscapeRegister); await tester.tap(continueButton); await tester.pumpAndSettle();