Add id='new' to all buttons/links that create new objects
|Triaged:||Fixed in Releases:|
|Bugzilla link:||Found in Releases:|
QE would like to request that every button/link responsible for creating new objects (i.e. Environments, Users, Roles, OS, etc) have a id='new' attribute for easier locating UI elements during automation.
#10 Updated by Og Maciel over 4 years ago
Lukas, I applied this patch and restarted foreman. Then I tried to create a new operating system via the web ui. The New Operating system button had the following markup:
<div class="btn-toolbar pull-right"> <a class="btn btn-success" href="/operatingsystems/new"></a> </div>
I clicked it and then looked at the source for the Cancel and Submit buttons:
<form id="new_operatingsystem" class="form-horizontal well" method="post" action="/operatingsystems" accept-charset="UTF-8"> <div class="fr close-button"></div> <div style="margin:0;padding:0;display:inline"></div> <ul class="nav nav-tabs" data-tabs="tabs"></ul> <div class="tab-content"></div> <div class="form-actions"> <a class="btn btn-default two-pane-close" href="/operatingsystems"></a> <input class="btn btn-primary" type="submit" value="Submit" name="commit"></input> </div> </form>
I expected to see unique IDs for the buttons but that doesn't seem to be working for this page. To be clear then, I see that the form has a unique ID but not the buttons. Is this the intention with the patch?