-
-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
bugSomething is not workingSomething is not working
Description
Checklist
- I can reproduce the bug with the latest version given here.
- I made sure that there are no existing issues - open or closed - to which I could contribute my information.
- I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
- I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
- I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- This issue contains only one bug.
- I have read and understood the contribution guidelines.
Affected app version
1.7.0
Affected Android/Custom ROM version
Android 12
Affected device model
OPPO Reno8 and others
How did you install the app?
GitHub releases
Steps to reproduce the bug
- Open Fossify Music Player.
- Set a sleep timer for playback.
- Set the sleep timer again.
- Observe that the countdown stops.
- Cancel the timer.
- Observe that the application exits immediately.
Expected behavior
The sleep timer should continue functioning normally after being reset, and canceling it should not cause the app to exit.
Actual behavior
The timer stops counting, and canceling it causes the application to exit immediately.
Screenshots/Screen recordings
Additional information
The bug can be reproduced and verified using the following Kea2 script logic:
- Set a sleep timer (Timer A);
- Set the sleep timer again (Timer B);
- Use Kea2 property-based assertions to monitor the timer status;
- Cancel the timer while Timer B is active;
- Observe whether the application exits immediately.
Example Kea2 assertion:
- property:
timer_is_active→ true - action:
cancel_timer - expected: Application continues running,
timer_is_activebecomes false - actual: Application crashes (exits)
Reference Code:
import unittest
import uiautomator2 as u2
from time import sleep
from kea2 import precondition, prob, KeaTestRunner, Options
from kea2.u2Driver import U2Driver
class Player_Timer_Test(unittest.TestCase):
def setUp(self):
self.d = u2.connect()
@prob(0.7)
@precondition(
lambda self: self.d.xpath('//*[@content-desc="More options"]').exists
)
def test_setTimer(self):
"""
Test setting the timer in the music player.
"""
print("Setting timer")
self.d.xpath('//*[@content-desc="More options"]').click()
if self.d.xpath('//*[@text="Sleep timer"]').exists:
self.d.xpath('//*[@text="Sleep timer"]').click()
sleep(0.5)
if self.d.xpath('//android.widget.RadioButton[@text="10 minutes"]').exists:
self.d.xpath('//android.widget.RadioButton[@text="10 minutes"]').click()
@prob(0.5)
@precondition(
lambda self: self.d.xpath('//*[@resource-id="org.fossify.musicplayer:id/sleep_timer_stop"]').exists
)
def test_cancelTimer(self):
"""
Test canceling the timer and asserting app stability.
"""
print("Canceling timer")
self.d.xpath('//*[@resource-id="org.fossify.musicplayer:id/sleep_timer_stop"]').click()
sleep(0.5)
assert self.d.app_current()['package'] == "org.fossify.musicplayer", \
f"Expected org.fossify.musicplayer running, but current is {self.d.app_current()['package']}"
def tearDown(self):
print("Test completed")
if __name__ == "__main__":
KeaTestRunner.setOptions(
Options(
driverName="d",
Driver=U2Driver,
packageNames=["org.fossify.musicplayer"],
serial="emulator-5554",
maxStep=20,
profile_period=10,
take_screenshots=True,
agent="u2"
)
)
unittest.main(testRunner=KeaTestRunner)
Metadata
Metadata
Assignees
Labels
bugSomething is not workingSomething is not working