While writing the UI test in module 1 of the intermediate course, ātestStandardUserCanLoginā I noticed that the test fails, however the failure is actually correctly capturing the mismatch between the assertion and the code as the standard user is not able to access the Projects page. While the test is intended to login through front end as a regular, non-admin user, it appears as this is intentionally not possible as the code in the ācheckSessionā method of the AuthDB class only returns an expiry date if the user is listed as an admin. Otherwise, the verification fails and they are not able to log in.
I understand that in the course activity that follows we are supposed to investigate the tests we have written and the ways the might fail, but Iām confused if the above is actually intentional, as the module does not explain what the outcome of our investigation should be and how we should approach this finding. In real life scenario, I guess this would occur from misunderstanding the requirements or an issues with the code so either the test would not be valid or the code should be amended. I could rewrite the test to use admin user instead or change the verification code but in the absence of more detailed debugging section (such as the one in the foundation course) Iām not sure if this is expected or if I made a mistake at some point.
Could someone please confirm if this is an issue with the course material or an intentional āissueā we were meant to catch and investigate during the course? Or perhaps I missed something at earlier or later point in the course and what I observed during the testing is a result of mistake on my side?