Нужно использовать транспортир-синхронизирующий модуль с огурцом - PullRequest
0 голосов
/ 26 марта 2019

Я использую модуль protractor-sync с огурцом, чтобы звонки выполнялись синхронно Но когда я начинаю использовать функции Protractor-Sync browserSync.get ("https://www.google.com");

Error

Error: Could not find the current asyncblock flow. Please make sure this method is called from an asyncblock
context.

Ошибка консоли:

× Given Navigate to Google Page # Protractor\node_modules\cucumber\lib\support_code_library_builder\build_helpers.js:173
       Error: Could not find the current asyncblock flow. Please make sure this method is called from an asyncblock
context.
           at Object.exec (C:\Cucumber Protractor\node_modules\protractor-sync\dist\exec.js:10:19)
           at BrowserSync.get (C:\Cucumber Protractor\node_modules\protractor-sync\dist\browser-sync.js:34:23)
           at World.<anonymous> (C:\Cucumber Protractor\steps\LoginSteps.ts:12:15)

Файл функций

Feature: Validation test

@CucumberScenario
Scenario: Validate Google Page
Given Navigate to Google Page

Файл шагов:

import { Given } from 'cucumber';
import { browserSync } from 'protractor-sync';

Given('Navigate to Google Page',{ timeout: 120 * 1000 }, ()=> {

  browserSync.get("https://www.google.com");

});

транспортир conf.js

exports.config = {
  allScriptsTimeout: 240000,
  specs: [
    "./features/*.feature",
],
  framework: 'custom',
  frameworkPath: require.resolve("protractor-cucumber-framework"),
  cucumberOpts: {
    strict: true,
    compiler: 'ts:ts-node/register'

}

};

Можем ли мы использовать модуль синхронизации транспортира вместе с огурцом https://github.com/blackboard/protractor-sync

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...