Sha256: 23ffbe855111ab3e51b020032642b1b65c91a068f2158668fc42488ef02eb5b7

Contents?: true

Size: 1.93 KB

Versions: 18

Compression:

Stored size: 1.93 KB

Contents

function cucumberSearchFrameLinks() {
	$('#feature_list_link').click(function() {
		toggleSearchFrame(this, '/' + library + '/features');
	});
	$('#tag_list_link').click(function() {
		toggleSearchFrame(this, '/' + library + '/tags');
	});
}

$(cucumberSearchFrameLinks);



function toggleScenarioExample(id,example) {

	var element = $("#" + id + "Example" + example + "Steps")[0];

	$('#' + id + ' tr').each(function(index) {
		this.style.backgroundColor = (index % 2 == 0 ? '#FFFFFF' : '#F0F6F9' );
	});

	if (element.style.display != 'none') {
		element = $("#" + id + "Steps")[0];
	} else {
		$('#' + id + ' .outline * tr')[example].style.backgroundColor = '#FFCC80';
	}

	$('#' + id + ' .steps').each(function(index) {
		this.style.display = 'none';
	});

	element.style.display = 'block';

}

function determine_tags_used_in_formula(tag_string)  {
	//$("#tag_debug")[0].innerHTML = "";
	
	tag_string = tag_string.replace(/^(\s+)|(\s+)$/,'').replace(/\s{2,}/,' ');

	var tags = tag_string.match(/@\w+/g);

	var return_tags = [];

	if (tags != null) {
		tags.forEach(function(tag, index, array) {
			//$("#tag_debug")[0].innerHTML += tag + " ";
			if (tag_list.indexOf(tag) != -1) { return_tags.push(tag); }
		});
	}

	return return_tags;
}


function display_example_command_line(tags) {
	$("#command_example")[0].innerHTML = "cucumber ";

	if (tags.length > 0)  {
		$("#command_example")[0].innerHTML += "--tags " + tags.join(" --tags ");
	}
}

function display_qualifying_features_and_scenarios(tags) {
	//$("#tag_debug")[0].innerHTML = "";

	if (tags.length > 0) {
		
		$(".feature,.scenario").each(function(feature){
			this.style.display = "none";
		});

		$(".feature.\\" + tags.join(".\\") + ",.scenario.\\" + tags.join(".\\")).each(function(feature) {
			//$("#tag_debug")[0].innerHTML += feature + " " + this;
			this.style.display = "block";
		});

		
	}  else {
		$(".feature,.scenario").each(function(feature){
			this.style.display = "block";
		});
	}

}

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
yard-nrser-cucumber-0.1.3 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-nrser-cucumber-0.1.2 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-nrser-cucumber-0.1.1 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-nrser-cucumber-0.1.0 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-4.0.0 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-3.1.0 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-3.0.0 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber2-2.3.4 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber2-2.3.3 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.3.2 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.3.1 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.3.0 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.2.3 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.2.2 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.2.1 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.2.0 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.1.7 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.1.6 lib/docserver/default/fulldoc/html/js/cucumber.js