我担心有人会提出我的问题,但我找不到令人满意的问题(也许是因为我在Angular 2+世界中非常有限,我理解错了).
据我所知,在完成了几个Hello World之后我很难理解,很少有YouTube演示观看:
ng测试:
xxx.compnent.spec.ts运行,并在浏览器中显示类似于JUnit的最终报告ng e2e:
您在编写嵌套用户事件时编写测试
eg. page.navigateTo();
page.getParagraphText()
.then(msg => expect(msg).toEqual('Welcome to app!!'))
.then(msg => expect(msg).toEqual('xxx'))
.then(done, done.fail);
Run Code Online (Sandbox Code Playgroud)您使用量角器执行端到端测试主要是在部署应用程序后的一种预生产环境
Theoracly说,第二个是特定的端到端,其重点是模拟最终用户完成的整个流程.
希望,直到这里是正确的,我想知道幕后发生了什么真正使他们与众不同.我不想比较哪个更好但是我肯定错过了一些点,因为我使用完全相同的想法创建了一些测试,并且我通过ng测试触发了它.
例如:
...
it('should display the modal when `create Paste` is clicked', () => {
let createPasteButton = fixture.debugElement.query(By.css("button"));
//create a spy on the createPaste method
spyOn(component,"createPaste").and.callThrough();
//triggerEventHandler simulates a click event on the button object
createPasteButton.triggerEventHandler('click',null);
//spy checks whether the method was called
expect(component.createPaste).toHaveBeenCalled();
fixture.detectChanges();
expect(component.showModal).toBeTruthy("showModal should …Run Code Online (Sandbox Code Playgroud) 我想禁止访问任何文件OR目录,其名称以DOT开头.我想出了下面的,但它禁止访问与DOT开头,只有当他们是直接在文档根目录的文件/目录.
<Files ~ "^\.|\/\.">
Order allow,deny
Deny from all
</Files>
Run Code Online (Sandbox Code Playgroud)
有了这个,
http://my_server.com/.svn/entries --> Permission denied
http://my_server.com/abcd/.svn/entries --> Accessible, should be disabled
Run Code Online (Sandbox Code Playgroud)
什么是正确的正则表达式来实现这一目标?
谢谢,
J.P
我知道这个问题已经在这里很多次了,但是我没有找到专门解决我问题的答案.我有一张桌子,我正在尝试打印16列宽.当然,右侧只是切断了每个浏览器.我试图找出一种方法来防止这种情况发生.在底部是一个样品表,尝试打印它,右侧切断.以下是我不能做的选项:
word-break:break-all.它看起来不太好看理想情况下,我只希望表格占用所需的宽度,如果内容太多,则只需将其正常包装,以便单词中的字母保持在一起.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
font-size: 12pt;
font-family: Garamond, Serif;
}
table {
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 15px;
font-size: 1.2em;
}
td, th {
padding: 2px 2px 2px 5px;
border: 1px solid #000000;
}
tr.tableTitle {
font-size: 1.2em;
font-weight: bold;
text-align: center;
background: #d0d0d0;
}
thead tr {
font-weight: bold;
background: #f0f0f0;
text-align: center;
}
button.expander {
border: 1px solid black;
border-radius: 5px;
color: black;
font-family: Verdana, …Run Code Online (Sandbox Code Playgroud) 如果没有创建一个7列/ 3行表,其中1像素图像可以扩展以模拟线条,那么如何使用HTML和CSS重现这种布局而不使用表格或图像作为"分隔符"?
我真正喜欢它的是线条不相交的方式.
<!-- layout reproduced -->
<TABLE BORDER="0" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR ALIGN="center">
<TD CLASS="boldedcolor4text">the first</TD>
<TD><IMG SRC="/gfx/Style1/color1.gif" ALT="" WIDTH="1" HEIGHT="20"></TD>
<TD CLASS="boldedcolor4text">the second</TD>
<TD><IMG SRC="/gfx/Style1/color1.gif" ALT="" WIDTH="1" HEIGHT="20"></TD>
<TD CLASS="boldedcolor4text">the third</TD>
<TD><IMG SRC="/gfx/Style1/color1.gif" ALT="" WIDTH="1" HEIGHT="20"></TD>
<TD CLASS="boldedcolor4text">the fourth</TD>
</TR>
<TR ALIGN="center">
<TD COLSPAN="7"><IMG SRC="/gfx/Style1/color1.gif" ALT="" WIDTH="520" HEIGHT="1"></TD>
</TR>
<TR ALIGN="center">
<TD><A CLASS="image" HREF="><IMG SRC="1.jpg" ALT="" BORDER="0"></A></TD>
<TD><IMG SRC="/gfx/Style1/color1.gif" ALT="" WIDTH="1" HEIGHT="135"></TD>
<TD><A CLASS="image" HREF="><IMG SRC="2.jpg" ALT="" BORDER="0"></A></TD>
<TD><IMG SRC="/gfx/Style1/color1.gif" ALT="" WIDTH="1" HEIGHT="135"></TD>
<TD><A CLASS="image" HREF="><IMG SRC="3.jpg" ALT="" …Run Code Online (Sandbox Code Playgroud)css ×2
html ×2
.htaccess ×1
angular ×1
angular-cli ×1
apache ×1
html-table ×1
jasmine ×1
printing ×1
protractor ×1
regex ×1