public async Task VerifyNoRepositoriesAfterLogOut() { //Arrange IReadOnlyList <Repository> visibleRepositoryList; //Act RepositoryPage.TapSettingsButton(); //Assert Assert.AreEqual(GitHubLoginButtonConstants.Disconnect, SettingsPage.GitHubButtonText); //Act SettingsPage.TapGitHubButton(); SettingsPage.WaitForGitHubLogoutToComplete(); //Assert Assert.AreEqual(GitHubLoginButtonConstants.ConnectWithGitHub, SettingsPage.GitHubButtonText); //Act SettingsPage.TapBackButton(); RepositoryPage.DeclineGitHubUserNotFoundPopup(); RepositoryPage.TriggerPullToRefresh(); await RepositoryPage.WaitForPullToRefreshIndicator().ConfigureAwait(false); await RepositoryPage.WaitForNoPullToRefreshIndicator().ConfigureAwait(false); //Assert visibleRepositoryList = RepositoryPage.GetVisibleRepositoryList(); Assert.IsFalse(visibleRepositoryList.Any()); }
public async Task VerifyRepositoriesAfterLogin() { //Arrange IReadOnlyList <Repository> visibleRepositoryList; int smallScreenTrendingImageCount; int largeScreenTrendingImageCount; //Act RepositoryPage.TriggerPullToRefresh(); await RepositoryPage.WaitForNoPullToRefreshIndicator().ConfigureAwait(false); smallScreenTrendingImageCount = RepositoryPage.SmallScreenTrendingImageCount; largeScreenTrendingImageCount = RepositoryPage.LargeScreenTrendingImageCount; //Assert visibleRepositoryList = RepositoryPage.VisibleCollection; Assert.IsTrue(visibleRepositoryList.Any()); if (visibleRepositoryList.Count(x => x.IsTrending) > 0) { Assert.AreNotEqual(smallScreenTrendingImageCount, largeScreenTrendingImageCount); if (smallScreenTrendingImageCount > 0) { Assert.AreEqual(0, largeScreenTrendingImageCount); } if (largeScreenTrendingImageCount > 0) { Assert.AreEqual(0, smallScreenTrendingImageCount); } } }
public async Task VerifyRepositoriesAfterLogin() { //Arrange IReadOnlyList <Repository> visibleRepositoryList; //Act RepositoryPage.TriggerPullToRefresh(); await RepositoryPage.WaitForNoPullToRefreshIndicator().ConfigureAwait(false); //Assert visibleRepositoryList = RepositoryPage.GetVisibleRepositoryList(); Assert.IsTrue(visibleRepositoryList.Any()); }
public async Task VerifyDemoButton() { //Arrange Repository demoUserRepository; //Act WelcomePage.TapTryDemoButton(); await RepositoryPage.WaitForPageToLoad().ConfigureAwait(false); await RepositoryPage.WaitForNoPullToRefreshIndicator().ConfigureAwait(false); //Assert demoUserRepository = RepositoryPage.VisibleCollection.First(); Assert.AreEqual(DemoUserConstants.Alias, demoUserRepository.OwnerLogin); }
public async Task VerifyChartSettingsOptions() { //Arrange //Assert Assert.AreEqual(TrendsChartOption.All, SettingsPage.CurrentTrendsChartOption); //Act await SettingsPage.SetTrendsChartOption(TrendsChartOption.JustUniques).ConfigureAwait(false); //Assert Assert.AreEqual(TrendsChartOption.JustUniques, SettingsPage.CurrentTrendsChartOption); //Act await SettingsPage.SetTrendsChartOption(TrendsChartOption.All).ConfigureAwait(false); //Assert Assert.AreEqual(TrendsChartOption.All, SettingsPage.CurrentTrendsChartOption); //Act await SettingsPage.SetTrendsChartOption(TrendsChartOption.NoUniques); //Assert Assert.AreEqual(TrendsChartOption.NoUniques, SettingsPage.CurrentTrendsChartOption); //Act SettingsPage.TapBackButton(); await RepositoryPage.WaitForPageToLoad().ConfigureAwait(false); await RepositoryPage.WaitForNoPullToRefreshIndicator().ConfigureAwait(false); var visibleRepositories = RepositoryPage.VisibleCollection; RepositoryPage.TapRepository(visibleRepositories.First().Name); await TrendsPage.WaitForPageToLoad().ConfigureAwait(false); //Assert Assert.IsTrue(TrendsPage.IsSeriesVisible(TrendsChartTitleConstants.TotalViewsTitle)); Assert.IsTrue(TrendsPage.IsSeriesVisible(TrendsChartTitleConstants.TotalClonesTitle)); Assert.IsFalse(TrendsPage.IsSeriesVisible(TrendsChartTitleConstants.UniqueViewsTitle)); Assert.IsFalse(TrendsPage.IsSeriesVisible(TrendsChartTitleConstants.UniqueClonesTitle)); }