Feature #3751
closed
Add id='new' to all buttons/links that create new objects
Added by Og Maciel over 10 years ago.
Updated almost 6 years ago.
Description
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.
Should have also added "Delete/Edit/Cancel/Yes/No" to that list
- Status changed from New to Feedback
rails generate that ID by default to all forms, for example, a new domain would have id=new_domain, editing a domain would have id=edit_domain_<numberical_id>
- Status changed from Feedback to New
oh, i didnt read it right, you were not only talking about the form, reopening.
- Category set to Web Interface
- Target version set to 1.9.3
- Status changed from New to Assigned
- Assignee set to Lukas Zapletal
- Target version changed from 1.9.3 to 1.9.2
- Status changed from Assigned to New
- Assignee deleted (
Lukas Zapletal)
- Status changed from New to Ready For Testing
- Assignee set to Lukas Zapletal
- Difficulty set to trivial
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?
ok, so I missed one part of the patch. Once that was fixed I did get a ID for the submit buttons but after talking to Lukaz, he will also try to add IDs to more types of buttons (e.g. Cancel, Yes, No, etc)
- Target version changed from 1.9.2 to 1.9.1
- translation missing: en.field_release set to 4
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Related to Bug #4441: Overriden 'link_to' is protected and breaks expected use pattern added
- Related to Bug #11828: Undefined method 'split' for nil:NilClass traceback when accessing /about added
Also available in: Atom
PDF