Ability to log in with HarvardKey from discovery page.#16
Conversation
| Kaixa.click('.btn-primary'); | ||
| boolean isHarvardKey = obj.has('isHarvardKey') && obj.getBoolean('isHarvardKey'); | ||
| boolean needs2FA = isHarvardKey && obj.has('needs2FA') && obj.getBoolean('needs2FA'); | ||
|
|
There was a problem hiding this comment.
In GlobalCredentials, the user will be something like:
public static String admin ='''
{
'username': 'my_name@harvard.edu',
'password': '',
'isHarvardKey': true,
'needs2FA': true,
}
I'm not attached to specific names so please suggest better ones.
There was a problem hiding this comment.
Love this. The only thing I'm thinking is that the name isHarvardKey is confusing to me because isn't Harvard Guest part of HarvardKey? Maybe clearer would be to flip this and just call it isHarvardGuest? Or something like isOfficialHarvardKey or something
There was a problem hiding this comment.
Flipping it to isHarvardGuest is good with me.
There was a problem hiding this comment.
So now:
public static String admin ='''
{
'username': 'guest_name@outlook.com',
'password': 'blah',
'isHarvardGuest': true,
}
a2105b6 to
040c686
Compare
040c686 to
880ae59
Compare
| * page for the user to choose between HarvardKey and Harvard Guest credentials | ||
| */ | ||
| public static void handleHarvardKey(name) { | ||
| public static void handleHarvardKey(String name, boolean expectDiscoveryPage = true) { |
There was a problem hiding this comment.
Why not detect whether there is a discovery page?
There was a problem hiding this comment.
Yeah... When I implemented this, I was thinking that it's part of the test: if the application is expecting the discovery page and there isn't one, the test would fail. But: we are not testing the Harvard login, right? So I guess it's fine. It certainly will make things simpler.
| Kaixa.waitForAtLeastOneElementPresent([ | ||
| '#idp_1001962798_button', // HarvardGuest | ||
| '#idp_1824601020_button', // HarvardKey | ||
| ]); |
There was a problem hiding this comment.
This would be the feature you could use to check if there's a discovery page. This function returns which one appeared. You could wait for either the discovery page or the login page and handle it appropriately
gabeabrams
left a comment
There was a problem hiding this comment.
Looks pretty good! Just a couple thoughts, but nothing blocking
No description provided.