From 84db1f997bdf3db7e0038cf221da6756d4a04076 Mon Sep 17 00:00:00 2001 From: Hailey Date: Mon, 28 Oct 2024 13:31:24 -0700 Subject: Fix E2E tests (#5980) --- __e2e__/flows/composer-self-label.yml | 8 +++----- __e2e__/flows/shared-prefs.yml | 5 +++-- src/view/com/composer/labels/LabelsBtn.tsx | 3 ++- src/view/com/home/HomeHeaderLayoutMobile.tsx | 5 ++++- src/view/screens/Storybook/Dialogs.tsx | 13 ------------- src/view/screens/Storybook/index.tsx | 13 +++++++++++++ 6 files changed, 25 insertions(+), 22 deletions(-) diff --git a/__e2e__/flows/composer-self-label.yml b/__e2e__/flows/composer-self-label.yml index cc38b1d99..e41dea64a 100644 --- a/__e2e__/flows/composer-self-label.yml +++ b/__e2e__/flows/composer-self-label.yml @@ -17,14 +17,12 @@ appId: xyz.blueskyweb.app id: "openGalleryBtn" - tapOn: id: "labelsBtn" -- tapOn: - label: "Tap on porn" - point: 78%,67% +- tapOn: "Porn" - tapOn: label: "Tap on confirm" - point: 51%,92% + id: "confirmBtn" - tapOn: id: "composerPublishBtn" - tapOn: id: "e2eRefreshHome" -- assertVisible: "Adult Content" \ No newline at end of file +- assertVisible: "Adult Content" diff --git a/__e2e__/flows/shared-prefs.yml b/__e2e__/flows/shared-prefs.yml index 73a066829..b645fd0d2 100644 --- a/__e2e__/flows/shared-prefs.yml +++ b/__e2e__/flows/shared-prefs.yml @@ -8,7 +8,8 @@ appId: xyz.blueskyweb.app file: ../setupApp.yml - tapOn: id: "e2eSignInAlice" -- tapOn: "/sys/debug" +- tapOn: + id: "storybookBtn" - tapOn: id: "sharedPrefsTestOpenBtn" - tapOn: @@ -16,7 +17,7 @@ appId: xyz.blueskyweb.app - assertVisible: "Hello" - tapOn: id: "removeStringBtn" -- assertVisible: "null" +- assertVisible: "undefined" - tapOn: id: "setBoolBtn" - assertVisible: "true" diff --git a/src/view/com/composer/labels/LabelsBtn.tsx b/src/view/com/composer/labels/LabelsBtn.tsx index fe8816fb4..2147a5af7 100644 --- a/src/view/com/composer/labels/LabelsBtn.tsx +++ b/src/view/com/composer/labels/LabelsBtn.tsx @@ -220,7 +220,8 @@ function DialogInner({ onPress={() => control.close()} color="primary" size={isWeb ? 'small' : 'large'} - variant="solid"> + variant="solid" + testID="confirmBtn"> Done diff --git a/src/view/com/home/HomeHeaderLayoutMobile.tsx b/src/view/com/home/HomeHeaderLayoutMobile.tsx index 3994a3c3c..f5397d717 100644 --- a/src/view/com/home/HomeHeaderLayoutMobile.tsx +++ b/src/view/com/home/HomeHeaderLayoutMobile.tsx @@ -73,7 +73,10 @@ export function HomeHeaderLayoutMobile({ ]}> {IS_DEV && ( <> - + diff --git a/src/view/screens/Storybook/Dialogs.tsx b/src/view/screens/Storybook/Dialogs.tsx index 343d7f07b..4b4d4191f 100644 --- a/src/view/screens/Storybook/Dialogs.tsx +++ b/src/view/screens/Storybook/Dialogs.tsx @@ -1,8 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {useNavigation} from '@react-navigation/native' -import {NavigationProp} from '#/lib/routes/types' import {useDialogStateControlContext} from '#/state/dialogs' import {atoms as a} from '#/alf' import {Button, ButtonText} from '#/components/Button' @@ -25,7 +23,6 @@ export function Dialogs() { const [shouldRenderUnmountTest, setShouldRenderUnmountTest] = React.useState(false) const unmountTestInterval = React.useRef() - const navigation = useNavigation() const onUnmountTestStartPressWithClose = () => { setShouldRenderUnmountTest(true) @@ -152,16 +149,6 @@ export function Dialogs() { End Unmount Test - - + + -- cgit 1.4.1