bookreader
bookreader copied to clipboard
End 2 End Test: Read an archive.org book embedded on a site
Task: Try to make the base tests pass on a book that is displayed in an iframe.
I would like to work on this issue. I am a newbie to Open Source world
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!
Yes sure
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 ?
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
Okay, I will do
I have created js file for demo-embed.html but how to test the js file
from NPM server?
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
)
To only run your test add .only
to your test or fixture
It is throwing error " 'testcafe': no such file or directory "
@MayankVir you need to install testcafe
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 Could you give us the full error that you get? Seems more like a configuration problem to me
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
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?
@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 let's see that PR!
HeY! is it still open ! i would like to work on it mam
I have made the pull request kindly review it ma'am
@iisa @Pyrojet99 Kindly guide me what should I do further
@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 If the testcases are redundant if would simply fail the tests
@mahakporwal02 It actually does fail for me if I add runBaseTests, runDesktopSearchTests
and runMobileSearchTests
for demo-embed.html
Hey, I would like to work on this issue if its still open.
Mam, May I work on this issue?
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.
@iisa @Pyrojet99 I would like to work on the issue. Can you please assign it to me?
I want to work on this issue , Can you please assign it to me? @iisa