Skip to content

Instantly share code, notes, and snippets.

@esolitos
Created August 23, 2019 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esolitos/e3ed2b4d6f7a1bb30e6dcd6021514a25 to your computer and use it in GitHub Desktop.
Save esolitos/e3ed2b4d6f7a1bb30e6dcd6021514a25 to your computer and use it in GitHub Desktop.
StatusCake: Set
// This must be run in the "Bulk edit" _after_ the search for tests has been done.
// Step 1: Manually create _a lot_ of "SET OPTIONS" (just leave them empty)
// MANUAL
// Step 2: Run in JS console: Sets all options to "Test Locations"
jQuery('#options select[name^="o_option_"] option[value="RegionCodes"]').attr('selected', true);
jQuery('#options select[name^="o_option_"]').trigger('change');
// Step 3: Run in JS console: Sets all 1st level options to "Europe"
jQuery('#options select[name^="o_value_"]').attr('value', [3]);
jQuery('#options select[name^="o_value_"]').trigger('change');
// Step 4: Run in JS console: Sets each option to the next location compared to the prev one.
jQuery('#options select[name^="o_value2_"]').each(function(i){ th = jQuery(this); val = th.find('option')[i]; if(!!val){ val = jQuery(val).attr('value'); console.log(val); jQuery(this).attr('value', val ); jQuery(this).trigger('change'); } });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment