Sha256: ee7d1c00a080567efe224a8c66af0242078bc78c589d75cdc032ba8ca2ad944a

Contents?: true

Size: 1.93 KB

Versions: 20

Compression:

Stored size: 1.93 KB

Contents

function cucumberSearchFrameLinks() {
	$('#features_list_link').click(function() {
		toggleSearchFrame(this, '/' + library + '/features');
	});
	$('#tags_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

20 entries across 20 versions & 2 rubygems

Version Path
yard-cucumber-2.1.5 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.1.4 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.1.3 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.1.2 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.1.1 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.1.0 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.0.3 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.0.2 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.0.1 lib/docserver/default/fulldoc/html/js/cucumber.js
yard-cucumber-2.0.0 lib/docserver/default/fulldoc/html/js/cucumber.js
cucumber-in-the-yard-1.7.8 lib/docserver/default/fulldoc/html/js/cucumber.js
cucumber-in-the-yard-1.7.7 lib/docserver/default/fulldoc/html/js/cucumber.js
cucumber-in-the-yard-1.7.6 lib/docserver/default/fulldoc/html/js/cucumber.js
cucumber-in-the-yard-1.7.5 lib/docserver/default/fulldoc/html/js/cucumber.js
cucumber-in-the-yard-1.7.4 lib/docserver/default/fulldoc/html/js/cucumber.js
cucumber-in-the-yard-1.7.3 lib/docserver/default/fulldoc/html/js/cucumber.js
cucumber-in-the-yard-1.7.2 lib/docserver/default/fulldoc/html/js/cucumber.js
cucumber-in-the-yard-1.7.1 lib/docserver/default/fulldoc/html/js/cucumber.js
cucumber-in-the-yard-1.7.0 lib/docserver/default/fulldoc/html/js/cucumber.js
cucumber-in-the-yard-1.6.4 lib/docserver/default/fulldoc/html/js/cucumber.js