我有我的TestCafe页面模型组合在不同的项目库。
当我尝试使用这些页面模型库/在具有测试的主要项目包,我得到了各种各样的不同的错误。我收到的时候我尝试运行一个测试,利用在不同的包页面中的最新车型的错误是这样的:
Cannot implicitly resolve the test run in the context of which the test controller action should be executed. Use test function's 't' argument instead.
我的页面模型库使用巴贝尔并且在babelrc文件如下:
{
"presets": [
[
"@babel/preset-env", {
"targets": {
"node": true
},
"modules": "commonjs",
"forceAllTransforms": true,
"debug": true
}
]
]
}
如果我不上的页面模型库使用巴贝尔,我得到有关未知进口令牌的问题。
(function (exports, require, module, __filename, __dirname) { import ...
SyntaxError: Unexpected token import
能有人给我如何获得多个仓库TestCafe项目工作的意见?
我担心这是不可能的,因为所有的测试代码,所有进口必须由TestCafe执行测试之前transpiled。正因为如此,TestCafe也将忽略任何babelrc
你可能设置。所有TestCafe代码和所有页面模式应该是在同一个存储库中。