Issue #3139442 by mondrake, munish.kumar, Hardik_Patel_12, jungle, mohrerao,...
Issue #3139442 by mondrake, munish.kumar, Hardik_Patel_12, jungle, mohrerao, alexpott: Replace usages of AssertLegacyTrait::constructFieldXpath, that is deprecated
@@ -58,7 +58,7 @@ public function testUserAdminLanguageConfigurationNotAvailableWithOnlyOneLanguag
$path='user/'.$this->adminUser->id().'/edit';
$this->drupalGet($path);
// Ensure administration pages language settings widget is not available.
$this->assertNoFieldByXPath($this->constructFieldXpath('id','edit-preferred-admin-langcode'),NULL,'Administration pages language selector not available.');
@@ -72,13 +72,13 @@ public function testUserAdminLanguageConfigurationAvailableWithAdminLanguageNego
// Checks with user administration pages language negotiation disabled.
$this->drupalGet($path);
// Ensure administration pages language settings widget is not available.
$this->assertNoFieldByXPath($this->constructFieldXpath('id','edit-preferred-admin-langcode'),NULL,'Administration pages language selector not available.');
// Checks with user administration pages language negotiation enabled.
$this->setLanguageNegotiation();
$this->drupalGet($path);
// Ensure administration pages language settings widget is available.
$this->assertFieldByXPath($this->constructFieldXpath('id','edit-preferred-admin-langcode'),NULL,'Administration pages language selector is available.');
@@ -100,20 +100,20 @@ public function testUserAdminLanguageConfigurationAvailableIfAdminLanguageNegoti
$path='user/'.$this->adminUser->id().'/edit';
$this->drupalGet($path);
// Ensure administration pages language setting is visible for admin.
$this->assertFieldByXPath($this->constructFieldXpath('id','edit-preferred-admin-langcode'),NULL,'Administration pages language selector available for admins.');
// Ensure administration pages language setting is visible for editors.
$editor=$this->drupalCreateUser(['view the administration theme']);
$this->drupalLogin($editor);
$path='user/'.$editor->id().'/edit';
$this->drupalGet($path);
$this->assertFieldByXPath($this->constructFieldXpath('id','edit-preferred-admin-langcode'),NULL,'Administration pages language selector available for editors.');
// Ensure administration pages language setting is hidden for non-admins.
$this->drupalLogin($this->regularUser);
$path='user/'.$this->regularUser->id().'/edit';
$this->drupalGet($path);
$this->assertNoFieldByXPath($this->constructFieldXpath('id','edit-preferred-admin-langcode'),NULL,'Administration pages language selector not available for regular user.');
@trigger_error('AssertLegacyTrait::assertFieldByName() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldExists() or $this->assertSession()->buttonExists() or $this->assertSession()->fieldValueEquals() instead. See https://www.drupal.org/node/3129738',E_USER_DEPRECATED);
@trigger_error('AssertLegacyTrait::assertNoFieldByName() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() or $this->assertSession()->fieldValueNotEquals() instead. See https://www.drupal.org/node/3129738',E_USER_DEPRECATED);
@trigger_error('AssertLegacyTrait::assertFieldById() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldExists() or $this->assertSession()->buttonExists() or $this->assertSession()->fieldValueEquals() instead. See https://www.drupal.org/node/3129738',E_USER_DEPRECATED);
@trigger_error('AssertLegacyTrait::assertField() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldExists() or $this->assertSession()->buttonExists() instead. See https://www.drupal.org/node/3129738',E_USER_DEPRECATED);
@@ -334,7 +340,10 @@ protected function assertField($field) {
*/
protectedfunctionassertNoField($field){
@trigger_error('AssertLegacyTrait::assertNoField() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() instead. See https://www.drupal.org/node/3129738',E_USER_DEPRECATED);
@trigger_error('AssertLegacyTrait::assertNoFieldById() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() or $this->assertSession()->fieldValueNotEquals() instead. See https://www.drupal.org/node/3129738',E_USER_DEPRECATED);
* @expectedDeprecation AssertLegacyTrait::constructFieldXpath() is deprecated in drupal:8.5.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->findField() instead. See https://www.drupal.org/node/3129738