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) {
|
$('#searchButton').click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var url = "{% url 'asset_audit' None %}";
|
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);
|
url = url.replace('None', id);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
@@ -57,9 +57,9 @@
|
|||||||
<h3>Audit Asset:</h3>
|
<h3>Audit Asset:</h3>
|
||||||
<form id="asset-search-form" class="form-horizontal" method="POST">
|
<form id="asset-search-form" class="form-horizontal" method="POST">
|
||||||
<div class="input-group input-group-lg" style="width=auto;">
|
<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">
|
<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>
|
<a id="searchButton" class="btn btn-primary" class="submit" type="submit">Search</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class AssetList(BasePage):
|
|||||||
URL_TEMPLATE = '/assets/asset/list'
|
URL_TEMPLATE = '/assets/asset/list'
|
||||||
|
|
||||||
_asset_item_locator = (By.CLASS_NAME, 'assetRow')
|
_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')
|
_status_select_locator = (By.CSS_SELECTOR, 'div#status-group>div.bootstrap-select')
|
||||||
_category_select_locator = (By.CSS_SELECTOR, 'div#category-group>div.bootstrap-select')
|
_category_select_locator = (By.CSS_SELECTOR, 'div#category-group>div.bootstrap-select')
|
||||||
_go_button_locator = (By.ID, 'id_search')
|
_go_button_locator = (By.ID, 'id_search')
|
||||||
@@ -178,7 +178,7 @@ class SupplierEdit(SupplierForm):
|
|||||||
class AssetAuditList(AssetList):
|
class AssetAuditList(AssetList):
|
||||||
URL_TEMPLATE = reverse('asset_audit_list')
|
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')
|
_go_button_locator = (By.ID, 'searchButton')
|
||||||
_modal_locator = (By.ID, 'modal')
|
_modal_locator = (By.ID, 'modal')
|
||||||
_errors_selector = (By.CLASS_NAME, "alert-danger")
|
_errors_selector = (By.CLASS_NAME, "alert-danger")
|
||||||
|
|||||||
Reference in New Issue
Block a user