Issue #3139429 by mondrake, rahulrasgon, mohrerao, siddhant.bhosale, paulocs,...
Issue #3139429 by mondrake, rahulrasgon, mohrerao, siddhant.bhosale, paulocs, longwave, jungle, cburschka, munish.kumar: Replace usages of AssertLegacyTrait::assert(No)FieldByXPath, that is deprecated
(cherry picked from commit 652efc72)
// Ensure that a block's ID is converted to an HTML valid ID, and that
// block-specific attributes are added to the same DOM element.
$this->assertFieldByXPath('//div[@id="block-test-html-block" and @data-custom-attribute="foo"]',NULL,'HTML ID and attributes for test block are valid and on the same DOM element.');
$this->assertSession()->elementExists('xpath','//div[@id="block-test-html-block" and @data-custom-attribute="foo"]');
$this->assertFieldByXPath('//select[@name="settings[view_mode]"]/option[@selected="selected"]','test_view_mode','View mode changed to Test View Mode');