Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 38a754a

Browse files
committed
Look for progress bar on any Home page
Look for clone progress bar on any Team Explorer Home page that the user navigates to. The Home page will need to be the topmost page on Team Explorer for the clone to complete.
1 parent c793d90 commit 38a754a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/GitHub.TeamFoundation.14/Services/VSGitServices.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,16 @@ static async Task StartClonenOnConnectPageAsync(
119119

120120
static async Task WaitForCloneOnHomePageAsync(ITeamExplorer teamExplorer)
121121
{
122-
var homePage = await NavigateToPageAsync(teamExplorer, new Guid(TeamExplorerPageIds.Home));
123-
Assumes.Present(homePage);
124-
var gettingStartedSection = homePage.GetSection(new Guid("d0200918-c025-4cc3-9dee-4f5e89d0c918"));
125-
Assumes.Present(gettingStartedSection);
126-
127-
// The clone progress bar appears on the GettingStarted section, so we wait for
128-
// this to be hidden before continuing.
129-
await gettingStartedSection
130-
.WhenAnyValue(x => x.IsVisible)
122+
NavigateToHomePage(teamExplorer);
123+
124+
// The clone progress bar appears on the GettingStartedSection of the Home page,
125+
// so we wait for this to be hidden before continuing.
126+
var sectionId = new Guid("d0200918-c025-4cc3-9dee-4f5e89d0c918"); // GettingStartedSection
127+
await teamExplorer
128+
.WhenAnyValue(x => x.CurrentPage)
129+
.Where(p => p.GetId() == new Guid(TeamExplorerPageIds.Home))
130+
.Select(p => p.GetSection(sectionId))
131+
.SelectMany(s => s.WhenAnyValue(x => x.IsVisible))
131132
.Any(x => x == false);
132133
}
133134

0 commit comments

Comments
 (0)