Exemplo n.º 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);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
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();
            }
        }
Exemplo n.º 4
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);
        }