Asserts order and quantity of add buttons.
array $options: Array of expected add buttons in its correct order.
protected function assertAddButtons($options) {
$this
->drupalGet('node/add/paragraphed_test');
$buttons = $this
->xpath('//input[@class="field-add-more-submit button--small button js-form-submit form-submit"]');
// Check if the buttons are in the same order as the given array.
foreach ($buttons as $key => $button) {
$this
->assertEquals($button
->getValue(), $options[$key]);
}
$this
->assertEquals(count($buttons), count($options), 'The amount of drop down options matches with the given array');
}