def edit_entry(self,
                row,
                name,
                species=None,
                product=None,
                cut=None,
                whole=None,
                headless=None,
                on_on=None,
                on_off=None,
                off_on=None,
                off_off=None,
                j_cut_on=None,
                j_cut_off=None,
                butterfly=None,
                off_v=None):
     self.wait()
     self.wait_for_page()
     row.edit_row_item.click()
     edit_dialog = CategoriesEditDialog(self.webdriver)
     edit_dialog.edit_and_confirm(name, species, product, cut, whole,
                                  headless, on_on, on_off, off_on, off_off,
                                  j_cut_on, j_cut_off, butterfly, off_v)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Category edited.')
Esempio n. 2
0
 def edit_entry(self, row, name, display, sage, default_cut):
     self.wait()
     row.edit_row_item.click()
     edit_dialog = ProductsEditDialog(self.webdriver)
     edit_dialog.edit_and_confirm(name, display, sage, default_cut)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Product edited.')
Esempio n. 3
0
 def add_entry(self, name, weight=None, shipping=CheckOneBox.no):
     self.wait()
     self.add_button.click()
     add_dialog = TransportsAddDialog(self.webdriver)
     add_dialog.add_entry_and_save(name, weight, shipping)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Transport created.')
 def edit_entry(self, row, name, office):
     self.wait_for_page()
     row.edit_row_item.click()
     edit_dialog = BoatsEditDialog(self.webdriver)
     edit_dialog.edit_and_confirm(name, office)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Boat edited.')
 def add_entry(self, name, office):
     self.wait_for_page()
     self.add_button.click()
     add_dialog = BoatsAddDialog(self.webdriver)
     add_dialog.add_entry_and_save(name, office)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Boat created.')
Esempio n. 6
0
 def edit_entry(self, row, name, weight=None, shipping=CheckOneBox.no):
     self.wait()
     row.edit_row_item.click()
     edit_dialog = TransportsEditDialog(self.webdriver)
     edit_dialog.edit_and_confirm(name, weight, shipping)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Transport edited.')
Esempio n. 7
0
 def delete_row(self, row):
     self.wait()
     row.delete_row_item.click()
     delete_dialog = ConfirmDeleteDialog(self.webdriver)
     delete_dialog.confirm_delete.click()
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Transport deleted.')
Esempio n. 8
0
 def add_entry(self, name, display, sage, default_cut):
     self.wait()
     self.add_button.click()
     add_dialog = ProductsAddDialog(self.webdriver)
     add_dialog.add_entry_and_save(name, display, sage, default_cut)
     self.wait_for_page()
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Product created.')
Esempio n. 9
0
 def edit_entry(self, row, customer, transport, product, cut, quantity,
                weight, price):
     self.wait_for_page()
     row.edit_row_item.click()
     edit_dialog = SalesAllEditDialog(self.webdriver)
     edit_dialog.edit_and_confirm(customer, transport, product, cut,
                                  quantity, weight, price)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Customer edited.')
Esempio n. 10
0
 def add_entry(self, customer, transport, product, cut, quantity, weight,
               price):
     self.wait()
     self.add_button.click()
     add_dialog = SalesAllAddDialog(self.webdriver)
     add_dialog.add_entry_and_save(customer, transport, product, cut,
                                   quantity, weight, price)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Sale created.')
Esempio n. 11
0
 def add_entry(self, date, no_boxes, kg, cost, species, market, market_door,
               boat):
     self.wait()
     self.add_button.click()
     add_dialog = PurchasesAddDialog(self.webdriver)
     add_dialog.add_entry_and_save(date, no_boxes, kg, cost, species,
                                   market, market_door, boat)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Purchase created.')
Esempio n. 12
0
 def edit_entry(self, row, date, no_boxes, kg, cost, species, market,
                market_door, boat):
     self.wait()
     self.wait_for_page()
     row.edit_row_item.click()
     edit_dialog = PurchasesEditDialog(self.webdriver)
     edit_dialog.edit_and_confirm(date, no_boxes, kg, cost, species, market,
                                  market_door, boat)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Purchase edited.')
Esempio n. 13
0
 def add_entry(self,
               name,
               number_of_doors,
               delivery_time=None,
               market_cost=None):
     self.wait()
     self.add_button.click()
     add_dialog = MarketsAddDialog(self.webdriver)
     add_dialog.add_entry_and_save(name, number_of_doors, delivery_time,
                                   market_cost)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Market created.')
Esempio n. 14
0
 def edit_entry(self,
                row,
                name,
                number_of_doors,
                delivery_time=None,
                market_cost=None):
     self.wait()
     row.edit_row_item.click()
     edit_dialog = MarketsEditDialog(self.webdriver)
     edit_dialog.edit_and_confirm(name, number_of_doors, delivery_time,
                                  market_cost)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Market edited.')
 def add_entry(self,
               name,
               sage_code,
               display=None,
               transport=None,
               currency=Currency.Pound,
               weight=Weight.Kg,
               hygiene=False):
     self.wait_for_page()
     self.add_button.click()
     add_dialog = CustomersAddDialog(self.webdriver)
     add_dialog.add_entry_and_save(name, sage_code, display, transport,
                                   currency, weight, hygiene)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Customer created.')
 def edit_entry(self,
                row,
                name,
                sage_code,
                display=None,
                transport=None,
                currency=Currency.Pound,
                weight=Weight.Kg,
                hygiene=False):
     self.wait_for_page()
     row.edit_row_item.click()
     edit_dialog = CustomersEditDialog(self.webdriver)
     edit_dialog.edit_and_confirm(name, sage_code, display, transport,
                                  currency, weight, hygiene)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Customer edited.')
 def add_entry(self,
               first_name,
               last_name,
               email,
               password,
               role=None,
               market=None):
     self.wait()
     self.add_button.click()
     add_dialog = UsersAddDialog(self.webdriver)
     if market == None:
         add_dialog.add_entry_and_save(first_name, last_name, email,
                                       password, role)
     else:
         add_dialog.add_entry_and_save(first_name, last_name, email,
                                       password, role, market)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('User created.')
 def edit_entry(self,
                row,
                first_name,
                last_name,
                email,
                password,
                role=None,
                market=None):
     self.wait()
     self.wait_for_page()
     row.edit_row_item.click()
     edit_dialog = UsersEditDialog(self.webdriver)
     if market == None:
         edit_dialog.edit_and_confirm(first_name, last_name, email,
                                      password, role)
     else:
         edit_dialog.edit_and_confirm(first_name, last_name, email,
                                      password, role, market)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('User edited.')
 def add_entry(self,
               name,
               species=None,
               product=None,
               cut=None,
               whole=None,
               headless=None,
               on_on=None,
               on_off=None,
               off_on=None,
               off_off=None,
               j_cut_on=None,
               j_cut_off=None,
               butterfly=None,
               off_v=None):
     self.wait()
     self.add_button.click()
     add_dialog = CategoriesAddDialog(self.webdriver)
     add_dialog.add_entry_and_save(name, species, product, cut, whole,
                                   headless, on_on, on_off, off_on, off_off,
                                   j_cut_on, j_cut_off, butterfly, off_v)
     confirmation_dialog = ConfirmationMessageDialog(self.webdriver)
     confirmation_dialog.ok_button.click()
     PrintMessage('Category created.')