Change record status: 
Project: 
Introduced in branch: 
8.6.x
Introduced in version: 
8.6.0-alpha1
Description: 

BrowserTestBase has lots of helpful methods that could be re-used so following new traits has been added with following methods:

  • RefreshVariablesTrait
    • refreshVariables() - Moves this out of FunctionalTestSetupTrait because it is used in drupalGet() and submitForm()
  • BrowserHtmlDebugTrait
    • formatHtmlOutputHeaders()
    • getHtmlOutputHeaders()
    • htmlOutput()
    • initBrowserOutputFile()
    • getResponseLogHandler()
    • getTestMethodCaller()
  • UiHelperTrait
    • submitForm - Handles submitting forms.
    • drupalPostForm() - Same as drupalGet() + handles MarkupInterface objects for the text on buttons.
    • drupalLogin()
    • drupalLogout()
    • assertSession() - Handy helper to get a web assertion object.
    • drupalGet() - Handles converting URL objects to path strings.
    • buildUrl()
    • getAbsoluteUrl()
    • prepareRequest()
    • drupalUserIsLoggedIn()
    • click()
    • clickLink()
    • getTextContent()
    • getUrl()
    • assertEquals() - Handles markup interface
    • checkForMetaRefresh()
    • cssSelect()