Bug 18387, but for the SCI To recreate: 1 - Have something on the SCO page that won't load 2 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user 3 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl 4 - Sign in 5 - Click 'Finish' 6 - Yes to print a receipt 7 - You are asked to sign in again 8 - Repeat with the SCI module
Created attachment 90528 [details] [review] Bug 23102 - 404 errors on page causes SCI user to be logged out To test: 1 - Have something on the SCO page that won't load 2 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user 3 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl 4 - Sign in 5 - Click 'Finish' 6 - Yes to print a receipt 7 - You are asked to sign in again 8 - Repeat with the SCI module 9 - Apply patch 10 - Repeat, but this time the slip can be printed
(In reply to Nick Clemens from comment #1) > Created attachment 90528 [details] [review] [review] > Bug 23102 - 404 errors on page causes SCI user to be logged out > > To test: > 1 - Have something on the SCO page that won't load Can you be more specific?
(In reply to Jonathan Druart from comment #2) > (In reply to Nick Clemens from comment #1) > > Created attachment 90528 [details] [review] [review] [review] > > Bug 23102 - 404 errors on page causes SCI user to be logged out > > > > To test: > > 1 - Have something on the SCO page that won't load > > Can you be more specific? Add to SCOUserJS: </script> <img src="http://localhost:8080/silk/famfamfam.png"/> <script> You need to ask for something local that will return the Koha 404 page This happens all the time in 18.11, related to new SCSS changes that were not fully backported, we ask for the wrong icons - see bug 23198
It would be great to have a regression selenium test here, do not you think?
Created attachment 97581 [details] [review] Bug 23102: 404 errors on page causes SCI user to be logged out To test: 1 - Have something on the SCO page that won't load 2 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user 3 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl 4 - Sign in 5 - Click 'Finish' 6 - Yes to print a receipt 7 - You are asked to sign in again 8 - Repeat with the SCI module 9 - Apply patch 10 - Repeat, but this time the slip can be printed
(In reply to Jonathan Druart from comment #4) > It would be great to have a regression selenium test here, do not you think? This works for me, but should it be 'Failed QA' because of the missing test?
(In reply to Owen Leonard from comment #6) > (In reply to Jonathan Druart from comment #4) > > It would be great to have a regression selenium test here, do not you think? > > This works for me, but should it be 'Failed QA' because of the missing test? Changing status. Please correct if you want to sign off on this patch and add your signoff line.
Created attachment 98977 [details] [review] Bug 23102: Add fieldset to login for selenium usage
Created attachment 98978 [details] [review] Bug 23102: Selenium test
The behaviour does still recur and can be fixed by this patch, however, I can't make the selenium tests fail
(In reply to Nick Clemens from comment #10) > The behaviour does still recur and can be fixed by this patch, however, I > can't make the selenium tests fail What are you using in the pref? Using what you used in the tests I am not able to recreate the problem.
This is an evil bug.. very easy to hit at upgrades and have absolutely no idea what's triggering the behaviour.
We still face this problem, while it is difficult to recreate in testing, in production this happens and the code is simple and self explanatory
Patch doesn't apply
Created attachment 148423 [details] [review] Bug 23102: 404 errors on page causes SCI user to be logged out To test: 1 - Have something on the SCO page that won't load 2 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user 3 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl 4 - Sign in 5 - Click 'Finish' 6 - Yes to print a receipt 7 - You are asked to sign in again 8 - Repeat with the SCI module 9 - Apply patch 10 - Repeat, but this time the slip can be printed
Created attachment 148424 [details] [review] Bug 23102: Selenium test
Created attachment 148425 [details] [review] Bug 23102: Selenium test
Created attachment 148426 [details] [review] Bug 23102: Selenium test
Rebased, it now works - tests fail with out the patch, they succeed with the patch
Created attachment 148601 [details] [review] Bug 23102: Fix tests # Failed test 'No tests run for subtest "SCI can load error pages"' # at t/db_dependent/selenium/regressions.t line 86. Too many forms are displayed. Cannot submit. at /kohadevbox/koha/t/lib/Selenium.pm line 140.
The tests were failing, I fixed them. But now they are passing with and without the fix. Can you have another look please?
Created attachment 148767 [details] [review] Bug 23102: Selenium test
Created attachment 148768 [details] [review] Bug 23102: 404 errors on page causes SCI user to be logged out To test: 1 - Have something on the SCO page that won't load 2 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user 3 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl 4 - Sign in 5 - Click 'Finish' 6 - Yes to print a receipt 7 - You are asked to sign in again 8 - Repeat with the SCI module 9 - Apply patch 10 - Repeat, but this time the slip can be printed
(In reply to Jonathan Druart from comment #21) > The tests were failing, I fixed them. But now they are passing with and > without the fix. Can you have another look please? Yes, the problem was that the page does load, but you are kicked out after - so we need to load, submit, then see we are logged out
I can't reproduce the problem in ktd. I put this: </script> <img src="http://localhost:8080/silk/famfamfam.png"/> <script> in SCOUserJS, restarted all the things and logged into SCO, then clicked "Finished", "Print receipt and end session" and could print the receipt without getting logged out.
(In reply to Magnus Enger from comment #25) > I can't reproduce the problem in ktd. I put this: > > </script> > <img src="http://localhost:8080/silk/famfamfam.png"/> > <script> > > in SCOUserJS, restarted all the things and logged into SCO, then clicked > "Finished", "Print receipt and end session" and could print the receipt > without getting logged out. Yes, it seems we 'fixed' this problem, but if we fix bug 33881 it will reintroduce this issue
I'm short on time at the moment, but if someone signs this off, and I could look at QAing it perhaps next week...
(In reply to Nick Clemens from comment #26) > Yes, it seems we 'fixed' this problem, but if we fix bug 33881 it will > reintroduce this issue Does the test plan still make sense, or is there something else to look out for?
Created attachment 154691 [details] [review] Bug 23102: Selenium test
Created attachment 154692 [details] [review] Bug 23102: 404 errors on page causes SCI user to be logged out To test: 1 - Have something on the SCO page that won't load 2 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user 3 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl 4 - Sign in using a patron 5 - Enter an unkown barcode, I used "DONTMATTER" 6 - If not logged out, click to 'Return to account summary' 7 - You are asked to sign in again 8 - Repeat with the SCI module 9 - Apply patch 10 - Repeat, but this time you can return to account
(In reply to Magnus Enger from comment #28) > Does the test plan still make sense, or is there something else to look out > for? Updated
I'm getting an error when I try running the selenium test. root@kohadevbox:koha(bug_23102)$ prove t/db_dependent/selenium/regressions.t t/db_dependent/selenium/regressions.t .. # Failed test at t/db_dependent/selenium/regressions.t line 87. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 125. # 'Log in to your account › Koha online catalog' # doesn't match '(?^u:Self check-in)' # Looks like you failed 1 test of 1. t/db_dependent/selenium/regressions.t .. 1/9 # Failed test 'SCI can load error pages' # at t/db_dependent/selenium/regressions.t line 92. t/db_dependent/selenium/regressions.t .. 7/9 Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. t/db_dependent/selenium/regressions.t .. 9/9 # Looks like you failed 1 test of 9. t/db_dependent/selenium/regressions.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/9 subtests Test Summary Report ------------------- t/db_dependent/selenium/regressions.t (Wstat: 256 Tests: 9 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=9, 51 wallclock secs ( 0.03 usr 0.01 sys + 3.94 cusr 0.58 csys = 4.56 CPU) Result: FAIL
Test plan missing some steps like enabling "SelfCheckInModule" and how to "have something on the SCO page that won't load". I used "SelfCheckInMainUserBlock" with <img src="x"> for the self-checkin. I can't get the AutoSelfCheck user to log into the self checkin it seems? Is it supposed to be? But I think the patch is working?
Created attachment 163358 [details] [review] Bug 23102: Selenium test
Created attachment 163359 [details] [review] Bug 23102: 404 errors on page causes SCI user to be logged out To test: 1 - Have something on the SCO page that won't load Add to SCOUserJS: </script> <img src="http://localhost:8080/silk/famfamfam.png"/> <script> 2 - Enable the SCO and SCI system preferences: WebBasedSelfCheck: Enable SelfCheckInModuke: Enable AutoSelfCheckAllowed: Allow AutoSelfCheckID / AutoSelfCheckPass to a valid user with permissions 3 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user 4 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl 5 - Sign in using a patron 6 - Enter an unkown barcode, I used "DONTMATTER" 7 - If not logged out, click to 'Return to account summary' 8 - You are asked to sign in again 9 - Repeat with the SCI module 10 - Apply patch 11 - Repeat, but this time you can return to account
Why are we loosing track of things during years? Should we buy a brain to share?
Created attachment 164591 [details] [review] Bug 23102: 404 errors on page causes SCI user to be logged out To test: 1 - Have something on the SCO page that won't load Add to SCOUserJS: </script> <img src="http://localhost:8080/silk/famfamfam.png"/> <script> 2 - Enable the SCO and SCI system preferences: WebBasedSelfCheck: Enable SelfCheckInModuke: Enable AutoSelfCheckAllowed: Allow AutoSelfCheckID / AutoSelfCheckPass to a valid user with permissions 3 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user 4 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl 5 - Sign in using a patron 6 - Enter an unkown barcode, I used "DONTMATTER" 7 - If not logged out, click to 'Return to account summary' 8 - You are asked to sign in again 9 - Repeat with the SCI module 10 - Apply patch 11 - Repeat, but this time you can return to account Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 164592 [details] [review] Bug 23102: Selenium test
Created attachment 164593 [details] [review] Bug 23102: 404 errors on page causes SCI user to be logged out To test: 1 - Have something on the SCO page that won't load Add to SCOUserJS: </script> <img src="http://localhost:8080/silk/famfamfam.png"/> <script> 2 - Enable the SCO and SCI system preferences: WebBasedSelfCheck: Enable SelfCheckInModuke: Enable AutoSelfCheckAllowed: Allow AutoSelfCheckID / AutoSelfCheckPass to a valid user with permissions 3 - Add the self_checkin_module and self_checkout_module permissions to the AutoSelfCheck user 4 - Access the selfcheckout module https://yoursite.org/cgi-bin/koha/sco/sco-main.pl 5 - Sign in using a patron 6 - Enter an unkown barcode, I used "DONTMATTER" 7 - If not logged out, click to 'Return to account summary' 8 - You are asked to sign in again 9 - Repeat with the SCI module 10 - Apply patch 11 - Repeat, but this time you can return to account Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Clear fix, well tested.. Passing QA
I am sorry, but the unit test is failing for me :( Running tests (1) * Proving /kohadevbox/koha/t/db_dependent/selenium/regressions.t KO! # Failed test at /kohadevbox/koha/t/db_dependent/selenium/regressions.t line 87. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 125. # 'An error has occurred › Koha online catalog' # doesn't match '(?^u:Self check-in)' # Looks like you failed 1 test of 1. # Failed test 'SCI can load error pages' # at /kohadevbox/koha/t/db_dependent/selenium/regressions.t line 92. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. Wide character in print at /usr/share/perl/5.32/Test2/Formatter/TAP.pm line 156. # Looks like you failed 1 test of 9. /kohadevbox/koha/t/db_dependent/selenium/regressions.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/9 subtests Test Summary Report ------------------- /kohadevbox/koha/t/db_dependent/selenium/regressions.t (Wstat: 256 Tests: 9 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=1, Tests=9, 38 wallclock secs ( 0.02 usr 0.01 sys + 2.99 cusr 0.52 csys = 3.54 CPU) Result: FAIL
THis did initially fail - after a rest_all it worked fine
Created attachment 164819 [details] [review] Bug 23102: No mock in selenium
I worked with Katrin on this one and got tests passing, it was pushed to main, updating here
Pushed to 23.11.x for 23.11.06
Backported to 23.05.x for upcoming 23.05.12