[core] prtester fix for optgroups (#2896)

This commit is contained in:
Bocki 2022-07-06 11:26:53 +02:00 committed by GitHub
parent 6c52e9bbc6
commit e3dad86bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

7
.github/prtester.py vendored
View File

@ -54,12 +54,15 @@ def testBridges(bridges,status):
listname = listing.get('name')
if 'optgroup' in listing.contents[0].name:
listing = list(itertools.chain.from_iterable(listing))
firstselectionentry = 1
for selectionentry in listing:
if firstselectionentry:
selectionvalue = selectionentry.get('value')
firstselectionentry = 0
else:
if 'selected' in selectionentry.attrs:
selectionvalue = selectionentry.get('value')
break
if selectionvalue == '':
selectionvalue = listing.contents[0].get('value')
formstring = formstring + '&' + listname + '=' + selectionvalue
if not errormessages:
# if all example/default values are present, form the full request string, run the request, replace the static css