mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Fix tests for search improvements
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
$('#searchButton').click(function (e) {
|
||||
e.preventDefault();
|
||||
var url = "{% url 'asset_audit' None %}";
|
||||
var id = $("#{{form.query.id_for_label}}").val();
|
||||
var id = $("#{{form.q.id_for_label}}").val();
|
||||
url = url.replace('None', id);
|
||||
$.ajax({
|
||||
url: url,
|
||||
@@ -57,9 +57,9 @@
|
||||
<h3>Audit Asset:</h3>
|
||||
<form id="asset-search-form" class="form-horizontal" method="POST">
|
||||
<div class="input-group input-group-lg" style="width=auto;">
|
||||
{% render_field form.query|add_class:'form-control' placeholder='Enter Asset ID' autofocus="true" %}
|
||||
{% render_field form.q|add_class:'form-control' placeholder='Enter Asset ID' autofocus="true" %}
|
||||
<div class="input-group-append">
|
||||
<label for="query" class="sr-only">Asset ID:</label>
|
||||
<label for="q" class="sr-only">Asset ID:</label>
|
||||
<a id="searchButton" class="btn btn-primary" class="submit" type="submit">Search</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@ class AssetList(BasePage):
|
||||
URL_TEMPLATE = '/assets/asset/list'
|
||||
|
||||
_asset_item_locator = (By.CLASS_NAME, 'assetRow')
|
||||
_search_text_locator = (By.ID, 'id_query')
|
||||
_search_text_locator = (By.ID, 'id_q')
|
||||
_status_select_locator = (By.CSS_SELECTOR, 'div#status-group>div.bootstrap-select')
|
||||
_category_select_locator = (By.CSS_SELECTOR, 'div#category-group>div.bootstrap-select')
|
||||
_go_button_locator = (By.ID, 'id_search')
|
||||
@@ -178,7 +178,7 @@ class SupplierEdit(SupplierForm):
|
||||
class AssetAuditList(AssetList):
|
||||
URL_TEMPLATE = reverse('asset_audit_list')
|
||||
|
||||
_search_text_locator = (By.ID, 'id_query')
|
||||
_search_text_locator = (By.ID, 'id_q')
|
||||
_go_button_locator = (By.ID, 'searchButton')
|
||||
_modal_locator = (By.ID, 'modal')
|
||||
_errors_selector = (By.CLASS_NAME, "alert-danger")
|
||||
|
||||
Reference in New Issue
Block a user