commercetools-8.x-1.2-alpha1/modules/commercetools_demo/tests/src/Nightwatch/Tests/demoFormTest.js

modules/commercetools_demo/tests/src/Nightwatch/Tests/demoFormTest.js
const getBeforeAfterFunctions = require('../../../../../../tests/src/Nightwatch/Lib/getBeforeAfterFunctions');

module.exports = {
  ...getBeforeAfterFunctions(__filename),

  'Check the commercetools Demo form': (browser) => {
    browser
      .thLogin('admin')
      .drupalRelativeURL('/admin/config/system/commercetools/demo')
      .assert.textContains(
        { selector: '.card .card-title', index: 0 },
        'Bootstrap-compatible theme',
      )
      .assert.textContains(
        { selector: '.card .card-title', index: 0 },
        'Downloaded but not installed',
      )
      .click('input[name=set_theme_flexistyle_bootstrap]')
      .assert.textContains(
        { selector: '.card .card-title', index: 0 },
        'Bootstrap theme installed as default',
      )
      .assert.textContains(
        { selector: '.card .card-title', index: 1 },
        'commercetools connection',
      )
      .assert.textContains(
        { selector: '.card .card-title', index: 1 },
        'credentials, project -',
      )
      .click('*[name=clear_credentials]')
      .assert.textContains(
        { selector: '.card .card-title', index: 1 },
        'not configured',
      )
      .assert.textContains(
        { selector: '.card .card-title', index: 2 },
        'Multi-country and multi-currency Demo',
      )
      .click('*[name=deploy_demo_localization]')
      .assert.textContains({ selector: '.card', index: 2 }, 'Deployed');
  },
};

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc