mirror of
https://github.com/Jellify-Music/App.git
synced 2026-03-18 03:00:35 -05:00
Add new Tests
This commit is contained in:
@@ -3,3 +3,4 @@ appId: com.jellify
|
||||
- launchApp
|
||||
- runFlow: login.yaml
|
||||
- runFlow: musicplayer.yaml
|
||||
- runFlow: queue.yaml
|
||||
|
||||
@@ -32,28 +32,3 @@ appId: com.jellify
|
||||
- assertVisible:
|
||||
id: "pause-button-test-id"
|
||||
|
||||
# check if the queue button is visible
|
||||
- assertVisible:
|
||||
id: 'queue-button-test-id'
|
||||
|
||||
|
||||
# check if the queue button is visible
|
||||
- tapOn:
|
||||
id: 'queue-button-test-id'
|
||||
|
||||
# Scroll Down to see the queue
|
||||
- scrollUntilVisible:
|
||||
element:
|
||||
id: "queue-item-12"
|
||||
direction: "DOWN"
|
||||
|
||||
- scrollUntilVisible:
|
||||
element:
|
||||
id: "queue-item-12"
|
||||
direction: "UP"
|
||||
# Play some other Song
|
||||
- tapOn:
|
||||
id: 'queue-item-12'
|
||||
|
||||
- pressKey: BACK
|
||||
- pressKey: BACK
|
||||
7
maestro-tests/network.yaml
Normal file
7
maestro-tests/network.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
appId: com.jellify
|
||||
---
|
||||
- launchApp
|
||||
- assertVisible:
|
||||
id: 'You are offline'
|
||||
- runFlow: musicplayer.yaml
|
||||
- runFlow: queue.yaml
|
||||
25
maestro-tests/queue.yaml
Normal file
25
maestro-tests/queue.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
appId: com.jellify
|
||||
---
|
||||
- assertVisible:
|
||||
id: 'queue-button-test-id'
|
||||
|
||||
# check if the queue button is visible
|
||||
- tapOn:
|
||||
id: 'queue-button-test-id'
|
||||
|
||||
# Scroll Down to see the queue
|
||||
- scrollUntilVisible:
|
||||
element:
|
||||
id: "queue-item-12"
|
||||
direction: "DOWN"
|
||||
|
||||
- scrollUntilVisible:
|
||||
element:
|
||||
id: "queue-item-12"
|
||||
direction: "UP"
|
||||
# Play some other Song
|
||||
- tapOn:
|
||||
id: 'queue-item-12'
|
||||
|
||||
- pressKey: BACK
|
||||
- pressKey: BACK
|
||||
@@ -54,8 +54,19 @@ async function stopRecording(pid) {
|
||||
--env password=${password}`
|
||||
|
||||
const output = execSync(command, { stdio: 'inherit', env: process.env })
|
||||
|
||||
execSync('adb shell svc wifi disable', { stdio: 'inherit', env: process.env })
|
||||
execSync('adb shell svc data disable', { stdio: 'inherit', env: process.env })
|
||||
|
||||
const networkCommand = `${MAESTRO_PATH} test ./maestro-tests/network.yaml`
|
||||
const networkOutput = execSync(networkCommand, { stdio: 'inherit', env: process.env })
|
||||
|
||||
execSync('adb shell svc wifi enable', { stdio: 'inherit', env: process.env })
|
||||
execSync('adb shell svc data enable', { stdio: 'inherit', env: process.env })
|
||||
|
||||
console.log('✅ Maestro test completed')
|
||||
console.log(output)
|
||||
console.log(networkOutput)
|
||||
await stopRecording(pid)
|
||||
process.exit(0)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user