UPD: dav_events: added ids to some buttons to find them for selenium

tests.
This commit is contained in:
2019-03-21 17:58:32 +01:00
parent b45aa9688d
commit ff32ffbc1e
6 changed files with 16 additions and 17 deletions

View File

@@ -28,20 +28,20 @@
{% endblock form-fields-visible %} {% endblock form-fields-visible %}
{% block form-buttons %} {% block form-buttons %}
{% buttons %} {% buttons %}
<button type="submit" name="submit" class="btn btn-success"> <button id="btn-form-submit" type="submit" name="submit" class="btn btn-success">
{% bootstrap_icon 'ok' %}&thinsp; {% bootstrap_icon 'ok' %}&thinsp;
{% trans 'Einsenden' %} {% trans 'Einsenden' %}
</button> </button>
<a class="btn btn-warning" href="?back"> <a id="btn-form-back" class="btn btn-warning" href="?back">
{% bootstrap_icon 'repeat' %}&thinsp; {% bootstrap_icon 'repeat' %}&thinsp;
{% trans 'Zurück' %} {% trans 'Zurück' %}
</a> </a>
<a class="btn btn-danger" href="?abort"> <a id="btn-form-cancel" class="btn btn-danger" href="?abort">
{% bootstrap_icon 'remove' %}&thinsp; {% bootstrap_icon 'remove' %}&thinsp;
{% trans 'Abbrechen' %} {% trans 'Abbrechen' %}
</a> </a>
<!-- <!--
<button type="submit" name="save" class="btn btn-info"> <button id="btn-form-save" type="submit" name="save" class="btn btn-info">
{% bootstrap_icon 'hdd' %}&thinsp; {% bootstrap_icon 'hdd' %}&thinsp;
{% trans 'Als Entwurf speichern' %} {% trans 'Als Entwurf speichern' %}
</button> </button>

View File

