Skip to content
Snippets Groups Projects
Commit c8ec73d1 authored by efalcy's avatar efalcy
Browse files

minsoc_hotline_109030 fix tests

parent 4747e981
Branches
Tags
3 merge requests!3589Hotline,!3536WIP: fix id on authority picker,!3516Minsoc prod
Pipeline #10316 passed with stage
in 43 minutes and 39 seconds
......@@ -35,7 +35,7 @@
<script src="tests.js"></script>
<div id="opac-dialog">
<h2>Authority
<button class="authority_pick" data-record="3334923" data-label="Authority">Choisir</button>
<button id="button_select_authority_subject" class="authority_pick" data-record="3334923" data-label="Authority">Choisir</button>
</h2>
</div>
</body>
......
......@@ -22,7 +22,7 @@ function call_authority_picker_for(options) {
var insertion_point = $('<div>\
<input type="hidden" id="authority_subject" name="authority_subject">\
<span id="authority_subject_selected_value_authority_subject"></span>\
<button id="select_for_authority_subject" class="button new" onclick="return false;" title="" data-url="/recherche/add">Choisir</button>\
<button class="button new" onclick="return false;" title="" data-url="/recherche/add">Choisir</button>\
<button class="button undo" onclick="return false;" title="Annuler mes modifications" data-url="/recherche/avancee">Annuler</button>\
</div>');
insertion_point.authority_picker(options);
......@@ -52,7 +52,7 @@ QUnit.module('authority_picker');
QUnit.testStart(function() {
on_open_listeners = [];
opened_urls = [];
$('button.authority_pick').off('click');
$('#button_select_authority_subject').off('click');
insertion_point = call_authority_picker_for({
name:"authority_subject",
......@@ -80,7 +80,7 @@ test('on empty', function () {
equal(insertion_point.find('input').first().val(), '', 'value should be empty' + insertion_point.html());
equal(insertion_point.find('#authority_subject_selected_value_authority_subject').html(), '', insertion_point.html());
$('button.authority_pick').first().click();
$('#button_select_authority_subject').click();
equal(insertion_point.find('input').first().val(), '3334923', 'value has been set' + insertion_point.html());
equal(insertion_point.find('span').first().html(), 'Authority', 'label has been set' + insertion_point.html());
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment