Skip to content

Commit bd0d282

Browse files
committed
Merge 'main' into pm-39002-add-geico-login
Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>
2 parents 2030efd + fb1bceb commit bd0d282

1 file changed

Lines changed: 66 additions & 1 deletion

File tree

maps/forms/forms.jsonc

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,72 @@
255255
}
256256
]
257257
},
258+
"trip.com": {
259+
"forms": [
260+
// This site uses the same form for account creation and login, with differing flow options based on pre-qualifying the email.
261+
{
262+
"category": "account-creation",
263+
// Note, the static class value segment matched elsewhere is not present in every state
264+
"container": ["div#ibu_login_online form[class]"],
265+
"fields": {
266+
"newPassword": [
267+
"div#ibu_login_online form[class^='pc-module__form-wrapper__'] input[autocomplete='new-password']"
268+
],
269+
// Note, the form at this stage lacks any static class value
270+
"username": [
271+
"div#ibu_login_online form[class] input[placeholder='Please enter an email address']"
272+
]
273+
},
274+
"actions": {
275+
// "Register and Sign in"
276+
"submit": [
277+
"div#ibu_login_online form[class^='pc-module__form-wrapper__'] button[type='submit']:has(div.tripui-online-btn-content > span.tripui-online-btn-content-children:not(:empty))"
278+
],
279+
// This action is not enclosed by the form container
280+
"previous": ["div#ibu_login_online div#ibu_login_back"],
281+
// This action is not enclosed by the form container
282+
"cancel": ["div#ibu_login_online div#ibu_login_close"],
283+
"reset": [
284+
// Field reset; form class to match against each form state
285+
"div#ibu_login_online form[class] div#ibu_login_input_clear"
286+
]
287+
}
288+
},
289+
{
290+
"category": "account-login",
291+
// Note, the static class value segment matched elsewhere is not present in every state
292+
"container": ["div#ibu_login_online form[class]"],
293+
"fields": {
294+
// signposted as a new password field, but is used for existing password
295+
"password": [
296+
"div#ibu_login_online form[class^='pc-module__form-wrapper__'] input[autocomplete='new-password']"
297+
],
298+
// MFA
299+
"oneTimeCode": [
300+
"div#ibu_login_online form[class] input[autocomplete='one-time-code']"
301+
],
302+
// Note, the form at this stage lacks any static class value
303+
"username": [
304+
"div#ibu_login_online form[class] input[placeholder='Please enter an email address']"
305+
]
306+
},
307+
"actions": {
308+
// "Sign in"
309+
"submit": [
310+
"div#ibu_login_online form[class^='pc-module__form-wrapper__'] button[type='submit']:has(div.tripui-online-btn-content > span.tripui-online-btn-content-children:not(:empty))"
311+
],
312+
// This action is not enclosed by the form container
313+
"previous": ["div#ibu_login_online div#ibu_login_back"],
314+
// This action is not enclosed by the form container
315+
"cancel": ["div#ibu_login_online div#ibu_login_close"],
316+
"reset": [
317+
// Field reset; form class to match against each form state
318+
"div#ibu_login_online form[class] div#ibu_login_input_clear"
319+
]
320+
}
321+
}
322+
]
323+
},
258324
"webtests.dev": {
259325
"pathnames": {
260326
"/forms/login/ambiguous-inputs": {
@@ -327,7 +393,6 @@
327393
"category": "account-login",
328394
"container": ["div#form-container >>> form[action='/login']"],
329395
"fields": {
330-
// FIXME: brittle selectors needed here since `>>>` requires an unambiguous #shadow-root host
331396
"username": [
332397
"div#form-container >>> form[action='/login'] > div:nth-of-type(1) > div >>> input[name='username']"
333398
],

0 commit comments

Comments
 (0)