File tree 4 files changed +9
-8
lines changed
testassets/ComponentsApp.App/Pages 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) .NET Foundation. All rights reserved.
2
2
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3
3
4
+ using System ;
5
+ using System . Linq ;
4
6
using Microsoft . AspNetCore . Components . E2ETest . Infrastructure ;
5
7
using Microsoft . AspNetCore . Components . E2ETest . Infrastructure . ServerFixtures ;
6
8
using Microsoft . AspNetCore . E2ETesting ;
7
9
using OpenQA . Selenium ;
8
10
using OpenQA . Selenium . Support . UI ;
9
- using System ;
10
- using System . Linq ;
11
- using System . Threading . Tasks ;
12
11
using Xunit ;
13
12
using Xunit . Abstractions ;
14
13
@@ -41,7 +40,7 @@ public void HasTitle()
41
40
[ Fact ]
42
41
public void HasHeading ( )
43
42
{
44
- Assert . Equal ( "Hello, world!" , Browser . FindElement ( By . TagName ( "h1" ) ) . Text ) ;
43
+ Browser . Equal ( "Hello, world!" , ( ) => Browser . FindElement ( By . CssSelector ( "h1#index " ) ) . Text ) ;
45
44
}
46
45
47
46
[ Fact ]
@@ -96,7 +95,7 @@ public void HasFetchDataPage()
96
95
{
97
96
// Navigate to "Fetch Data"
98
97
Browser . FindElement ( By . LinkText ( "Fetch data" ) ) . Click ( ) ;
99
- Browser . Equal ( "Weather forecast" , ( ) => Browser . FindElement ( By . TagName ( "h1" ) ) . Text ) ;
98
+ Browser . Equal ( "Weather forecast" , ( ) => Browser . FindElement ( By . CssSelector ( "h1#fetch-data " ) ) . Text ) ;
100
99
101
100
// Wait until loaded
102
101
var tableSelector = By . CssSelector ( "table.table" ) ;
Original file line number Diff line number Diff line change 6
6
using Microsoft . AspNetCore . Components . E2ETest . Infrastructure ;
7
7
using Microsoft . AspNetCore . Components . E2ETest . Infrastructure . ServerFixtures ;
8
8
using Microsoft . AspNetCore . E2ETesting ;
9
+ using Microsoft . AspNetCore . Testing . xunit ;
9
10
using OpenQA . Selenium ;
10
11
using OpenQA . Selenium . Interactions ;
11
12
using Xunit ;
@@ -133,6 +134,7 @@ public void PreventDefault_DotNotApplyByDefault()
133
134
}
134
135
135
136
[ Fact ]
137
+ [ Flaky ( "https://github.com/aspnet/AspNetCore-Internal/issues/1987" ) ]
136
138
public void InputEvent_RespondsOnKeystrokes ( )
137
139
{
138
140
MountTestComponent < InputEventComponent > ( ) ;
Original file line number Diff line number Diff line change 2
2
@page " /fetchdata/{StartDate:datetime}"
3
3
@inject WeatherForecastService ForecastService
4
4
5
- <h1 >Weather forecast</h1 >
5
+ <h1 id = " fetch-data " >Weather forecast</h1 >
6
6
7
7
<p >This component demonstrates fetching data from the server.</p >
8
8
Original file line number Diff line number Diff line change 1
- @page " /"
1
+ @page " /"
2
2
3
- <h1 >Hello, world!</h1 >
3
+ <h1 id = " index " >Hello, world!</h1 >
4
4
5
5
Welcome to your new app.
You can’t perform that action at this time.
0 commit comments