Exemple #1
0
        public async Task TestInitialize()
        {
            CreateSession();

            var api = new Api(TestUserData.GetPlusUser().Username, TestUserData.GetPlusUser().Password);
            await api.Login();

            await api.DeleteProfiles();
        }
        public async Task <MainWindowResults> CheckIfCorrectIPAddressIsShownAsync()
        {
            var api       = new Api(TestUserData.GetPlusUser().Username, TestUserData.GetPlusUser().Password);
            var ipAddress = await api.GetIpAddress();

            var textBlockIpAddress = Session.FindElementByAccessibilityId("IPAddressTextBlock").Text.RemoveExtraText();

            Assert.IsTrue(ipAddress.Equals(textBlockIpAddress), "Incorrect IP address is displayed.");
            return(this);
        }
Exemple #3
0
        public void CheckIfUsernameIsDisplayedInAccountSection()
        {
            TestCaseId = 199;

            _loginActions.LoginWithPlusUser();
            _mainWindow.ClickHamburgerMenu()
            .HamburgerMenu.ClickAccount();
            RefreshSession();
            _accountResult.VerifyLoggedInAsTextIs(TestUserData.GetPlusUser().Username);
        }
Exemple #4
0
        public void TestInitialize()
        {
            CreateSession();

            var args    = $"{TestUserData.GetPlusUser().Username} {TestUserData.GetPlusUser().Password}";
            var process = new Process();

            process.StartInfo = new ProcessStartInfo(ProfileCleaner, args);
            process.Start();
            process.WaitForExit();
        }
        public async Task <MainWindowResults> CheckIfCorrectCountryIsShownAsync()
        {
            var api     = new Api(TestUserData.GetPlusUser().Username, TestUserData.GetPlusUser().Password);
            var country = await api.GetCountry();

            var region = new RegionInfo(country);
            var dashboardRegionName = Session.FindElementByAccessibilityId("EntryCountryAndServer").Text;

            dashboardRegionName = dashboardRegionName.Split('»')[0].Replace(" ", "");
            Assert.IsTrue(dashboardRegionName.Contains(region.DisplayName.Replace(" ", "")), "Incorrect country name is displayed.");
            return(this);
        }
Exemple #6
0
 public LoginWindow LoginWithPlusUser()
 {
     return(PerformLogin(TestUserData.GetPlusUser().Username, TestUserData.GetPlusUser().Password));
 }