Пример #1
0
        public void AddNewOpportunity(bool shouldUseKeyboardReturnButton)
        {
            //Arrange
            const string topicText   = "714999 / Investment Data Corp";
            const string companyText = "Test Company";
            const int    leaseAmount = 123456789;
            const string ownerText   = "Test Owner";
            const string dbaText     = "Test DBA";

            //Act
            OpportunitiesPage.TapAddOpportunityButton();

            AddOpportunityPage.PopulateAllFields(topicText, companyText, leaseAmount, ownerText, dbaText, shouldUseKeyboardReturnButton);

            if (!shouldUseKeyboardReturnButton)
            {
                AddOpportunityPage.TapSaveButton();
            }

            OpportunitiesPage.TapOpportunityViewCell(topicText);

            OpportunityDetailPage.WaitForPageToAppear();

            //Assert
            Assert.AreEqual(PageTitleConstants.OpportunityDetailPage, OpportunityDetailPage.Title);
        }
Пример #2
0
        public virtual void TestSetup()
        {
            App = AppInitializer.StartApp(Platform);

            OpportunitiesPage  = new OpportunitiesPage(App, Platform);
            AddOpportunityPage = new AddOpportunityPage(App, Platform);
            TermsPage          = new TermsPage(App, Platform);
        }
Пример #3
0
        public async void DeleteOpportunity(string opportunityTopic)
        {
            //Arrange

            //Act
            OpportunitiesPage.DeleteViewCell(opportunityTopic);
            await Task.Delay(1000);

            //Assert
            Assert.IsFalse(OpportunitiesPage.DoesViewCellExist(opportunityTopic));
        }
Пример #4
0
        public async Task DeleteOpportunity()
        {
            //Arrange
            const string opportunityTopic = "715003 / Investment Data Corp";

            //Act
            OpportunitiesPage.DeleteViewCell(opportunityTopic);
            await Task.Delay(1000);

            //Assert
            Assert.IsFalse(OpportunitiesPage.DoesViewCellExist(opportunityTopic));
        }
Пример #5
0
        public void ViewOpportunity(string opportunityTopic)
        {
            //Arrange
            var title = "Terms Page";

            //Act
            OpportunitiesPage.TapOpportunityViewCell(opportunityTopic);
            TermsPage.WaitForTermsPageToAppear();

            //Assert
            Assert.IsTrue(TermsPage.GetTitle().Equals(title));
        }
Пример #6
0
        public void AddNewOpportunityEmptyFields()
        {
            //Arrange

            //Act
            OpportunitiesPage.TapAddOpportunityButton();

            AddOpportunityPage.TapSaveButton();

            //Assert
            Assert.IsTrue(AddOpportunityPage.IsErrorMessageDisplayed);
        }
Пример #7
0
        public void AddNewOpportunityEmptyFields()
        {
            //Arrange

            //Act
            OpportunitiesPage.TapAddOpportunityButton();

            AddOpportunityPage.TapSaveButton();

            //Assert
            Assert.IsTrue(App.Query("OK").Length > 0);
        }
Пример #8
0
        public void CancelAddNewOpportunity(string topicText, string companyText, int leaseAmount, string ownerText, string dbaText)
        {
            //Arrange

            //Act
            OpportunitiesPage.TapAddOpportunityButton();

            AddOpportunityPage.PopulateAllFields(topicText, companyText, leaseAmount, ownerText, dbaText, false);
            AddOpportunityPage.TapCancelButton();

            //Assert
            Assert.IsFalse(OpportunitiesPage.DoesViewCellExist(topicText));
        }
Пример #9
0
        public void ViewOpportunity()
        {
            //Arrange
            const string searchString     = "05";
            const string opportunityTopic = "715005 / Investment Data Corp";

            //Act
            OpportunitiesPage.Search(searchString);
            OpportunitiesPage.TapOpportunityViewCell(opportunityTopic);
            OpportunityDetailPage.WaitForPageToAppear();

            //Assert
            Assert.AreEqual(PageTitleConstants.OpportunityDetailPage, OpportunityDetailPage.Title);
        }
