Project

General

Profile

Actions

Feature #3751

closed

Add id='new' to all buttons/links that create new objects

Added by Og Maciel about 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Web Interface
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

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.


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #4441: Overriden 'link_to' is protected and breaks expected use patternClosedEric Helms02/25/2014Actions
Related to Foreman - Bug #11828: Undefined method 'split' for nil:NilClass traceback when accessing /aboutClosedShlomi Zadok09/15/2015Actions
Actions #1

Updated by Og Maciel about 10 years ago

Should have also added "Delete/Edit/Cancel/Yes/No" to that list

Actions #2

Updated by Ohad Levy about 10 years ago

  • 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>

Actions #3

Updated by Ohad Levy about 10 years ago

  • Status changed from Feedback to New

oh, i didnt read it right, you were not only talking about the form, reopening.

Actions #4

Updated by Dominic Cleal about 10 years ago

  • Category set to Web Interface
Actions #5

Updated by Dominic Cleal about 10 years ago

  • Target version set to 1.9.3
Actions #6

Updated by Lukas Zapletal about 10 years ago

  • Status changed from New to Assigned
  • Assignee set to Lukas Zapletal

Taking.

Actions #7

Updated by Anonymous about 10 years ago

  • Target version changed from 1.9.3 to 1.9.2
Actions #8

Updated by Dominic Cleal about 10 years ago

  • Status changed from Assigned to New
  • Assignee deleted (Lukas Zapletal)
Actions #9

Updated by Lukas Zapletal about 10 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Lukas Zapletal
  • Difficulty set to trivial

https://github.com/theforeman/foreman/pull/1146

Og please test this patch if it works for you. Should cover most cases.

Actions #10

Updated by Og Maciel about 10 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?

Actions #11

Updated by Og Maciel about 10 years ago

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)

Actions #12

Updated by Anonymous about 10 years ago

  • Target version changed from 1.9.2 to 1.9.1
Actions #13

Updated by Dominic Cleal almost 10 years ago

  • translation missing: en.field_release set to 4
Actions #14

Updated by Lukas Zapletal almost 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #15

Updated by Dominic Cleal almost 10 years ago

  • Related to Bug #4441: Overriden 'link_to' is protected and breaks expected use pattern added
Actions #16

Updated by Dominic Cleal over 8 years ago

  • Related to Bug #11828: Undefined method 'split' for nil:NilClass traceback when accessing /about added
Actions

Also available in: Atom PDF