Commit 6f6f581d authored by catch's avatar catch
Browse files

Issue #3414760 by Spokje: Remove Nightwatch exampleTest

parent 10a3d516
Loading
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
module.exports = {
  props: {
    text: 'Test page text',
    timeout: 1000,
  },
  elements: {
    body: {
      selector: 'body',
    },
  },
};
+0 −28
Original line number Diff line number Diff line
module.exports = {
  '@tags': ['core'],
  before(browser) {
    browser.drupalInstall({
      setupFile: 'core/tests/Drupal/TestSite/TestSiteInstallTestScript.php',
    });
  },
  after(browser) {
    browser.drupalUninstall();
  },
  'Test page': (browser) => {
    browser
      .drupalRelativeURL('/test-page')
      .waitForElementVisible('body', 1000)
      .assert.textContains('body', 'Test page text')
      .drupalLogAndEnd({ onlyOnError: false });
  },
  'Page objects test page': (browser) => {
    const testPage = browser.page.TestPage();

    testPage
      .drupalRelativeURL('/test-page')
      .waitForElementVisible('@body', testPage.props.timeout)
      .assert.textContains('@body', testPage.props.text)
      .assert.noDeprecationErrors()
      .drupalLogAndEnd({ onlyOnError: false });
  },
};
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ chromedriver using port 4444, and keep it running:
* To run only core tests, run `yarn test:nightwatch --tag core`
* To skip running core tests, run `yarn test:nightwatch --skiptags core`
* To run a single test, run e.g.
  `yarn test:nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js`
  `yarn test:nightwatch tests/Drupal/Nightwatch/Tests/loginTest.js`
* To run a11y tests for both the admin and default themes.
  `yarn test:nightwatch --tag a11y`
* To run a11y tests for the admin theme only.