File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/Tests/AspNetCoreTemplate.Web.Tests Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
namespace AspNetCoreTemplate . Web . Tests
2
2
{
3
3
using System ;
4
+ using System . Linq ;
4
5
5
6
using OpenQA . Selenium ;
6
7
using OpenQA . Selenium . Chrome ;
@@ -17,17 +18,18 @@ public SeleniumTests(SeleniumServerFactory<Startup> server)
17
18
this . server = server ;
18
19
server . CreateClient ( ) ;
19
20
var opts = new ChromeOptions ( ) ;
20
- opts . AddArguments ( "--headless" , "--ignore-certificate-errors" ) ;
21
+ opts . AddArguments ( "--headless" ) ;
22
+ opts . AcceptInsecureCertificates = true ;
21
23
this . browser = new ChromeDriver ( opts ) ;
22
24
}
23
25
24
26
[ Fact ( Skip = "Example test. Disabled for CI." ) ]
25
27
public void FooterOfThePageContainsPrivacyLink ( )
26
28
{
27
29
this . browser . Navigate ( ) . GoToUrl ( this . server . RootUri ) ;
28
- Assert . Contains (
29
- this . browser . FindElements ( By . CssSelector ( "footer a" ) ) ,
30
- x => x . GetAttribute ( "href" ) . EndsWith ( "/Home/Privacy ") ) ;
30
+ Assert . EndsWith (
31
+ "/Home/Privacy" ,
32
+ this . browser . FindElements ( By . CssSelector ( "footer a" ) ) . First ( ) . GetAttribute ( "href ") ) ;
31
33
}
32
34
33
35
public void Dispose ( )
You can’t perform that action at this time.
0 commit comments