- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个针对Angular 9的项目。我编写了测试,现在需要从docker启动所有这些。我注意到本地测试通过了。
我的protractor.conf:
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { browser } = require('protractor');
const { SpecReporter } = require('jasmine-spec-reporter');
const fs = require('fs');
const filePath = (`${process.cwd()}\\e2e\\downl_docs`).replace(/\\/g, '/');
const path = require('path');
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 30000,
specs: [
'src/suites/authorization/*.e2e-spec.ts',
'src/suites/user/*.e2e-spec.ts',
'src/suites/group/group_subs.e2e-spec.ts',
'src/suites/group/group.e2e-spec.ts',
'src/suites/group/group_load_docs.e2e-spec.ts',
'src/suites/group/group_edit.e2e-spec.ts',
'src/suites/tests/crud_tests.e2e-spec.ts',
'src/suites/tests/crud_questions.e2e-spec.ts',
'src/suites/tests/crud_answers.e2e-spec.ts',
'src/suites/tests/check_res_test.e2e-spec.ts',
'src/suites/tests/passing_test.e2e-spec.ts',
'src/suites/search/search.e2e-spec.ts',
'src/suites/chat/chat.e2e-spec.ts',
'src/suites/chat/chat_send.e2e-spec.ts',
],
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['--headless', '--disable-gpu', '--window-size=800,600'],
prefs: {
download: {
prompt_for_download: false,
default_directory: `${process.cwd()}\\e2e\\downl_docs`,
directory_upgrade: true
}
}
},
},
chromeOnly: true,
suites: {
auth: 'src/suites/authorization/*.e2e-spec.ts',
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
seleniumAddress: 'http://localhost:4444/wd/hub',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 90000,
print: function () { }
},
onPrepare() {
const directory = 'test';
fs.readdir(filePath, (err, files) => {
if (err) throw err;
if (files.length > 0) {
for (const file of files) {
fs.unlink(path.join(filePath, file), err => {
if (err) throw err;
});
}
}
});
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
FROM trion/ng-cli-e2e
WORKDIR /app
COPY . .
RUN npm install
CMD npm run e2e
version: '3.4'
services:
client:
image: ${DOCKER_REGISTRY-}client
build:
context: ../../../client/UmkMainClient/
dockerfile: ./Test.Dockerfile
ports:
- "4200:4200"
client_1 |
client_1 | > umk@0.0.0 e2e /app
client_1 | > ng e2e
client_1 |
client_1 | [11:04:25] I/file_manager - creating folder /app/node_modules/protractor/node_modules/webdriver-manager/selenium
client_1 | [11:04:25] I/config_source - curl -o/app/node_modules/protractor/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/
client_1 | [11:04:26] I/downloader - curl -o/app/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_81.0.4044.138.zip https://chromedriver.storage.googleapis.com/81.0.4044.69/chromedriver_linux64.zip
client_1 | [11:04:26] I/update - chromedriver: unzipping chromedriver_81.0.4044.138.zip
client_1 | [11:04:27] I/update - chromedriver: setting permissions to 0755 for /app/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_81.0.4044.138
client_1 | Compiling @angular/core : es2015 as esm2015
...
client_1 |
client_1 | chunk {assets/syncfusion/base/material} material.css, material.css.map (assets/syncfusion/base/material) 153 kB [initial] [rendered]
client_1 | chunk {assets/syncfusion/buttons/material} material.css, material.css.map (assets/syncfusion/buttons/material) 158 kB [initial] [rendered]
client_1 | chunk {assets/syncfusion/dropdowns/material} material.css, material.css.map (assets/syncfusion/dropdowns/material) 94.4 kB [initial] [rendered]
client_1 | chunk {assets/syncfusion/inputs/material} material.css, material.css.map (assets/syncfusion/inputs/material) 813 kB [initial] [rendered]
client_1 | chunk {assets/syncfusion/navigations/material} material.css, material.css.map (assets/syncfusion/navigations/material) 230 kB [initial] [rendered]
client_1 | chunk {assets/syncfusion/notifications/material} material.css, material.css.map (assets/syncfusion/notifications/material) 16.5 kB [initial] [rendered]
client_1 | chunk {assets/syncfusion/pdfviewer/material} material.css, material.css.map (assets/syncfusion/pdfviewer/material) 58.4 kB [initial] [rendered]
client_1 | chunk {assets/syncfusion/popups/material} material.css, material.css.map (assets/syncfusion/popups/material) 16.1 kB [initial] [rendered]
client_1 | chunk {assets/syncfusion/splitbuttons/material} material.css, material.css.map (assets/syncfusion/splitbuttons/material) 66 kB [initial] [rendered]
client_1 | chunk {main} main.js, main.js.map (main) 1.94 kB [initial] [rendered]
client_1 | chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 650 bytes [initial] [rendered]
client_1 | chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
client_1 | chunk {styles} styles.css, styles.css.map (styles) 495 kB [initial] [rendered]
client_1 | chunk {vendor} vendor.js, vendor.js.map (vendor) 339 kB [initial] [rendered]
client_1 | Date: 2020-05-16T11:08:05.690Z - Hash: 9249eed124fc36b50fd1 - Time: 15056ms
client_1 |
client_1 | ERROR in router is not defined
client_1 | ** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
client_1 | npm ERR! code ELIFECYCLE
client_1 | npm ERR! errno 1
client_1 | npm ERR! umk@0.0.0 e2e: `ng e2e`
client_1 | npm ERR! Exit status 1
client_1 | npm ERR!
client_1 | npm ERR! Failed at the umk@0.0.0 e2e script.
client_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
client_1 |
client_1 | npm ERR! A complete log of this run can be found in:
client_1 | npm ERR! /tmp/.npm/_logs/2020-05-16T11_08_05_851Z-debug.log
dcclienttest_client_1 exited with code 1
Aborting on container exit...
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'e2e' ]
2 info using npm@6.14.4
3 info using node@v12.16.3
4 verbose run-script [ 'pree2e', 'e2e', 'poste2e' ]
5 info lifecycle umk@0.0.0~pree2e: umk@0.0.0
6 info lifecycle umk@0.0.0~e2e: umk@0.0.0
7 verbose lifecycle umk@0.0.0~e2e: unsafe-perm in lifecycle true
8 verbose lifecycle umk@0.0.0~e2e: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle umk@0.0.0~e2e: CWD: /app
10 silly lifecycle umk@0.0.0~e2e: Args: [ '-c', 'ng e2e' ]
11 silly lifecycle umk@0.0.0~e2e: Returned: code: 1 signal: null
12 info lifecycle umk@0.0.0~e2e: Failed to exec e2e script
13 verbose stack Error: umk@0.0.0 e2e: `ng e2e`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid umk@0.0.0
15 verbose cwd /app
16 verbose Linux 4.19.76-linuxkit
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "e2e"
18 verbose node v12.16.3
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error umk@0.0.0 e2e: `ng e2e`
22 error Exit status 1
23 error Failed at the umk@0.0.0 e2e script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
最佳答案
该项目中有一个哈巴狗。我没有在docker中编译这些文件。因此有一个错误
关于angular - Docker “Failed to exec e2e script”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61836056/
您好,我在最后一步使用了 add 和 offer 来添加我的元素。两者都返回 boolean 值,并且除了 NPE 之外都不会抛出任何异常。 public class ArrayDequeDemo
我正在做一个功能,用户的电子邮件客户端只打开一个预填充的内容 (javascript)。 问题是我在转换特殊字符时遇到问题,因此它们无法正确显示到电子邮件客户端(内容由 url 传递)。 我写了一个函
问题一: 在阅读 JDK 源代码时,我发现该方法 boolean add(E e);在接口(interface)中定义 Collection & Queue & BlockingQueue . 我无法
我想比较 SQL 中的两个 varchar,一个类似于 Cafe ,另一个 Café SQL 中是否有一种方法可以允许这两个值进行比较。例如: SELECT * FROM Venue WHERE Na
我正在研究一种方法来搜索文本中的特定单词并突出显示它们。该代码工作完美,除了我希望它也匹配相似的字母。我的意思是,搜索 fête 应该匹配 fêté、fete、... 有没有一种简单而优雅的方法来做到
所以我有一个非常简单的组件,它加载了一个简单的路由器。我正在使用所有基本的东西,比如 ngFor、ngSwitch、ngIf,我通过 COMMON_DIRECTIVES 注入(inject)它们 我收
我有一个类似 Brazil: Série A 的字符串,我的目标是转换为 Brazil: Serie A。 此外,方法应该转换和其他类似的情况:é -> e, š -> s, ė -> e , ą -
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
在我的 app.module.ts @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule
Sample查询: SELECT e FROM Employee e WHERE SUBSTRING(e.name, 3) = 'Mac' 在这种语法中,说 SELECT e 似乎很直观,即 e 现在
objective-c 中是否有一种简单的方法可以将所有特殊字符(如 ë、à、é、ä)转换为普通字符(如 e en a)? 最佳答案 是的,而且非常简单: NSString *src = @"Conv
我想将 ë 之类的字符转换为普通的 e。我正在寻找关于语言和人们如何输入城市的转换。例如,大多数人在搜索时实际上输入的是 Brasilia,而不是 Brasília。当 Rueters 等新闻机构报道
当我写作时 $("#new_lang").click(function(e) { alert("something"); e.stopPropagation(); }); 这里的 e 是什么,
> 的键是 E 的某些属性,值是具有该属性的 E
我想知道如何将 Java List 转换为 Map。映射中的键是列表元素的某些属性(不同的元素可能具有相同的属性),值是这些列表项的列表(具有相同的属性)。例如。 List --> Map> 。我找到
我试图理解,为什么我们需要 Deque 中的 Offer 和 OfferLast 方法,因为这两种方法都在Deque 的结尾/尾部。它有什么意义? 最佳答案 Queue 接口(interface)是在
这个问题是这个问题的延续 here .如果有人想知道为什么我需要做这样的事情,你可以在那个问题中找到理由。这并不重要,真的。 我需要这样的方法: public virtual Expression>
注意:这个问题与 Enum 无关,所以它不是重复的。Enum 被迫只与自身比较,因为编译器生成类型参数,而不是因为 java 递归类型参数。 我试图找到将类声明为的优势: public class S
注意:这个问题与 Enum 无关,所以它不是重复的。Enum 被迫只与自身比较,因为编译器生成类型参数,而不是因为 java 递归类型参数。 我试图找到将类声明为的优势: public class S
如果我有一个struct example *e,function(&e) 和function(e) 之间有什么区别? 一个例子。 这是第一个代码: #include struct example {
这个问题在这里已经有了答案: C# 7.0 ValueTuples vs Anonymous Types (2 个答案) 关闭去年。 这两个查询有什么区别? var query = from e i
我是一名优秀的程序员,十分优秀!