Exemplo n.º 1
0
        private void productToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ProductListForm productListForm = new ProductListForm();

            productListForm.MdiParent = this;
            productListForm.Show();
        }
Exemplo n.º 2
0
        private void Main_Load(object sender, EventArgs e)
        {
            userNameLabel.Text = user.userName;
            var productListForm = new ProductListForm(user);

            productListForm.MdiParent = this;
            productListForm.Show();
        }
Exemplo n.º 3
0
 private void toolStripMenuItem3_Click(object sender, EventArgs e)
 {
     _productListForm = new ProductListForm
     {
         WindowState = FormWindowState.Maximized,
         MdiParent   = this
     };
     _productListForm.Show();
 }
Exemplo n.º 4
0
        private void ViewListToolStripMenuItem_Click(object sender, EventArgs e)
        {
            panelMainContainer.Controls.Clear();
            ProductListForm productListForm = new ProductListForm();

            productListForm.TopLevel = false;
            panelMainContainer.Controls.Add(productListForm);
            productListForm.Show();
        }
        private void ActionsOnAutomationPractice()
        {
            AqualityServices.Browser.Quit();
            OpenAutomationPracticeSite();
            AqualityServices.Browser.Maximize();
            var sliderForm = new SliderForm();

            Assert.IsTrue(sliderForm.State.WaitForDisplayed(), "Slider Form is not opened");

            sliderForm.ClickNextButton();
            sliderForm.ClickNextButton();
            var productListForm = new ProductListForm();

            Assert.AreEqual(ExpectedNumdberOfProducts, productListForm.GetNumberOfProductsInContainer(), "Number of products is incorrect");

            productListForm.AddRandomProductToCart();
            var proceedToCheckoutModal = new ProceedToCheckoutModal();

            proceedToCheckoutModal.ClickProceedToCheckoutButton();
            var shoppingCardSummaryForm = new ShoppingCardSummaryForm();

            shoppingCardSummaryForm.ClickPlusButton();
            var actualQuantity = shoppingCardSummaryForm.WaitForQuantityAndGetValue(ExpectedQuantity);

            Assert.AreEqual(ExpectedQuantity, actualQuantity, "Quantity is incorrect");

            shoppingCardSummaryForm.ClickProceedToCheckoutButton();
            var authForm = new AuthenticationForm();

            Assert.IsTrue(authForm.State.WaitForDisplayed(), "Authentication Form is not opened");

            var cartMenuForm = new CartMenuForm();

            cartMenuForm.OpenCartMenu();
            cartMenuForm.ClickCheckoutButton();

            shoppingCardSummaryForm.ClickProceedToCheckoutButton();
            authForm.SetEmail(Email);
            authForm.ClickCreateAccountButton();

            var personalInfoForm = new YourPersonalInfoForm();

            personalInfoForm.SelectGender(Gender);
            personalInfoForm.SetFirstName(FirstName);
            var actualNumberOfDays = personalInfoForm.GetNumberOfDays();

            Assert.AreEqual(ExpectedNumberOfDays, actualNumberOfDays, "Number of days from combobox is incorrect");

            personalInfoForm.SelectState(State);
            personalInfoForm.SelectDay(DayToSelect);
            Assert.IsFalse(personalInfoForm.IsNewsCheckBoxChecked(), "News checkbox state is not correct");

            personalInfoForm.SetNewsCheckBox();
            Assert.IsTrue(personalInfoForm.IsNewsCheckBoxChecked(), "News checkbox state is not correct");
        }
        public void Should_BePossibleTo_MoveToElement()
        {
            OpenAutomationPracticeSite();
            var productList = new ProductListForm();

            productList.NavigateToLastProduct();

            var product = new ProductForm();

            product.GetLastProductView().MouseActions.MoveToElement();
            var classAttribute = product.GetLastProductView().GetAttribute("class");

            Assert.IsTrue(classAttribute.Contains("shown"), "Product view should be shown after move mouse");
        }
Exemplo n.º 7
0
 private void ProductListForm_ItemClick(object sender, ItemClickEventArgs e)
 {
     try
     {
         ProductListForm xform1 = new ProductListForm(_FlexSys)
         {
             MdiParent = this
         };
         xform1.Show();
     }
     catch (Exception ex)
     {
         DisplayError(ex);
     }
 }
Exemplo n.º 8
0
        public void Should_BePossibleTo_SetFocus()
        {
            OpenAutomationPracticeSite();
            var productList = new ProductListForm();

            productList.NavigateToLastProduct();

            var product      = new ProductForm();
            var currentText  = product.TxtQuantity.Value;
            var expectedText = currentText.Remove(currentText.Length - 1);

            product.TxtQuantity.JsActions.SetFocus();
            product.TxtQuantity.SendKeys(Keys.Delete);
            product.TxtQuantity.SendKeys(Keys.Backspace);
            Assert.AreEqual(expectedText, product.TxtQuantity.Value, $"One character should be removed from '{currentText}'");
        }
Exemplo n.º 9
0
 private void nvbProducts_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
 {
     if (currentUse != null)
     {
         ProductListForm frm = new ProductListForm {
             MdiParent = this, WindowState = FormWindowState.Maximized
         };
         frm.SetCurrentMember(currentUse);
         frm.Show();
     }
     else
     {
         if (MessageBox.Show("You must login!", "Error!", MessageBoxButtons.YesNo, MessageBoxIcon.Error) == DialogResult.Yes)
         {
             nvbLogIn_LinkClicked(null, null);
         }
     }
 }
Exemplo n.º 10
0
        private void button2_Click(object sender, EventArgs e)
        {
            var form = new ProductListForm();

            form.ShowDialog(this);
        }