[FOLIO-748] The checkout.js test in ui-testing is fails in a mysterious way. Created: 28/Jul/17  Updated: 12/Nov/18  Resolved: 31/Jul/17

Status: Closed
Project: FOLIO
Components: Continuous Integration
Affects versions: None
Fix versions: None

Type: Bug Priority: P2
Reporter: charles Assignee: charles
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 7 hours
Original estimate: Not Specified

Sprint:

 Description   

Jason pointed out that yarn test-checkout was failing. This is disturbing because it ui-testing was very successful the day before.

All I can say is that the screen freezes after searching for the user to whom an item was just checked out to. This usually means that there was an alert, confirm or prompt event, since nightmare and electron do not display these. I have alert capturing turned on in the script, but nothing is returned in the results.

Furthermore, I cannot replicate this issue in real life. I can checkout and item to a user and then go to their record and view loan history without mishap.

I wonder if electron is freezing for some reason? I give up for today, and maybe everything will look better on Monday.

This test is running against http://folio-testing.aws.indexdata.com/.



 Comments   
Comment by charles [ 28/Jul/17 ]

Using the App FOLIO UI App /scan ("test-checkout")
Login > Update settings > Create user > Checkout item > Confirm checkout > Checkin > Confirm checkin > Logout

nightmare:actions .type() diku_admin into input[name=username] +0ms
nightmare:actions .type() admin into input[name=password] +601ms
nightmare:actions .click() on button[type=submit] +275ms
nightmare:actions .wait() for #clickable-logout element +12ms
✓ should login as diku_admin/admin (4530ms)
nightmare:actions .wait() for a[href="/settings"] element +302ms
nightmare:actions .click() on a[href="/settings"] +289ms
nightmare:actions .wait() for a[href="/settings/scan"] element +96ms
nightmare:actions .click() on a[href="/settings/scan"] +30ms
nightmare:actions .wait() for a[href="/settings/scan/checkout"] element +142ms
nightmare:actions .click() on a[href="/settings/scan/checkout"] +95ms
nightmare:actions .wait() for #patronScanId element +191ms
nightmare:actions .wait() for 222ms +30ms
nightmare:actions .select() #patronScanId +225ms
✓ should set patron scan ID to "User" (1126ms)
nightmare:actions .click() on a[title="Users"] +29ms
nightmare:actions .wait() for #list-users a:nth-of-type(11) > div:nth-of-type(5) element +150ms
nightmare:actions .evaluate() fn on the page +532ms
Found pasquale
✓ should find an active user (711ms)
nightmare:actions .click() on a[title=Items] +30ms
nightmare:actions .wait() for 2222ms +318ms
nightmare:actions .evaluate() fn on the page +2s
Found 5860825104574
✓ should find an item to checkout (2546ms)
nightmare:actions .wait() for a[title=Scan] element +4ms
nightmare:actions .click() on a[title=Scan] +3ms
nightmare:actions .wait() for #patron_identifier element +108ms
nightmare:actions .type() pasquale into #patron_identifier +21ms
nightmare:actions .xclick() on //button[contains(.,"Find Patron")] +486ms
nightmare:actions .wait() for div[title="pasquale"] element +27ms
nightmare:actions .type() 5860825104574 into #barcode +267ms
nightmare:actions .xclick() on //button[contains(.,"Add item")] +698ms
nightmare:actions .wait() for div[title="5860825104574"] element +17ms
nightmare:actions .wait() for 2222ms +773ms
nightmare:actions .xclick() on //button[contains(.,"Done")] +2s
nightmare:actions .wait() for 4000ms +15ms
✓ should check out item to user (8640ms)
nightmare:actions .click() on a[title=Users] +4s
nightmare:actions .wait() for .headerSearchInput---1z5qG element +101ms
nightmare:actions .type() pasquale into .headerSearchInput---1z5qG +103ms
nightmare:actions .wait() for #list-users div[title="pasquale"] element +451ms
nightmare:actions .click() on #list-users div[title="pasquale"] +5ms
nightmare:actions .wait() for 2222ms +102ms
nightmare:actions .click() on #clickable-viewcurrentloans +2s
1) should find item in user history
nightmare:actions .click() on a[title=Scan] +17s
2) should check in item
nightmare:actions .click() on a[title=Users] +20s
3) should confirm that item has status of Closed in user history
nightmare:actions .click() on #clickable-logout +20s
4) should logout

Comment by charles [ 31/Jul/17 ]

I just needed to add a bunch of wait actions to the part that confirms that an item has been charged to the appropriate patron,

Generated at Thu Feb 08 23:08:03 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.