Add new Tests

This commit is contained in:
riteshshukla04
2025-07-08 20:24:19 +05:30
parent 506de72437
commit 8ed6767f63
5 changed files with 44 additions and 25 deletions

View File

@@ -3,3 +3,4 @@ appId: com.jellify
- launchApp
- runFlow: login.yaml
- runFlow: musicplayer.yaml
- runFlow: queue.yaml

View File

@@ -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

View 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
View 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

View File

@@ -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) {