Пример #10
0
        public virtual void TestSetup()
        {
            App = AppInitializer.StartApp(Platform);

            OpportunitiesPage     = new OpportunitiesPage(App, Platform);
            AddOpportunityPage    = new AddOpportunityPage(App, Platform);
            OpportunityDetailPage = new OpportunityDetailPage(App, Platform);

            App.Screenshot("App Launched");

            if (OpportunitiesPage.IsWelcomeViewVisible)
            {
                OpportunitiesPage.TapWelcomeViewOkButton();
            }
        }
Пример #11
0
        public void DeleteOpportunity(string opportunityTopic)
        {
            //Arrange

            //Act
            OpportunitiesPage.DeleteViewCell(opportunityTopic);

            //Assert
            Assert.IsFalse(OpportunitiesPage.DoesViewCellExist(opportunityTopic));

            //Act
            OpportunitiesPage.TriggerPullToRefresh();

            //Assert
            Assert.IsFalse(OpportunitiesPage.DoesViewCellExist(opportunityTopic));
        }
Пример #12
0
        public void DeleteOpportunity()
        {
            //Arrange
            const string opportunityTopic = "715005 / Investment Data Corp";

            //Act
            OpportunitiesPage.DeleteViewCell(opportunityTopic);

            //Assert
            Assert.IsFalse(OpportunitiesPage.DoesViewCellExist(opportunityTopic));

            //Act
            OpportunitiesPage.TriggerPullToRefresh();

            //Assert
            Assert.IsFalse(OpportunitiesPage.DoesViewCellExist(opportunityTopic));
        }
Пример #13
0
        public void CancelAddNewOpportunity()
        {
            //Arrange
            const string topicText   = "Test Topic";
            const string companyText = "Test Company";
            const int    leaseAmount = 123456789;
            const string ownerText   = "Test Owner";
            const string dbaText     = "Test DBA";

            //Act
            OpportunitiesPage.TapAddOpportunityButton();

            AddOpportunityPage.PopulateAllFields(topicText, companyText, leaseAmount, ownerText, dbaText, false);
            AddOpportunityPage.TapCancelButton();

            //Assert
            Assert.IsFalse(OpportunitiesPage.DoesViewCellExist(topicText));
        }
Пример #14
0
        public void AddNewOpportunity()
        {
            //Arrange
            var topicText   = "Test Topic";
            var companyText = "Test Company";
            var leaseAmount = 123456789;
            var ownerText   = "Test Owner";
            var dbaText     = "Test DBA";

            //Act
            OpportunitiesPage.TapAddOpportunityButton();

            AddOpportunityPage.PopulateAllFields(topicText, companyText, leaseAmount, ownerText, dbaText);
            AddOpportunityPage.TapSaveButton();

            OpportunitiesPage.TapOpportunityViewCell(topicText);

            TermsPage.WaitForTermsPageToAppear();

            //Assert
            Assert.IsTrue(TermsPage.GetTitle().Equals("Terms Page"));
        }
Пример #15
0
        public async Task AddNewOpportunity(bool shouldUseKeyboardReturnButton, string topicText, string companyText, int leaseAmount, string ownerText, string dbaText)
        {
            //Arrange

            //Act
            OpportunitiesPage.TapAddOpportunityButton();

            AddOpportunityPage.PopulateAllFields(topicText, companyText, leaseAmount, ownerText, dbaText, shouldUseKeyboardReturnButton);

            if (!shouldUseKeyboardReturnButton)
            {
                AddOpportunityPage.TapSaveButton();
            }

            OpportunitiesPage.TriggerPullToRefresh();
            await OpportunitiesPage.WaitForNoPullToRefreshIndicator().ConfigureAwait(false);

            OpportunitiesPage.TapOpportunityViewCell(topicText);

            OpportunityDetailPage.WaitForPageToAppear();

            //Assert
            Assert.AreEqual(PageTitleConstants.OpportunityDetailPage, OpportunityDetailPage.Title);
        }