Пример #1
0
 public void b03_Document_Delete_Version_button_7482()
 {
     CommonSection.CreteNewDocuemnt(DocumentTitle + "TC7482");
     _test.Log(Status.Info, "Create a Document");
     AdminContentDetailsPage.EditVersioning_Enabled("1.0");
     _test.Log(Status.Info, "Enable versioning by adding values");
     VersionsPage.Click_Back();
     Assert.IsTrue(AdminContentDetailsPage.VerifyAddVersionButton());
     _test.Log(Status.Pass, "Verify Add version Button is Displayed");
     AdminContentDetailsPage.AddVersion();
     _test.Log(Status.Info, "`Click Add Version");
     StringAssert.AreEqualIgnoringCase("The new version was added for the content item.", AdminContentDetailsPage.VerifyNewVersionSuccessMessage());
     _test.Log(Status.Pass, "Verify New Version Success Message");
     Assert.IsTrue(AdminContentDetailsPage.VerifyAddVersionButton());
     _test.Log(Status.Pass, "Verify Add version Button is Displayed");
     Assert.IsTrue(AdminContentDetailsPage.VerifyDeleteVersionButton());
     _test.Log(Status.Pass, "Verify Delete version Button is Displayed");
     Assert.IsTrue(AdminContentDetailsPage.VerifyManageVersionButton());
     _test.Log(Status.Pass, "Verify Manage version Button is Displayed");
     AdminContentDetailsPage.DeleteVesion("Version 1.1 English (United States)");
     _test.Log(Status.Info, "Delete Version from Dropdown list using Delete Button");
     StringAssert.AreEqualIgnoringCase("The version was deleted.", AdminContentDetailsPage.VerifyDeleteVersionSuccessMessage());
     _test.Log(Status.Pass, "Verify Delete Version Success Message");
     //Assert.IsFalse(AdminContentDetailsPage.VerifyAddVersionButton());
     //_test.Log(Status.Pass, "Verify Add version Button is Displayed");
     Assert.IsTrue(AdminContentDetailsPage.VerifyAddVersionButton());
     _test.Log(Status.Pass, "Verify Add version Button is Displayed");
     Assert.IsFalse(AdminContentDetailsPage.VerifyDeleteVersionButton());
     _test.Log(Status.Pass, "Verify Add version Button is Displayed");
     Assert.IsFalse(AdminContentDetailsPage.VerifyManageVersionButton());
     _test.Log(Status.Pass, "Verify Add version Button is Displayed");
 }
        [Test, Order(02)]//Document
        public void P20_1_z03_Document_Enable_Versioning_7480()
        {
            CommonSection.Logout();
            LoginPage.LoginAs("").WithPassword("").Login();
            CommonSection.CreteNewDocuemnt(DocumentTitle + "TC7480");
            _test.Log(Status.Info, "Create a Document");
            AdminContentDetailsPage.EditVersioning_Enabled("1.0");
            _test.Log(Status.Info, "Enable versioning by adding values");
            Assert.IsTrue(Driver.comparePartialString("Versioning is now enabled for this item; however," +
                                                      " information cannot be edited for this version because either users had progress against it before versioning was enabled, " +
                                                      "or the effective date has been reached.", VersionsPage.VerifyVersionEnableMessage()));
            _test.Log(Status.Pass, "Verify version enabling message");

            Assert.IsTrue(Driver.comparePartialString(" This information cannot be edited for this version because either users" +
                                                      " had progress against it before versioning was enabled, or the effective date has been reached.", VersionsPage.VerifyVersionAlertMessage()));
            _test.Log(Status.Pass, "Verify version Locking message");

            //string version = VersionsPage.VersionNo();
            VersionsPage.Click_Back();

            Assert.IsTrue(AdminContentDetailsPage.VerifyVersion(version));
            _test.Log(Status.Pass, "Verify version");
            Assert.IsTrue(AdminContentDetailsPage.VerifyAddVersionButton());
            _test.Log(Status.Pass, "Verify Add version Button is Displayed");
        }
        public void P20_1_z05_General_Course_Enable_Versioning_7476()
        {
            CommonSection.CreateGeneralCourse(generalcoursetitle + "TC7476");
            _test.Log(Status.Info, "Create a general Course");
            AdminContentDetailsPage.EditVersioning_Enabled("1.0");
            _test.Log(Status.Info, "Enable versioning by adding values");
            Assert.IsTrue(Driver.comparePartialString("Versioning is now enabled for this item; however," +
                                                      " information cannot be edited for this version because either users had progress against it before versioning was enabled, " +
                                                      "or the effective date has been reached.", VersionsPage.VerifyVersionEnableMessage()));
            _test.Log(Status.Pass, "Verify version enabling message");

            Assert.IsTrue(Driver.comparePartialString(" This information cannot be edited for this version because either users" +
                                                      " had progress against it before versioning was enabled, or the effective date has been reached.", VersionsPage.VerifyVersionAlertMessage()));
            _test.Log(Status.Pass, "Verify version Locking message");

            // string version = VersionsPage.VersionNo();
            VersionsPage.Click_Back();

            Assert.IsTrue(AdminContentDetailsPage.VerifyVersion(version));
            _test.Log(Status.Pass, "Verify version");
            Assert.IsTrue(AdminContentDetailsPage.VerifyAddVersionButton());
            _test.Log(Status.Pass, "Verify Add version Button is Displayed");
        }