Imagine the scenario, you see a repo with the following acceptance criteria in the user story.md
Product Owner has written “Show some loading text when waiting loading the next page of data”
Their observation when you chat to them is "When changing page, it is difficult to know if the new data has loaded yet as the old data stays on the table. Instead you should see the text: “Loading…”
No other context given. You the find out the api belongs to the The Food Standards Agency customer website - and you have a web layer to see rates of restaurants and other food outlets (collectively known as “establishments”) in the UK with a hygiene rating.
Current Acceptance Criteria:
- Given I have not yet loaded any Establishments
- When I navigate to the homepage
- Then I should see the text “Loading…” below the table headings
Now as an experienced full stack QE with eComm and User experience - would you suggest this below or something else
Proposed:
Given I have not yet loaded any Establishments
And the API is slow to return
And i’ve navigated to the home page
And I’ve seen the Loading text
When the API eventually returns
Then the loading text should disappear
And the data should be shown in the table
- let me know your thoughts!
1 Like
The original is closest to what I would write, but I’d pull any implementation details from it. It sounds like the main point is getting feedback when viewing establishments before they have loaded. So the acceptance criteria is “a viewer knows something is happening”:
Given I am viewing Establishments
(It shouldn’t matter where you are viewing them, be it a homepage, some other dashboard, the list of establishments alone)
When establishments have not yet loaded
(No need to know why they haven’t loaded)
Then I get feedback that they are still loading
(How that feedback is designed is an implementation detail. You probably will just use some text, but that is not the only way to do so)
4 Likes
I believe showing “Loading” text is fine, as even if the website is slow, at least the user will see something is happening on the website.
If it is blank user may be confused about whether data will load or not.
Apart from as a part of standard practice, you can also add a timeout so that a timeout error message appears after 30 or 60 seconds, so that users don’t have to wait for so long.
This discussion illustrates what I hate about the way most requirements are specified these days. There is so much ambiguity that the developers can build almost anything and it will meet the documented requirements.
From an accessibility perspective, both the start and completion of loading should trigger an ARIA live region to announce something like “Loading, please wait” and “Loading complete”. If loading is not complete within say 5 seconds, another “Please wait” live region should be triggered. I don’t know if any particular level of accessibility was specified for this project, but I regard accessibility as being part of the developer’s job so it should not need to be specified.
As others have mentioned, there are potentially a number of error conditions that need to be tested, such as failure to load data, receipt of invalid data and maybe even receipt of excessively long data.
1 Like