bookreader icon indicating copy to clipboard operation
bookreader copied to clipboard

End 2 End Test: Read an archive.org book embedded on a site

Open iisa opened this issue 4 years ago • 29 comments

Task: Try to make the base tests pass on a book that is displayed in an iframe.

iisa avatar Mar 30 '20 04:03 iisa

I would like to work on this issue. I am a newbie to Open Source world

MayankVir avatar Jun 22 '20 14:06 MayankVir

Hi @MayankVir! If you are interested in helping us with E2E testing this would be a good first issue to start with. Let me know if you need any support!

giacomo-cgn avatar Jun 25 '20 14:06 giacomo-cgn

Yes sure

MayankVir avatar Jun 26 '20 08:06 MayankVir

Actually I dont know properly what to do in this issue. It was tagged easy so I commented. Do I only have to read any book ?

MayankVir avatar Jun 26 '20 08:06 MayankVir

Basically BookReader uses automated End-to-End tests with Testcafe. Inside \bookreader\tests\e2e\helpers\base.js there is a bunch of base tests that are currently tested only with Internet Archive books in \bookreader\tests\e2e\base.test.js. We would like to try the same tests also on \bookreader\BookReaderDemo\demo-embed.html. To do this, you should probably create a js file similar to base.test.js that uses demo-embed.html instead of the current html file

giacomo-cgn avatar Jun 26 '20 08:06 giacomo-cgn

Okay, I will do

MayankVir avatar Jun 26 '20 08:06 MayankVir

I have created js file for demo-embed.html but how to test the js file

MayankVir avatar Jun 26 '20 09:06 MayankVir

from NPM server?

MayankVir avatar Jun 26 '20 10:06 MayankVir

Great! To run all the e2e tests you have to use the command npm run test:e2e:dev (make sure your js file is in the right directory and has .test.js in the name such as foo.test.js)

giacomo-cgn avatar Jun 26 '20 11:06 giacomo-cgn

To only run your test add .only to your test or fixture

giacomo-cgn avatar Jun 26 '20 11:06 giacomo-cgn

It is throwing error " 'testcafe': no such file or directory "

MayankVir avatar Jun 26 '20 14:06 MayankVir

@MayankVir you need to install testcafe

imskr avatar Jun 26 '20 17:06 imskr

I tried installing testcafe but that also throws error " Cannot read property 'resolve' of undefined ". I searched on stackoverflow it says reinstalling node v10.16 but this didn't work out for me. I am stuck with the error

MayankVir avatar Jun 27 '20 15:06 MayankVir

@MayankVir Could you give us the full error that you get? Seems more like a configuration problem to me

giacomo-cgn avatar Jun 29 '20 21:06 giacomo-cgn

Yes. below the full error :

virma ~ $ npm install -g testcafe npm ERR! Cannot read property 'resolve' of undefined

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\virma\AppData\Roaming\npm-cache_logs\2020-06-30T05_54_11_454Z-debug.log

MayankVir avatar Jun 30 '20 05:06 MayankVir

Seems it could be a nodejs related problem, reinstalling node could solve it. However, installing testcafe shouldn't be needed to run the tests. Since testcafe tests are relatively new on BookReader, could you make sure you have the latest BookReader repo on your machine?

giacomo-cgn avatar Jul 02 '20 13:07 giacomo-cgn

@Pyrojet99 Hey is this issue still open? I want to work on this As said earlier I have created demo-embed.html and some tests are running successfully....pls guide what should I do further

mahakporwal02 avatar Sep 17 '20 15:09 mahakporwal02

@mahakporwal02 let's see that PR!

iisa avatar Sep 17 '20 15:09 iisa

HeY! is it still open ! i would like to work on it mam

nikhilgupta2001 avatar Sep 18 '20 18:09 nikhilgupta2001

I have made the pull request kindly review it ma'am

mahakporwal02 avatar Sep 19 '20 12:09 mahakporwal02

@iisa @Pyrojet99 Kindly guide me what should I do further

mahakporwal02 avatar Sep 22 '20 10:09 mahakporwal02

@iisa @Pyrojet99 @mahakporwal02 First time contributing to this project as well. As I understand from the base.test.js and \bookreader\tests\e2e\helpers\base.js, the some of the base tests like Checking full screen button or Clicking zoom out testcases are redundant in the case of \bookreader\BookReaderDemo\demo-embed.html. So I think we need to find some new necessary test checks for demo-embed.html case only instead of using the same base tests. (Perhaps if the content is embed in iframe)

Apologies if I made any mistakes. Would appreciate any directions/suggestions.

ron-debajyoti avatar Sep 26 '20 18:09 ron-debajyoti

@ron-debajyoti If the testcases are redundant if would simply fail the tests

mahakporwal02 avatar Sep 28 '20 13:09 mahakporwal02

@mahakporwal02 It actually does fail for me if I add runBaseTests, runDesktopSearchTests and runMobileSearchTests for demo-embed.html

ron-debajyoti avatar Sep 28 '20 13:09 ron-debajyoti

Hey, I would like to work on this issue if its still open.

shreyan-invalid avatar Feb 02 '21 19:02 shreyan-invalid

Mam, May I work on this issue?

vishwjeet-singh avatar Mar 03 '21 10:03 vishwjeet-singh

Hi there, I want to work on this issue. As i'm new here can you @Pyrojet99 tell me about E2E testing and more about this issue.

Ankit27Agg avatar Mar 14 '21 11:03 Ankit27Agg

@iisa @Pyrojet99 I would like to work on the issue. Can you please assign it to me?

KaramveerSidhu avatar Mar 27 '21 17:03 KaramveerSidhu

I want to work on this issue , Can you please assign it to me? @iisa

HarshitaShrivas66 avatar Jan 20 '23 18:01 HarshitaShrivas66