Skip to content

Commit

Permalink
Replace e2e tests with Maestro (bluesky-social#3983)
Browse files Browse the repository at this point in the history
* Setup maestro tests and convert some initial tests

* Remove detox

* Replace all tests with maestro
  • Loading branch information
pfrazee authored May 13, 2024
1 parent 5cd4ac3 commit d49b93d
Show file tree
Hide file tree
Showing 41 changed files with 882 additions and 1,730 deletions.
86 changes: 0 additions & 86 deletions .detoxrc.js

This file was deleted.

1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'detox',
'react',
'lingui',
'simple-import-sort',
Expand Down
2 changes: 2 additions & 0 deletions __e2e__/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flows:
- "flows/*"
30 changes: 30 additions & 0 deletions __e2e__/flows/composer-self-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
appId: xyz.blueskyweb.app
---
- runScript:
file: ../setupServer.js
env:
SERVER_PATH: ?users
- runFlow:
file: ../setupApp.yml
- tapOn:
id: "e2eSignInAlice"

# Post an image with the porn label
- tapOn:
id: "composeFAB"
- inputText: "Post with an image"
- tapOn:
id: "openGalleryBtn"
- tapOn:
id: "labelsBtn"
- tapOn:
label: "Tap on porn"
point: 78%,67%
- tapOn:
label: "Tap on confirm"
point: 51%,92%
- tapOn:
id: "composerPublishBtn"
- tapOn:
id: "e2eRefreshHome"
- assertVisible: "Adult Content"
87 changes: 87 additions & 0 deletions __e2e__/flows/composer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
appId: xyz.blueskyweb.app
---
- runScript:
file: ../setupServer.js
env:
SERVER_PATH: ?users
- runFlow:
file: ../setupApp.yml
- tapOn:
id: "e2eSignInAlice"
- tapOn:
id: "composeFAB"
- inputText: "Post text only"
- tapOn:
id: "composerPublishBtn"
- assertVisible:
id: "composeFAB"
- tapOn:
id: "composeFAB"
- inputText: "Post with an image"
- tapOn:
id: "openGalleryBtn"
- tapOn:
id: "composerPublishBtn"
- assertVisible:
id: "composeFAB"
- tapOn:
id: "composeFAB"
- inputText: "Post with a https://example.com link card"
- tapOn:
id: "composerPublishBtn"
- assertVisible:
id: "composeFAB"
- tapOn:
id: "e2eRefreshHome"
- tapOn:
id: "replyBtn"
- inputText: "Reply text only"
- tapOn:
id: "composerPublishBtn"
- assertVisible:
id: "composeFAB"
- tapOn:
id: "replyBtn"
- inputText: "Reply with an image"
- tapOn:
id: "openGalleryBtn"
- tapOn:
id: "composerPublishBtn"
- assertVisible:
id: "composeFAB"
- tapOn:
id: "replyBtn"
- inputText: "Reply with a https://example.com link card"
- tapOn:
id: "composerPublishBtn"
- assertVisible:
id: "composeFAB"
- tapOn:
id: "repostBtn"
- tapOn:
id: "quoteBtn"
- inputText: "QP text only"
- tapOn:
id: "composerPublishBtn"
- assertVisible:
id: "composeFAB"
- tapOn:
id: "repostBtn"
- tapOn:
id: "quoteBtn"
- inputText: "QP with an image"
- tapOn:
id: "openGalleryBtn"
- tapOn:
id: "composerPublishBtn"
- assertVisible:
id: "composeFAB"
- tapOn:
id: "repostBtn"
- tapOn:
id: "quoteBtn"
- inputText: "QP with a https://example.com link card"
- tapOn:
id: "composerPublishBtn"
- assertVisible:
id: "composeFAB"
37 changes: 37 additions & 0 deletions __e2e__/flows/create-account.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
appId: xyz.blueskyweb.app
---
- runScript:
file: ../setupServer.js
env:
SERVER_PATH: ""
- runFlow:
file: ../setupApp.yml
- tapOn:
id: "e2eOpenLoggedOutView"
- tapOn:
id: "createAccountButton"
- tapOn:
id: "selectServiceButton"
- tapOn:
id: "customSelectBtn"
- tapOn:
id: "customServerTextInput"
- inputText: "http://localhost:3000"
- pressKey: Enter
- tapOn:
id: "doneBtn"
- tapOn:
id: "emailInput"
- inputText: "[email protected]"
- tapOn:
id: "passwordInput"
- inputText: "hunter2"
- pressKey: Enter
- tapOn:
id: "nextBtn"
- tapOn:
id: "handleInput"
- inputText: "e2e-test"
- tapOn:
id: "nextBtn"

Loading

0 comments on commit d49b93d

Please sign in to comment.