$this->
assertJsCondition('jQuery("#edit-machine-name-1-label-machine-name-suffix .machine-name-value").html() == "' .
$test_info['expected'
] . '"'
);
// Validate the generated machine name.
$this->
assertEquals($test_info['expected'
],
$machine_name_1_value->
getHtml(),
$test_info['message'
]);
// Validate the second machine name field is empty.
$this->
assertEmpty($machine_name_2_value->
getHtml(), 'The second machine name field should still be empty'
);
} // Validate the machine name field is hidden. Elements are visually hidden
// using positioning, isVisible() will therefore not work.
$this->
assertTrue($machine_name_1_wrapper->
hasClass('hidden'
), 'The ID field must not be visible'
);
$this->
assertTrue($machine_name_2_wrapper->
hasClass('hidden'
), 'The ID field must not be visible'
);
// Test switching back to the manual editing mode by clicking the edit link.
$button_1->
click();
// Validate the visibility of the machine name field.
$this->
assertFalse($machine_name_1_wrapper->
hasClass('hidden'
), 'The ID field must now be visible'
);
// Validate the visibility of the second machine name field.
$this->
assertTrue($machine_name_2_wrapper->
hasClass('hidden'
), 'The ID field must not be visible'
);