@@ -37,8 +37,7 @@
} }
} }
} }
//e = $("#button_add_topic"); e = document.getElementById("btn-topic-add");
e = document.getElementById("button_add_topic");
if(e != null) { if(e != null) {
if(show_topics < max_topics) if(show_topics < max_topics)
e.disabled = false; e.disabled = false;
@@ -46,7 +45,7 @@
e.disabled = true; e.disabled = true;
} }
e = document.getElementById("button_add_goal"); e = document.getElementById("btn-goal-add");
if(e != null) { if(e != null) {
if(show_goals < max_goals) if(show_goals < max_goals)
e.disabled = false; e.disabled = false;
@@ -98,7 +97,7 @@
<div id="block_topic_6"> <div id="block_topic_6">
{% bootstrap_field form.course_topic_6 show_label=False %} {% bootstrap_field form.course_topic_6 show_label=False %}
</div> </div>
<button type="button" id="button_add_topic" class="btn btn-info" onclick="addTopic()"> <button type="button" id="btn-topic-add" class="btn btn-info" onclick="addTopic()">
{% bootstrap_icon 'plus' %}&thinsp; {% bootstrap_icon 'plus' %}&thinsp;
{% trans 'Weiteren Absatz hinzufügen' %} {% trans 'Weiteren Absatz hinzufügen' %}
</button> </button>
@@ -129,7 +128,7 @@
<div id="block_goal_6"> <div id="block_goal_6">
{% bootstrap_field form.course_goal_6 show_label=False %} {% bootstrap_field form.course_goal_6 show_label=False %}
</div> </div>
<button type="button" id="button_add_goal" class="btn btn-info" onclick="addGoal()"> <button type="button" id="btn-goal-add" class="btn btn-info" onclick="addGoal()">
{% bootstrap_icon 'plus' %}&thinsp; {% bootstrap_icon 'plus' %}&thinsp;
{% trans 'Weiteren Absatz hinzufügen' %} {% trans 'Weiteren Absatz hinzufügen' %}
</button> </button>

View File

@@ -27,15 +27,15 @@
{% endblock form-fields %} {% endblock form-fields %}
{% block form-buttons %} {% block form-buttons %}
{% buttons %} {% buttons %}
<button type="submit" class="btn btn-success"> <button id="btn-form-next" type="submit" class="btn btn-success">
{% bootstrap_icon 'ok' %}&thinsp; {% bootstrap_icon 'ok' %}&thinsp;
{% trans 'Weiter' %} {% trans 'Weiter' %}
</button> </button>
<a class="btn btn-warning" href="?back"> <a id="btn-form-back" class="btn btn-warning" href="?back">
{% bootstrap_icon 'repeat' %}&thinsp; {% bootstrap_icon 'repeat' %}&thinsp;
{% trans 'Zurück' %} {% trans 'Zurück' %}
</a> </a>
<a class="btn btn-danger" href="?abort"> <a id="btn-form-cancel" class="btn btn-danger" href="?abort">
{% bootstrap_icon 'remove' %}&thinsp; {% bootstrap_icon 'remove' %}&thinsp;
{% trans 'Abbrechen' %} {% trans 'Abbrechen' %}
</a> </a>

View File

@@ -121,7 +121,7 @@
</a> </a>
{% endif %} {% endif %}
{% if has_permission_accept %} {% if has_permission_accept %}
<a class="btn {% if is_submitted and not is_accepted %}btn-success{% else %}btn-default disabled{% endif %}" <a id="btn-accept" class="btn {% if is_submitted and not is_accepted %}btn-success{% else %}btn-default disabled{% endif %}"
data-toggle="modal" data-target="#modal-accept-dialog"> data-toggle="modal" data-target="#modal-accept-dialog">
{% if is_accepted %} {% if is_accepted %}
{% bootstrap_icon 'check' %}&thinsp; {% bootstrap_icon 'check' %}&thinsp;
@@ -132,7 +132,7 @@
</a> </a>
{% endif %} {% endif %}
{% if has_permission_publish %} {% if has_permission_publish %}
<a class="btn {% if is_accepted and not is_publishing and not is_published %}btn-success{% else %}btn-default disabled{% endif %}" <a id="btn-confirmpublication" class="btn {% if is_accepted and not is_publishing and not is_published %}btn-success{% else %}btn-default disabled{% endif %}"
data-toggle="modal" data-target="#modal-confirmpublication-dialog"> data-toggle="modal" data-target="#modal-confirmpublication-dialog">
{% if is_publishing_any %} {% if is_publishing_any %}
{% bootstrap_icon 'check' %}&thinsp; {% bootstrap_icon 'check' %}&thinsp;

View File

@@ -6,7 +6,7 @@
{% block page-container-fluid %} {% block page-container-fluid %}
<div class="action-tabs"> <div class="action-tabs">
<div class="pull-right"> <div class="pull-right">
<a class="btn btn-primary" <a id="btn-event-create" class="btn btn-primary"
href="{% url 'dav_events:create' %}"> href="{% url 'dav_events:create' %}">
{% bootstrap_icon 'plus' %} {% bootstrap_icon 'plus' %}
{% trans 'Neue Veranstaltung anlegen' %} {% trans 'Neue Veranstaltung anlegen' %}

View File

@@ -18,7 +18,7 @@
Du wirst dann per E-Mail auf dem laufenden gehalten. Du wirst dann per E-Mail auf dem laufenden gehalten.
</p> </p>
<p> <p>
<a class="btn btn-primary" href="{% url 'dav_events:create' %}">Los geht's!</a> <a id="btn-event-create" class="btn btn-primary" href="{% url 'dav_events:create' %}">Los geht's!</a>
</p> </p>
</div> </div>
<div class="well"> <div class="well">
@@ -30,7 +30,7 @@
Tourenreferenten und Redakteure können hier Veranstaltungen freigeben und Programmlisten herunterladen. Tourenreferenten und Redakteure können hier Veranstaltungen freigeben und Programmlisten herunterladen.
</p> </p>
<p> <p>
<a class="btn btn-primary" href="{% url 'dav_events:list' %}">Weiter</a> <a id="btn-events-list" class="btn btn-primary" href="{% url 'dav_events:list' %}">Weiter</a>
</p> </p>
</div> </div>
{% endblock page-container-fluid %} {% endblock page-container-fluid %}