about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-10-28 15:55:17 -0700
committerGitHub <noreply@github.com>2024-10-28 15:55:17 -0700
commit3244e1c468559e8643631deaf14bde8390fcf177 (patch)
treee8171c824b2153a8b038c764ab372b86537d68b7
parent84db1f997bdf3db7e0038cf221da6756d4a04076 (diff)
downloadvoidsky-3244e1c468559e8643631deaf14bde8390fcf177.tar.zst
More e2e test fixes (#5982)
* fix feed reorder test

* fix feed reorder test pt 2

* fix edit profile test

* fix mod list test

* fix fab

* add assert

* one more assertVisible

* fix search test

* tap now now if it shows up
-rw-r--r--__e2e__/flows/composer-self-label.yml2
-rw-r--r--__e2e__/flows/composer.yml4
-rw-r--r--__e2e__/flows/create-account.yml1
-rw-r--r--__e2e__/flows/curate-lists.yml4
-rw-r--r--__e2e__/flows/feed-reorder.yml21
-rw-r--r--__e2e__/flows/login.yml5
-rw-r--r--__e2e__/flows/mod-lists.yml15
-rw-r--r--__e2e__/flows/search-screen.yml1
-rw-r--r--__e2e__/flows/shared-prefs.yml2
-rw-r--r--__e2e__/flows/thread-muting.yml3
-rw-r--r--src/screens/Profile/Header/EditProfileDialog.tsx11
-rw-r--r--src/view/screens/SavedFeeds.tsx12
12 files changed, 50 insertions, 31 deletions
diff --git a/__e2e__/flows/composer-self-label.yml b/__e2e__/flows/composer-self-label.yml
index e41dea64a..c89e46db5 100644
--- a/__e2e__/flows/composer-self-label.yml
+++ b/__e2e__/flows/composer-self-label.yml
@@ -10,6 +10,8 @@ appId: xyz.blueskyweb.app
     id: "e2eSignInAlice"
 
 # Post an image with the porn label
+- assertVisible:
+      id: "composeFAB"
 - tapOn:
     id: "composeFAB"
 - inputText: "Post with an image"
diff --git a/__e2e__/flows/composer.yml b/__e2e__/flows/composer.yml
index f6d760ea5..d6cf7dff5 100644
--- a/__e2e__/flows/composer.yml
+++ b/__e2e__/flows/composer.yml
@@ -8,6 +8,8 @@ appId: xyz.blueskyweb.app
     file: ../setupApp.yml
 - tapOn:
     id: "e2eSignInAlice"
+- assertVisible:
+      id: "composeFAB"
 - tapOn:
     id: "composeFAB"
 - inputText: "Post text only"
@@ -60,7 +62,7 @@ appId: xyz.blueskyweb.app
     id: "repostBtn"
 - tapOn:
     id: "quoteBtn"
-- inputText: "QP text only"   
+- inputText: "QP text only"
 - tapOn:
     id: "composerPublishBtn"
 - assertVisible:
diff --git a/__e2e__/flows/create-account.yml b/__e2e__/flows/create-account.yml
index 99ac1371a..2bb2d0645 100644
--- a/__e2e__/flows/create-account.yml
+++ b/__e2e__/flows/create-account.yml
@@ -29,6 +29,7 @@ appId: xyz.blueskyweb.app
 - pressKey: Enter
 - tapOn:
     id: "nextBtn"
+- tapOn: "Not now"
 - tapOn:
      id: "handleInput"
 - inputText: "e2e-test"
diff --git a/__e2e__/flows/curate-lists.yml b/__e2e__/flows/curate-lists.yml
index 662ec8423..d46c58eed 100644
--- a/__e2e__/flows/curate-lists.yml
+++ b/__e2e__/flows/curate-lists.yml
@@ -23,7 +23,6 @@ appId: xyz.blueskyweb.app
     id: "editDescriptionInput"
 - inputText: "They good"
 - tapOn: "Save"
-- tapOn: "Save"
 - assertNotVisible:
     id: "createOrEditListModal"
 - tapOn: "About"
@@ -46,7 +45,6 @@ appId: xyz.blueskyweb.app
 - eraseText
 - inputText: "They bad"
 - tapOn: "Save"
-- tapOn: "Save"
 - assertNotVisible:
     id: "createOrEditListModal"
 - assertVisible: Bad Ppl
@@ -62,7 +60,6 @@ appId: xyz.blueskyweb.app
     id: "editDescriptionInput"
 - eraseText
 - tapOn: "Save"
-- tapOn: "Save"
 - assertNotVisible:
     id: "createOrEditListModal"
 - assertNotVisible:
@@ -90,7 +87,6 @@ appId: xyz.blueskyweb.app
     id: "editDescriptionInput"
 - inputText: "They good"
 - tapOn: "Save"
-- tapOn: "Save"
 - assertNotVisible:
     id: "createOrEditListModal"
 - tapOn: "About"
diff --git a/__e2e__/flows/feed-reorder.yml b/__e2e__/flows/feed-reorder.yml
index f766a697d..c502373c4 100644
--- a/__e2e__/flows/feed-reorder.yml
+++ b/__e2e__/flows/feed-reorder.yml
@@ -36,13 +36,14 @@ appId: xyz.blueskyweb.app
     id: "viewHeaderDrawerBtn"
 - tapOn:
     id: "menuItemButton-Feeds"
-- tapOn: 
+- tapOn:
     id: "editFeedsBtn"
 - tapOn:
     label: "Tap on down arrow"
-    point: "79%,23%"
+    id: "feed-timeline-moveDown"
 - tapOn:
-    id: "viewHeaderDrawerBtn"
+      label: "Save button"
+      id: "saveChangesBtn"
 - tapOn:
     id: "viewHeaderDrawerBtn"
 - assertVisible:
@@ -57,13 +58,14 @@ appId: xyz.blueskyweb.app
     id: "viewHeaderDrawerBtn"
 - tapOn:
     id: "menuItemButton-Feeds"
-- tapOn: 
+- tapOn:
     id: "editFeedsBtn"
 - tapOn:
     label: "Tap on down arrow"
-    point: "79%,23%"
+    id: "feed-feed-moveDown"
 - tapOn:
-    id: "viewHeaderDrawerBtn"
+    label: "Save button"
+    id: "saveChangesBtn"
 - tapOn:
     id: "viewHeaderDrawerBtn"
 - assertVisible:
@@ -78,13 +80,14 @@ appId: xyz.blueskyweb.app
     id: "viewHeaderDrawerBtn"
 - tapOn:
     id: "menuItemButton-Feeds"
-- tapOn: 
+- tapOn:
     id: "editFeedsBtn"
 - tapOn:
     label: "Tap on unpin"
-    point: "91%,23%"
+    id: "feed-timeline-togglePin"
 - tapOn:
-    id: "viewHeaderDrawerBtn"
+      label: "Save button"
+      id: "saveChangesBtn"
 - tapOn:
     id: "viewHeaderDrawerBtn"
 - assertVisible:
diff --git a/__e2e__/flows/login.yml b/__e2e__/flows/login.yml
index f1001f78d..34fe634c5 100644
--- a/__e2e__/flows/login.yml
+++ b/__e2e__/flows/login.yml
@@ -9,7 +9,7 @@ appId: xyz.blueskyweb.app
 - tapOn:
     id: "e2eOpenLoggedOutView"
 - tapOn: "Sign in"
-- tapOn: 
+- tapOn:
     id: "selectServiceButton"
 - tapOn: "Custom"
 - tapOn:
@@ -23,4 +23,5 @@ appId: xyz.blueskyweb.app
     id: "loginPasswordInput"
 - inputText: "hunter2"
 - pressKey: Enter
-- assertVisible: "Following"
\ No newline at end of file
+- tapOn: "Not now"
+- assertVisible: "Following"
diff --git a/__e2e__/flows/mod-lists.yml b/__e2e__/flows/mod-lists.yml
index 75ee100a8..1d6bb2da2 100644
--- a/__e2e__/flows/mod-lists.yml
+++ b/__e2e__/flows/mod-lists.yml
@@ -22,24 +22,25 @@ appId: xyz.blueskyweb.app
     id: "editDescriptionInput"
 - inputText: "Shhh"
 - tapOn: "Save"
-- tapOn: "Save"
 
 # view modlist
 - assertVisible: "Muted Users"
 - assertVisible: "Shhh"
 
-# toggle mute subscription
 - tapOn:
-    point: "70%,9%"
+    label: "Dropdown"
+    point: "71%,9%"
+
 - tapOn: "Mute accounts"
 - tapOn: "Mute list"
 - tapOn: "Unmute"
 
-# toggle block subscription
 - tapOn:
-    point: "70%,9%"
+      label: "Dropdown"
+      point: "71%,9%"
+
 - tapOn: "Block accounts"
 - tapOn: "Block list"
 - tapOn: "Unblock"
- 
- # the rest of the behaviors are tested in curate-lists.yml
\ No newline at end of file
+
+ # the rest of the behaviors are tested in curate-lists.yml
diff --git a/__e2e__/flows/search-screen.yml b/__e2e__/flows/search-screen.yml
index 49319f3e4..a4f3f38be 100644
--- a/__e2e__/flows/search-screen.yml
+++ b/__e2e__/flows/search-screen.yml
@@ -12,6 +12,7 @@ appId: xyz.blueskyweb.app
 # Navigate to another user profile via autocomplete
 - tapOn:
     id: "bottomBarSearchBtn"
+- assertVisible: "Search"
 - tapOn: "Search"
 - inputText: "b"
 - tapOn:
diff --git a/__e2e__/flows/shared-prefs.yml b/__e2e__/flows/shared-prefs.yml
index b645fd0d2..9cc7707be 100644
--- a/__e2e__/flows/shared-prefs.yml
+++ b/__e2e__/flows/shared-prefs.yml
@@ -8,6 +8,8 @@ appId: xyz.blueskyweb.app
     file: ../setupApp.yml
 - tapOn:
     id: "e2eSignInAlice"
+- assertVisible:
+      id: "storybookBtn"
 - tapOn:
     id: "storybookBtn"
 - tapOn:
diff --git a/__e2e__/flows/thread-muting.yml b/__e2e__/flows/thread-muting.yml
index 316389a79..e588805c2 100644
--- a/__e2e__/flows/thread-muting.yml
+++ b/__e2e__/flows/thread-muting.yml
@@ -7,10 +7,11 @@ appId: xyz.blueskyweb.app
 - runFlow:
     file: ../setupApp.yml
 
-
 # Login, create a thread, and log out
 - tapOn:
     id: "e2eSignInAlice"
+- assertVisible:
+    id: "composeFAB"
 - tapOn:
     id: "composeFAB"
 - inputText: "Test thread"
diff --git a/src/screens/Profile/Header/EditProfileDialog.tsx b/src/screens/Profile/Header/EditProfileDialog.tsx
index 3cbae2a60..af4b5498a 100644
--- a/src/screens/Profile/Header/EditProfileDialog.tsx
+++ b/src/screens/Profile/Header/EditProfileDialog.tsx
@@ -67,7 +67,8 @@ export function EditProfileDialog({
       nativeOptions={{
         preventDismiss: dirty,
         minHeight: SCREEN_HEIGHT,
-      }}>
+      }}
+      testID="editProfileModal">
       <DialogInner
         profile={profile}
         onUpdate={onUpdate}
@@ -221,7 +222,8 @@ function DialogInner({
         size="small"
         color="primary"
         variant="ghost"
-        style={[a.rounded_full]}>
+        style={[a.rounded_full]}
+        testID="editProfileCancelBtn">
         <ButtonText style={[a.text_md]}>
           <Trans>Cancel</Trans>
         </ButtonText>
@@ -244,7 +246,8 @@ function DialogInner({
         size="small"
         color="primary"
         variant="ghost"
-        style={[a.rounded_full]}>
+        style={[a.rounded_full]}
+        testID="editProfileSaveBtn">
         <ButtonText style={[a.text_md, !dirty && t.atoms.text_contrast_low]}>
           <Trans>Save</Trans>
         </ButtonText>
@@ -316,6 +319,7 @@ function DialogInner({
               onChangeText={setDisplayName}
               label={_(msg`Display name`)}
               placeholder={_(msg`e.g. Alice Lastname`)}
+              testID="editProfileDisplayNameInput"
             />
           </TextField.Root>
           {displayNameTooLong && (
@@ -346,6 +350,7 @@ function DialogInner({
               multiline
               label={_(msg`Display name`)}
               placeholder={_(msg`Tell us a bit about yourself`)}
+              testID="editProfileDescriptionInput"
             />
           </TextField.Root>
           {descriptionTooLong && (
diff --git a/src/view/screens/SavedFeeds.tsx b/src/view/screens/SavedFeeds.tsx
index e88866f5b..3c04ec36f 100644
--- a/src/view/screens/SavedFeeds.tsx
+++ b/src/view/screens/SavedFeeds.tsx
@@ -97,7 +97,8 @@ function SavedFeedsInner({
         onPress={onSaveChanges}
         label={_(msg`Save changes`)}
         disabled={isOverwritePending || !hasUnsavedChanges}
-        style={[isDesktop && a.mt_sm]}>
+        style={[isDesktop && a.mt_sm]}
+        testID="saveChangesBtn">
         <ButtonText style={[isDesktop && a.text_md]}>
           {isDesktop ? <Trans>Save changes</Trans> : <Trans>Save</Trans>}
         </ButtonText>
@@ -315,7 +316,8 @@ function ListItem({
               borderRadius: 4,
               marginRight: 8,
               opacity: state.hovered || state.pressed ? 0.5 : 1,
-            })}>
+            })}
+            testID={`feed-${feed.type}-moveUp`}>
             <FontAwesomeIcon
               icon="arrow-up"
               size={14}
@@ -333,7 +335,8 @@ function ListItem({
               borderRadius: 4,
               marginRight: 8,
               opacity: state.hovered || state.pressed ? 0.5 : 1,
-            })}>
+            })}
+            testID={`feed-${feed.type}-moveDown`}>
             <FontAwesomeIcon
               icon="arrow-down"
               size={14}
@@ -374,7 +377,8 @@ function ListItem({
             paddingVertical: 10,
             borderRadius: 4,
             opacity: state.hovered || state.focused ? 0.5 : 1,
-          })}>
+          })}
+          testID={`feed-${feed.type}-togglePin`}>
           <FontAwesomeIcon
             icon="thumb-tack"
             size={14}