Пример #1
0
    def create_case(self, mozwebqa, status='active', product=None, version=None, suite_name=None):
        create_case_pg = MozTrapCreateCasePage(mozwebqa)

        if product is None:
            product = self.create_product(mozwebqa)
            version = product['version']
        elif version is None:
            version = product['version']

        create_case_pg.go_to_create_case_page()
        case = create_case_pg.create_case(product=product['name'], version=version['name'], status=status, suite=suite_name)
        case['product'] = product

        return case
Пример #2
0
    def create_case(self, mozwebqa, product, api=None, mock_case=None):
        if api is not None:
            case = MockCase()
            api.create_case(case, product)
        else:
            mock_case = mock_case or MockCase()
            mock_case['product'] = product
            mock_case['version'] = product['version']

            create_case_pg = MozTrapCreateCasePage(mozwebqa)
            create_case_pg.go_to_create_case_page()
            case = create_case_pg.create_case(mock_case)

        return case
Пример #3
0
    def create_case(self, mozwebqa, product, use_API, mock_case=None):
        if use_API:
            credentials = mozwebqa.credentials['default']
            case = MockCase()
            api = MoztrapAPI(credentials['api_user'], credentials['api_key'], mozwebqa.base_url)
            api.create_case(case, product)
        else:
            mock_case = mock_case or MockCase()
            mock_case['product'] = product
            mock_case['version'] = product['version']

            create_case_pg = MozTrapCreateCasePage(mozwebqa)
            create_case_pg.go_to_create_case_page()
            case = create_case_pg.create_case(mock_case)

        return case
Пример #4
0
    def create_case(self, mozwebqa, product, use_API, status='active', version=None, suite_name=None):
        if use_API:
            credentials = mozwebqa.credentials['default']
            case = MockCase()
            api = MoztrapAPI(credentials['api_user'], credentials['api_key'], mozwebqa.base_url)
            api.create_case(case, product)
        else:
            create_case_pg = MozTrapCreateCasePage(mozwebqa)

            if version is None:
                version = product['version']

            create_case_pg.go_to_create_case_page()
            case = create_case_pg.create_case(product=product['name'], version=version['name'], status=status, suite=suite_name)
            case['product'] = product

        return case
Пример #5
0
    def create_case(self,
                    mozwebqa,
                    product,
                    use_API,
                    status='active',
                    version=None,
                    suite_name=None):
        if use_API:
            credentials = mozwebqa.credentials['default']
            case = MockCase()
            api = MoztrapAPI(credentials['api_user'], credentials['api_key'],
                             mozwebqa.base_url)
            api.create_case(case, product)
        else:
            create_case_pg = MozTrapCreateCasePage(mozwebqa)

            if version is None:
                version = product['version']

            create_case_pg.go_to_create_case_page()
            case = create_case_pg.create_case(product=product['name'],
                                              version=version['name'],
                                              status=status,
                                              suite=suite_name)
            case['product'] = product

        return case
Пример #6
0
    def create_case(self, mozwebqa, status='active', product=None, version=None, suite_name=None):
        create_case_pg = MozTrapCreateCasePage(mozwebqa)

        if product is None:
            product = self.create_product(mozwebqa)
            version = product['version']
        elif version is None:
            version = product['version']

        create_case_pg.go_to_create_case_page()
        case = create_case_pg.create_case(product=product['name'], version=version['name'], status=status, suite=suite_name)
        case['product'] = product

        return case
Пример #7
0
    def create_case(self, mozwebqa, product, use_API, mock_case=None):
        if use_API:
            credentials = mozwebqa.credentials['default']
            case = MockCase()
            api = MoztrapAPI(credentials['api_user'], credentials['api_key'],
                             mozwebqa.base_url)
            api.create_case(case, product)
        else:
            mock_case = mock_case or MockCase()
            mock_case['product'] = product
            mock_case['version'] = product['version']

            create_case_pg = MozTrapCreateCasePage(mozwebqa)
            create_case_pg.go_to_create_case_page()
            case = create_case_pg.create_case(mock_case)

        return case
Пример #8
0
 def click_create_case_button(self):
     self.find_element(*self._create_case_button_locator).click()
     from pages.create_case_page import MozTrapCreateCasePage
     return MozTrapCreateCasePage(self.testsetup)
Пример #9
0
        manage_suites_pg.go_to_manage_suites_page()
        manage_suites_pg.filter_form.filter_by(lookup='name',
                                               value=suite['name'])
        manage_suites_pg.delete_suite(name=suite['name'])

    def create_case(self, mozwebqa, product, api=None, mock_case=None):
        if api is not None:
            case = MockCase()
            api.create_case(case, product)
        else:
            mock_case = mock_case or MockCase()
            mock_case['product'] = product
            mock_case['version'] = product['version']

            create_case_pg = MozTrapCreateCasePage(mozwebqa)
            create_case_pg.go_to_create_case_page()
            case = create_case_pg.create_case(mock_case)

        return case

    def delete_case(self, mozwebqa, case):
        manage_cases_pg = MozTrapManageCasesPage(mozwebqa)

        manage_cases_pg.go_to_manage_cases_page()
        manage_cases_pg.filter_form.filter_by(lookup='name',
                                              value=case['name'])
        manage_cases_pg.delete_case(name=case['name'])

    def create_profile(self, mozwebqa):
        create_profile_pg = MozTrapCreateProfilePage(mozwebqa)
    def create_case(self,
                    base_url,
                    selenium,
                    product,
                    api=None,
                    mock_case=None):
        if api is not None:
            case = MockCase()
            api.create_case(case, product)
        else:
            mock_case = mock_case or MockCase()
            mock_case['product'] = product
            mock_case['version'] = product['version']

            create_case_pg = MozTrapCreateCasePage(base_url, selenium)
            create_case_pg.go_to_create_case_page()
            case = create_case_pg.create_case(mock_case)

        return case

    def delete_case(self, base_url, selenium, case):
        manage_cases_pg = MozTrapManageCasesPage(base_url, selenium)

        manage_cases_pg.go_to_manage_cases_page()
        manage_cases_pg.filter_form.filter_by(lookup='name',
                                              value=case['name'])
        manage_cases_pg.delete_case(name=case['name'])

    def create_profile(self, base_url, selenium):
        create_profile_pg = MozTrapCreateProfilePage(base_url, selenium)