Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Last ayah audio double playing #276

Closed
mmahalwy opened this issue Apr 9, 2016 · 18 comments
Closed

Last ayah audio double playing #276

mmahalwy opened this issue Apr 9, 2016 · 18 comments
Assignees
Labels

Comments

@mmahalwy
Copy link
Contributor

mmahalwy commented Apr 9, 2016

No description provided.

@mmahalwy mmahalwy self-assigned this Apr 9, 2016
@mmahalwy mmahalwy added the bug label Apr 9, 2016
@dashohoxha
Copy link

If pause button is pressed while the last ayah is playing, one of the playings is stoped, but the other continues. So, maybe it is triggered automatically, outside the control of the audio player buttons.

@mmahalwy
Copy link
Contributor Author

yeah i noticed that too

@azizur
Copy link
Contributor

azizur commented Apr 15, 2016

I have just spotted this as well just right now.

@mmahalwy
Copy link
Contributor Author

anyone want to write a failing test PR?

@dashohoxha
Copy link

How do you write a failing test?

@azizur
Copy link
Contributor

azizur commented Apr 27, 2016

@mmahalwy I will give it a go.

@mmahalwy
Copy link
Contributor Author

mmahalwy commented Apr 28, 2016

@dashohoxha @azizur a PR that will show the tests failing would suffice that way I can write the code to get it to pass. For example, the test would test that 'Loading...' is not present at the end of the surah, which would fail :)

@dashohoxha
Copy link

@mmahalwy I don't know how to write such tests, that's why I asked. I have to study first any tutorials on React etc. Do you have any suggestions on where should I start?

But then, a failing test is not a requirement for fixing a bug. I understand that the TDD is the latest silverbullet in software engeenering, but I haven't used it yet, and I can still manage my programs and fix bugs and in general they have no bugs.
Besides, writing a test for a bug may be much more difficult than fixing the bug itself, and I seriously doubt that you can write a failing test for each possible bug. I think that TDD makes more sense for features than for bugs. Just my opinion.

@dashohoxha
Copy link

Can it be that the problem is with the data returned from API (for example last ayah is returned twice)?
By the way, testing an API seems much more easier to me than testing a UI.

@mmahalwy
Copy link
Contributor Author

okay no problem. I will get to it soon inshallah.

I can write a test as an example - I should probably commit to writing tests for Surah anyways

@azizur
Copy link
Contributor

azizur commented May 2, 2016

I have been trying to write some unit tests to get things started. I have few query as to how things are setup on this project.

The Readme file says npm run test:watch to run the tests, but when I run that I am seeing npm ERR! missing script: test:watch because there is no script setup for this.

There are no unit tests currently in the project.

@mmahalwy
Copy link
Contributor Author

mmahalwy commented May 2, 2016

@AhmedShab
Copy link
Contributor

Salam @mmahalwy, I would be keen to work on that bug. I was looking into Quran site then found yours on the top of the search. Was curious about the development and that's how I found this project.

I have a computer science background and recently/currently I'm gaining experience in the web development (full stack). I don't know much about React but I used AngularJS so It will be easy to learn it :)

I wanna contribute to something valuable like this project, would you please tell me how I can get started on? Thanks

@mmahalwy
Copy link
Contributor Author

@AhmedShab thanks for binging and we could definitely use your help!

I'd suggest taking a look at the README which will describe how to set up this repo. Since Ramadan is on the horizon, we are trying to scope and focus our time on these tasks: #312

I will include this bug as part of it too. Feel free to comment on any issue, we do a good job of keeping up with them, or open a new one if you'd like.

@AhmedShab
Copy link
Contributor

@mmahalwy No problem 👍 and thanks for your quick respond.

I will fork the repo and get started with the README file (so excited 😄 ). Will check these takes and work on them as they are the priority at this time.

I have other commitments (like I'm working/ studying at devacademy) but will spend my free time on it.

@AhmedShab AhmedShab mentioned this issue May 25, 2016
18 tasks
@azizur
Copy link
Contributor

azizur commented May 26, 2016

I have been looking at this, I will have a work in progress PR shortly.

Just checked on LIVE I am getting:
undefined:1 Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

Not sure if I should raise another issue for this or not.

@mmahalwy
Copy link
Contributor Author

@azizur the audioplayer does throw that error but I don't think it's the cause of the double play.

@mmahalwy
Copy link
Contributor Author

Fixed by #335

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants