Beispiel #1
0
        public void Design_CopyAction_IsNotAbleToDo_IfRetired(string templateName, Dictionary <string, bool> settings)
        {
            //step 1: prepare product from admin
            AdminLoginStep(AdminAccount);
            _adminProducts.Open();
            _adminProducts.CloneToNewProduct(templateName, RetiredPrefix);

            //step 2: user create design
            LoginStep(_returnPage);
            CreateDocumentStep($"{RetiredPrefix}{templateName}");

            //step 3: admin retired this product
            AdminLoginStep(AdminAccount);
            _adminProducts.Open();
            _adminProducts.RetireProduct($"{RetiredPrefix}{templateName}");

            //step 4: verify design actions
            LoginStep(_returnPage);

            var label = _myDesign.GetRetiredOrDeletedLabel($"{RetiredPrefix}{templateName}_{_designNamePrefix}");

            Assert.IsTrue(label.IsEquals("product retired"), "This design must be mark as Product Retired");

            var cloneable = _myDesign.CheckDesignCloneable($"{RetiredPrefix}{templateName}_{_designNamePrefix}");

            Assert.IsFalse(cloneable, "Can not clone new design from design when the product has been retired");
        }