Beispiel #1
0
            public void ReturnWithOutSave()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC03_ReturnWithoutSave");

                strTestCaseNo = "TC003_Reg";
                string[] testDataOrgGroup = FetchTestData(strTestCaseNo);

                string orgGroup      = testDataOrgGroup[3];
                string breakDuration = testDataOrgGroup[5];

                FpOrganisationGroupSettingsPage.NavigateToOrgGroupSettingsPage();
                Thread.Sleep(3000);

                FpOrganisationGroupSettingsPage.ClickEditOrgGroup(orgGroup);
                Thread.Sleep(3000);
                FpOrganisationGroupSettingsPage.ClearBreakDuration();
                Thread.Sleep(2000);
                FpOrganisationGroupSettingsPage.ClickReturn();
                Thread.Sleep(3000);

                string confirmationMsg = FpOrganisationGroupSettingsPage.GetConfirmationText();
                string expectedMsg     = "Any unsaved changes will be lost. Are you sure?";

                try
                {
                    Assert.AreEqual(confirmationMsg, expectedMsg);
                    PropertiesCollection.test.Log(Status.Pass, "Validation for confirmation message received when Return button is clicked without Save is successful");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Validation for confirmation message received when Return button is clicked without Save is not successful");
                }

                FpOrganisationGroupSettingsPage.ClickConfirmationCancel();
                Thread.Sleep(2000);

                FpOrganisationGroupSettingsPage.EnterBreakDuration(breakDuration);
                Thread.Sleep(2000);

                FpOrganisationGroupSettingsPage.ClickSave();
                Thread.Sleep(3000);
            }
            public void TS01_TC02_ValidateFlightProAdminMenus()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TS01_TC02_ValidateFlightProAdminMenus");

                /* Validate Strip Sub Groups Page */

                FpAdminMenus AdminMenu = new FpAdminMenus();

                AdminMenu.AdminClick();
                AdminMenu.StripSubGroupsClick();
                System.Threading.Thread.Sleep(30000);
                FpStripSubGroupsPage StripSubGroups = new FpStripSubGroupsPage();

                try
                {
                    Assert.IsTrue(StripSubGroups.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Strip Sub Groups Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Strip Sub Groups Page not loaded");
                    throw;
                }

                /* Validate Catalogue Administration Page */

                AdminMenu.AdminClick();
                AdminMenu.CatalogueAdministrationClick();
                System.Threading.Thread.Sleep(30000);
                FpCatalogueAdministrationPage CatalogueAdministration = new FpCatalogueAdministrationPage();

                try
                {
                    Assert.IsTrue(CatalogueAdministration.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Catalogue Administration Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Catalogue Administration Page not loaded");
                    throw;
                }

                /* Validate Organisation Group Settings Page */

                AdminMenu.AdminClick();
                AdminMenu.OrganisationGroupSettingsClick();
                System.Threading.Thread.Sleep(30000);
                FpOrganisationGroupSettingsPage OrganisationGroupSettings = new FpOrganisationGroupSettingsPage();

                try
                {
                    Assert.IsTrue(OrganisationGroupSettings.IsTitleDisplayed());
                    PropertiesCollection.test.Log(Status.Pass, "Organisation Group Settings Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Organisation Group Settings Page not loaded");
                    throw;
                }

                /* Validate Budget Administration Page */

                AdminMenu.AdminClick();
                AdminMenu.BudgetAdministrationClick();
                System.Threading.Thread.Sleep(30000);
                FpBudgetAdministrationPage BudgetAdministration = new FpBudgetAdministrationPage();

                try
                {
                    Assert.IsTrue(BudgetAdministration.title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Budget Administration Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Budget Administration Page not loaded");
                    throw;
                }

                /* Validate Asset Type Settings Page */

                AdminMenu.AdminClick();
                AdminMenu.AssetTypeSettingsClick();
                System.Threading.Thread.Sleep(30000);
                FpAssetTypeSettingsPage AssetTypeSettings = new FpAssetTypeSettingsPage();

                try
                {
                    Assert.IsTrue(AssetTypeSettings.title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Asset Type Settings Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Asset Type Settings Page not loaded");
                    throw;
                }

                /* Validate Asset Type Systems Page */

                System.Threading.Thread.Sleep(30000);
                AdminMenu.AdminClick();
                AdminMenu.AssetTypeSystemsClick();
                System.Threading.Thread.Sleep(30000);
                FpAssetTypeSystemsPage AssetTypeSystems = new FpAssetTypeSystemsPage();

                try
                {
                    Assert.IsTrue(AssetTypeSystems.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Asset Type Systems Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Asset Type Systems Page not loaded");
                    throw;
                }

                /* Validate Roster Administration Page */


                AdminMenu.AdminClick();
                AdminMenu.RosterAdministrationClick();
                System.Threading.Thread.Sleep(30000);
                FpRosterAdministrationPage RosterAdministration = new FpRosterAdministrationPage();

                try
                {
                    Assert.IsTrue(RosterAdministration.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Roster Administration Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Roster Administration Page not loaded");
                    throw;
                }

                /* Validate Shift Administration Page */

                AdminMenu.AdminClick();
                AdminMenu.ShiftAdministrationClick();
                System.Threading.Thread.Sleep(30000);
                FpShiftAdministrationPage ShiftAdministration = new FpShiftAdministrationPage();

                try
                {
                    Assert.IsTrue(ShiftAdministration.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Shift Administration Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Shift Administration Page not loaded");
                    throw;
                }

                /* Validate Templates Page */

                AdminMenu.AdminClick();
                AdminMenu.TemplatesClick();
                System.Threading.Thread.Sleep(30000);
                FpTemplatesPage Templates = new FpTemplatesPage();

                try
                {
                    Assert.IsTrue(Templates.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Templates Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Templates Page not loaded");
                    throw;
                }

                /* Validate Syllabi Page */

                AdminMenu.AdminClick();
                AdminMenu.SyllabiClick();
                System.Threading.Thread.Sleep(30000);
                FpSyllabiPage Syllabi = new FpSyllabiPage();

                try
                {
                    Assert.IsTrue(Syllabi.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Syllabi Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Syllabi Page not loaded");
                    throw;
                }

                /* Validate Courses Page */

                AdminMenu.AdminClick();
                AdminMenu.CoursesClick();
                System.Threading.Thread.Sleep(30000);
                FpCoursesPage Courses = new FpCoursesPage();

                try
                {
                    Assert.IsTrue(Courses.Title.Displayed);
                    PropertiesCollection.test.Log(Status.Pass, "Courses Page loaded");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Courses Page not loaded");
                    throw;
                }
            }
Beispiel #3
0
            public void EditOrgGroupSettings()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC01_EditAssetSystem");

                strTestCaseNo = "TC001_Reg";
                string[] testDataOrgGroup = FetchTestData(strTestCaseNo);

                string orgGroup              = testDataOrgGroup[3];
                string durationFormat        = testDataOrgGroup[4];
                string breakDuration         = testDataOrgGroup[5];
                string maxConsecutiveTasking = testDataOrgGroup[6];
                string standDown             = testDataOrgGroup[7];
                string acknowledgementTime   = testDataOrgGroup[8];
                string acknowledgementFor    = testDataOrgGroup[9];
                string peopleGroup           = testDataOrgGroup[10];

                FpOrganisationGroupSettingsPage.EditOrgGroupSettings(orgGroup, durationFormat, breakDuration, maxConsecutiveTasking, standDown, acknowledgementTime, acknowledgementFor, peopleGroup);

                Thread.Sleep(5000);

                string[] webData = FpOrganisationGroupSettingsPage.FetchValuesAfterEdit(orgGroup);

                try
                {
                    Assert.AreEqual(webData[0], breakDuration);
                    PropertiesCollection.test.Log(Status.Pass, "Editing of Break Duration value is successful");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Editing of Break Duration value is not successful");
                }
                try
                {
                    Assert.AreEqual(webData[1], maxConsecutiveTasking);
                    PropertiesCollection.test.Log(Status.Pass, "Editing of Max ConsecutiveTasking value is successful");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Editing of Max ConsecutiveTasking value is not successful");
                }
                try
                {
                    Assert.AreEqual(webData[2], standDown);
                    PropertiesCollection.test.Log(Status.Pass, "Editing of Stand down value is successful");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Editing of Stand down value is not successful");
                }
                try
                {
                    Assert.AreEqual(webData[3], "Yes");
                    PropertiesCollection.test.Log(Status.Pass, "Editing of Currency Audit value is successful");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Editing of Currency Audit value is not successful");
                }
                try
                {
                    Assert.AreEqual(webData[4], "Yes");
                    PropertiesCollection.test.Log(Status.Pass, "Editing of Event Acknowledgement value is successful");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Editing of Event Acknowledgement value is not successful");
                }
            }
Beispiel #4
0
            public void VerifyErrorMessage()
            {
                PropertiesCollection.test = PropertiesCollection.extent.CreateTest("TC02_VerifyErrorMessage");

                strTestCaseNo = "TC002_Reg";
                string[] testDataOrgGroup = FetchTestData(strTestCaseNo);

                string orgGroup            = testDataOrgGroup[3];
                string acknowledgementTime = testDataOrgGroup[8];
                string acknowledgementFor  = testDataOrgGroup[9];

                FpOrganisationGroupSettingsPage.NavigateToOrgGroupSettingsPage();
                Thread.Sleep(3000);

                FpOrganisationGroupSettingsPage.ClickEditOrgGroup(orgGroup);
                Thread.Sleep(3000);

                FpOrganisationGroupSettingsPage.ClearAcknowledgementTime();
                FpOrganisationGroupSettingsPage.ClickBreakDuration();
                Thread.Sleep(2000);

                string errorMsg    = FpOrganisationGroupSettingsPage.GetErrorMessageForAckTime();
                string expectedMsg = "An Acknowledgement Time is required.";

                try
                {
                    Assert.AreEqual(errorMsg, expectedMsg);
                    PropertiesCollection.test.Log(Status.Pass, "Validation for error message thrown when Acknowledgement time is null is successful");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Validation for error message thrown when Acknowledgement time is null is not successful");
                }

                FpOrganisationGroupSettingsPage.EnterAcknowledgementTime(acknowledgementTime);
                Thread.Sleep(2000);

                FpOrganisationGroupSettingsPage.ClearAcknowledgementDays();
                FpOrganisationGroupSettingsPage.ClickBreakDuration();
                Thread.Sleep(2000);

                errorMsg    = FpOrganisationGroupSettingsPage.GetErrorMessageForAckFor();
                expectedMsg = "An Acknowledgement For is required.";

                try
                {
                    Assert.AreEqual(errorMsg, expectedMsg);
                    PropertiesCollection.test.Log(Status.Pass, "Validation for error message thrown when Acknowledgement for is null is successful");
                }
                catch
                {
                    PropertiesCollection.test.Log(Status.Fail, "Validation for error message thrown when Acknowledgement for is null is not successful");
                }

                FpOrganisationGroupSettingsPage.EnterAcknowledgementDays(acknowledgementFor);
                Thread.Sleep(2000);

                FpOrganisationGroupSettingsPage.ClickSave();

                Thread.Sleep(2000);
            }