Beispiel #1
0
    def test_remove_domain_1(self, domain):
        """@test: Add a domain to an organization and remove it by organization
        name and domain name.

        @feature: Organizations Disassociate domain.

        @assert: the domain is removed from the organization

        """
        strategy, value = common_locators["entity_select"]
        strategy1, value1 = common_locators["entity_deselect"]
        org_name = generate_string("alpha", 8)
        with Session(self.browser) as session:
            make_domain(session, name=domain)
            self.assertIsNotNone(self.domain.search(domain))
            make_org(session, org_name=org_name, domains=[domain],
                     edit=True)
            self.org.search(org_name).click()
            session.nav.wait_until_element(
                tab_locators["context.tab_domains"]).click()
            element = session.nav.wait_until_element((strategy1,
                                                      value1 % domain))
            # Item is listed in 'Selected Items' list and not 'All Items' list.
            self.assertIsNotNone(element)
            self.org.update(org_name, domains=[domain])
            self.org.search(org_name).click()
            session.nav.wait_until_element(
                tab_locators["context.tab_domains"]).click()
            element = session.nav.wait_until_element((strategy,
                                                      value % domain))
            # Item is listed in 'All Items' list and not 'Selected Items' list.
            self.assertIsNotNone(element)
Beispiel #2
0
    def test_remove_domain_parameter(self):
        """@Test: Remove a selected domain parameter

        @Feature: Domain - Misc

        @Assert: Domain parameter is removed

        """
        with Session(self.browser) as session:
            for name in generate_strings_list(length=4):
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    param_name = gen_string('alpha', 3)
                    param_value = gen_string('alpha', 3)
                    make_domain(
                        session, name=domain_name, description=description)
                    element = self.domain.search(domain_name)
                    self.assertIsNotNone(element)
                    try:
                        self.domain.set_domain_parameter(
                            description, param_name, param_value)
                        self.domain.remove_domain_parameter(
                            description, param_name)
                    except UIError as err:
                        self.fail(err)
Beispiel #3
0
    def test_negative_set_parameter(self):
        """Set a parameter in a domain with 256 chars in name and value.

        @id: 1c647d66-6a3f-4d88-8e6b-60f2fc7fd603

        @Assert: Domain parameter is not updated.

        @CaseLevel: Integration
        """
        name = gen_string('alpha', 4)
        domain_name = description = DOMAIN % name
        param_name = gen_string('alpha', 256)
        param_value = gen_string('alpha', 256)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description)
            self.assertIsNotNone(element)
            try:
                self.domain.set_domain_parameter(description, param_name,
                                                 param_value)
            except UIError as err:
                self.fail(err)
            self.assertIsNotNone(
                session.nav.wait_until_element(
                    common_locators['common_param_error']))
Beispiel #4
0
    def test_set_domain_parameter_negative_2(self):
        """@Test: Again set the same parameter for domain with name and value.

        @Feature: Domain - Misc.

        @Assert: Domain parameter is not updated.

        @BZ: 1123360

        """
        name = gen_string("alpha", 4)
        domain_name = description = DOMAIN % name
        param_name = gen_string("alpha", 8)
        param_value = gen_string("alpha", 8)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description)
            self.assertIsNotNone(element)
            try:
                self.domain.set_domain_parameter(description, param_name,
                                                 param_value)
                self.domain.set_domain_parameter(description, param_name,
                                                 param_value)
            except Exception as e:
                self.fail(e)
            self.assertIsNotNone(session.nav.wait_until_element(
                common_locators["common_param_error"]))
Beispiel #5
0
    def test_negative_set_parameter_same(self):
        """Again set the same parameter for domain with name and value.

        @id: 6266f12e-cf94-4564-ba26-b467ced2737f

        @Assert: Domain parameter is not updated.

        @BZ: 1123360

        @CaseLevel: Integration
        """
        name = gen_string('alpha', 4)
        domain_name = description = DOMAIN % name
        param_name = gen_string('alpha', 8)
        param_value = gen_string('alpha', 8)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description)
            self.assertIsNotNone(element)
            try:
                self.domain.set_domain_parameter(description, param_name,
                                                 param_value)
                self.domain.set_domain_parameter(description, param_name,
                                                 param_value)
            except UIError as err:
                self.fail(err)
            self.assertIsNotNone(
                session.nav.wait_until_element(
                    common_locators['common_param_error']))
Beispiel #6
0
    def test_negative_set_parameter_same(self):
        """@Test: Again set the same parameter for domain with name and value.

        @Feature: Domain - Misc.

        @Assert: Domain parameter is not updated.

        @BZ: 1123360
        """
        name = gen_string('alpha', 4)
        domain_name = description = DOMAIN % name
        param_name = gen_string('alpha', 8)
        param_value = gen_string('alpha', 8)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description)
            self.assertIsNotNone(element)
            try:
                self.domain.set_domain_parameter(
                    description, param_name, param_value)
                self.domain.set_domain_parameter(
                    description, param_name, param_value)
            except UIError as err:
                self.fail(err)
            self.assertIsNotNone(session.nav.wait_until_element(
                common_locators['common_param_error']))
Beispiel #7
0
    def test_positive_remove_parameter(self):
        """Remove a selected domain parameter

        @id: 8f7f8501-cf39-418f-a412-1a4b53698bc3

        @Assert: Domain parameter is removed

        @CaseLevel: Integration
        """
        with Session(self.browser) as session:
            for name in generate_strings_list(length=4):
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    param_name = gen_string('alpha', 3)
                    param_value = gen_string('alpha', 3)
                    make_domain(session,
                                name=domain_name,
                                description=description)
                    element = self.domain.search(domain_name)
                    self.assertIsNotNone(element)
                    try:
                        self.domain.set_domain_parameter(
                            description, param_name, param_value)
                        self.domain.remove_domain_parameter(
                            description, param_name)
                    except UIError as err:
                        self.fail(err)
Beispiel #8
0
    def test_negative_set_parameter_same(self):
        """Again set the same parameter for domain with name and value.

        @id: 6266f12e-cf94-4564-ba26-b467ced2737f

        @Assert: Domain parameter is not updated.

        @BZ: 1123360

        @CaseLevel: Integration
        """
        name = gen_string('alpha', 4)
        domain_name = description = DOMAIN % name
        param_name = gen_string('alpha', 8)
        param_value = gen_string('alpha', 8)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description)
            self.assertIsNotNone(element)
            try:
                self.domain.set_domain_parameter(
                    description, param_name, param_value)
                self.domain.set_domain_parameter(
                    description, param_name, param_value)
            except UIError as err:
                self.fail(err)
            self.assertIsNotNone(session.nav.wait_until_element(
                common_locators['common_param_error']))
Beispiel #9
0
    def test_positive_remove_parameter(self):
        """Remove a selected domain parameter

        @id: 8f7f8501-cf39-418f-a412-1a4b53698bc3

        @Assert: Domain parameter is removed

        @CaseLevel: Integration
        """
        with Session(self.browser) as session:
            for name in generate_strings_list(length=4):
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    param_name = gen_string('alpha', 3)
                    param_value = gen_string('alpha', 3)
                    make_domain(
                        session, name=domain_name, description=description)
                    element = self.domain.search(domain_name)
                    self.assertIsNotNone(element)
                    try:
                        self.domain.set_domain_parameter(
                            description, param_name, param_value)
                        self.domain.remove_domain_parameter(
                            description, param_name)
                    except UIError as err:
                        self.fail(err)
Beispiel #10
0
    def test_positive_create_filter_without_override(self):
        """Create filter in role w/o overriding it

        :id: a7f76f6e-6c13-4b34-b38c-19501b65786f

        :steps:

            1. Create a role with taxonomies (location and organization)
                assigned
            2. Create filter in role without overriding it
            3. Create user and assign new role to it
            4. Re-login into application using new user with a role

        :expectedresults:

            1. Filter w/o override is created in role
            2. The taxonomies of role are inherited to filter
            3. Override check is not marked by default in filters table
            4. User can access application sections specified in a filter
        """
        name = gen_string('alpha')
        username = gen_string('alpha')
        password = gen_string('alpha')
        domain_name = gen_string('alpha')
        with Session(self.browser) as session:
            make_role(
                session,
                name=name,
                locations=[self.role_loc],
                organizations=[self.role_org],
            )
            self.assertIsNotNone(self.role.search(name))
            self.role.add_permission(
                name,
                resource_type='Domain',
                permission_list=['view_domains', 'create_domains'],
                override_check=True,
            )
            self.assertTrue(
                self.role.wait_until_element(common_locators['alert.success']))
            make_user(session,
                      username=username,
                      password1=password,
                      password2=password,
                      roles=[name],
                      locations=[self.role_loc],
                      organizations=[self.role_org],
                      edit=True)
        with Session(self.browser, username, password) as session:
            set_context(session, org=self.role_org)
            set_context(session, loc=self.role_loc)
            make_domain(session, name=domain_name)
            self.assertIsNotNone(self.domain.search(domain_name))
            self.assertIsNone(
                session.nav.wait_until_element(menu_locators['menu.content'],
                                               timeout=3))
            self.assertIsNone(
                session.nav.wait_until_element(menu_locators['menu.configure'],
                                               timeout=3))
Beispiel #11
0
    def test_positive_create_filter_without_override(self):
        """Create filter in role w/o overriding it

        :id: a7f76f6e-6c13-4b34-b38c-19501b65786f

        :steps:

            1. Create a role with taxonomies (location and organization)
                assigned
            2. Create filter in role without overriding it
            3. Create user and assign new role to it
            4. Re-login into application using new user with a role

        :expectedresults:

            1. Filter w/o override is created in role
            2. The taxonomies of role are inherited to filter
            3. Override check is not marked by default in filters table
            4. User can access application sections specified in a filter
        """
        name = gen_string('alpha')
        username = gen_string('alpha')
        password = gen_string('alpha')
        domain_name = gen_string('alpha')
        with Session(self.browser) as session:
            make_role(
                session,
                name=name,
                locations=[self.role_loc],
                organizations=[self.role_org],
            )
            self.assertIsNotNone(self.role.search(name))
            self.role.add_permission(
                name,
                resource_type='Domain',
                permission_list=['view_domains', 'create_domains'],
                override_check=True,
            )
            self.assertTrue(self.role.wait_until_element(
                common_locators['alert.success']))
            make_user(
                session,
                username=username,
                password1=password,
                password2=password,
                roles=[name],
                locations=[self.role_loc],
                organizations=[self.role_org],
                edit=True
            )
        with Session(self.browser, username, password) as session:
            set_context(session, org=self.role_org)
            set_context(session, loc=self.role_loc)
            make_domain(session, name=domain_name)
            self.assertIsNotNone(self.domain.search(domain_name))
            self.assertIsNone(session.nav.wait_until_element(
                menu_locators['menu.content'], timeout=3))
            self.assertIsNone(session.nav.wait_until_element(
                menu_locators['menu.configure'], timeout=3))
Beispiel #12
0
    def test_positive_delete(self):
        """Delete a domain

        @id: 07c1cc34-4569-4f04-9c4a-2842821a6977

        @Assert: Domain is deleted
        """
        domain_name = description = DOMAIN % gen_string('alpha')
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.domain.delete(domain_name)
    def test_positive_delete(self):
        """Delete a domain

        @Feature: Domain - Delete

        @Assert: Domain is deleted
        """
        domain_name = description = DOMAIN % gen_string('alpha')
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.domain.delete(domain_name)
Beispiel #14
0
    def test_positive_delete(self):
        """@Test: Delete a domain

        @Feature: Domain - Delete

        @Assert: Domain is deleted
        """
        domain_name = description = DOMAIN % gen_string('alpha')
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.domain.delete(domain_name)
Beispiel #15
0
 def test_negative_create_domain_1(self, name):
     """
     @Test: Negative create a domain with name and description\
     @Feature: Domain - Negative Create
     @Assert: Domain is not created
     """
     domain_name = description = DOMAIN % name
     with Session(self.browser) as session:
         make_domain(session, name=domain_name, description=description)
         element = self.domain.search(description, timeout=5)
         self.assertIsNone(element)
Beispiel #16
0
 def test_create_domain_2(self, name):
     """
     @Test: Create a new domain
     @Feature: Domain - Positive Create domain with 255 chars
     @Assert: Domain is created
     """
     domain_name = description = DOMAIN % name
     with Session(self.browser) as session:
         make_domain(session, name=domain_name, description=description)
         element = self.domain.search(description)
         self.assertIsNotNone(element)
Beispiel #17
0
    def test_positive_delete(self):
        """Delete a domain

        @id: 07c1cc34-4569-4f04-9c4a-2842821a6977

        @Assert: Domain is deleted
        """
        domain_name = description = DOMAIN % gen_string('alpha')
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.domain.delete(domain_name)
Beispiel #18
0
 def test_negative_create_domain_3(self):
     """
     @Test: Negative create a domain with whitespace name
     @Feature: Domain - Negative Create
     @Assert: Domain is not created
     """
     domain_name = description = "   "
     with Session(self.browser) as session:
         make_domain(session, name=domain_name, description=description)
         error = session.nav.wait_until_element(
             common_locators["name_haserror"])
         self.assertIsNotNone(error)
Beispiel #19
0
    def test_positive_delete(self):
        """Delete a domain

        :id: 07c1cc34-4569-4f04-9c4a-2842821a6977

        :expectedresults: Domain is deleted

        :CaseImportance: Critical
        """
        domain_name = description = DOMAIN % gen_string('alpha')
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.domain.delete(domain_name)
Beispiel #20
0
    def test_negative_create_domain_1(self, name):
        """@Test: Negative create a domain with name and description\

        @Feature: Domain - Negative Create

        @Assert: Domain is not created

        """
        domain_name = description = DOMAIN % name
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description, timeout=5)
            self.assertIsNone(element)
Beispiel #21
0
    def test_positive_delete(self):
        """Delete a domain

        :id: 07c1cc34-4569-4f04-9c4a-2842821a6977

        :expectedresults: Domain is deleted

        :CaseImportance: Critical
        """
        domain_name = description = DOMAIN % gen_string('alpha')
        with Session(self) as session:
            make_domain(session, name=domain_name, description=description)
            self.domain.delete(domain_name)
Beispiel #22
0
    def test_create_domain_2(self, name):
        """@Test: Create a new domain

        @Feature: Domain - Positive Create domain with 255 chars

        @Assert: Domain is created

        """
        domain_name = description = DOMAIN % name
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description)
            self.assertIsNotNone(element)
Beispiel #23
0
    def test_negative_create_domain(self, name):
        """@Test: Try to create domain and use whitespace, blank, tab symbol or
        too long string of different types as its name value

        @Feature: Domain - Negative Create

        @Assert: Domain is not created

        """
        with Session(self.browser) as session:
            make_domain(session, name=name, description=name)
            error = session.nav.wait_until_element(
                common_locators['name_haserror'])
            self.assertIsNotNone(error)
Beispiel #24
0
    def test_negative_create_domain_2(self, name):
        """@Test: Create domain with whitespace and blank in name

        @Feature: Domain - Negative Create

        @Assert: Domain is not created

        """
        domain_name = description = name
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            error = session.nav.wait_until_element(
                common_locators["name_haserror"])
            self.assertIsNotNone(error)
Beispiel #25
0
 def test_update_domain(self, testdata):
     """
     @Test: Update a domain with name and description\
     @Feature: Domain - Update
     @Assert: Domain is updated
     """
     domain_name = description = DOMAIN % testdata['name']
     new_name = new_description = DOMAIN % testdata['newname']
     with Session(self.browser) as session:
         make_domain(session, name=domain_name, description=description)
         element = self.domain.search(description)
         self.assertIsNotNone(element)
         self.domain.update(domain_name, new_name, new_description)
         self.assertIsNotNone(self.domain.search(new_description))
Beispiel #26
0
    def test_positive_create_with_name(self):
        """Create a new domain with different names

        @id: 142f90e3-a2a3-4f99-8f9b-11189f230bc5

        @Assert: Domain is created
        """
        with Session(self.browser) as session:
            for name in generate_strings_list(length=4):
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(
                        session, name=domain_name, description=description)
                    self.assertIsNotNone(self.domain.search(description))
Beispiel #27
0
    def test_negative_create_with_invalid_name(self):
        """Try to create domain and use whitespace, blank, tab symbol or
        too long string of different types as its name value

        @id: 5a8ba1a8-2da8-48e1-8b2a-96d91161bf94

        @Assert: Domain is not created
        """
        with Session(self.browser) as session:
            for name in invalid_values_list(interface='ui'):
                with self.subTest(name):
                    make_domain(session, name=name, description=name)
                    error = session.nav.wait_until_element(
                        common_locators['name_haserror'])
                    self.assertIsNotNone(error)
Beispiel #28
0
    def test_positive_create_with_long_name(self):
        """Create a new domain with long names

        @id: 0b856ad7-97a6-4632-8b84-1d8ee45bedc8

        @Assert: Domain is created
        """
        with Session(self.browser) as session:
            for name in valid_long_domain_names():
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(
                        session, name=domain_name, description=description)
                    element = self.domain.search(description)
                    self.assertIsNotNone(element)
Beispiel #29
0
    def test_positive_create_with_name(self):
        """@Test: Create a new domain

        @Feature: Domain - Positive Create domain

        @Assert: Domain is created
        """
        with Session(self.browser) as session:
            for name in generate_strings_list(length=4):
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(
                        session, name=domain_name, description=description)
                    element = self.domain.search(description)
                    self.assertIsNotNone(element)
Beispiel #30
0
    def test_positive_create_with_long_name(self):
        """@Test: Create a new domain

        @Feature: Domain - Positive Create domain with 255 chars

        @Assert: Domain is created
        """
        with Session(self.browser) as session:
            for name in valid_long_domain_names():
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(
                        session, name=domain_name, description=description)
                    element = self.domain.search(description)
                    self.assertIsNotNone(element)
    def test_positive_create_with_name(self):
        """Create a new domain

        @Feature: Domain - Positive Create domain

        @Assert: Domain is created
        """
        with Session(self.browser) as session:
            for name in generate_strings_list(length=4):
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(
                        session, name=domain_name, description=description)
                    element = self.domain.search(description)
                    self.assertIsNotNone(element)
    def test_positive_create_with_long_name(self):
        """Create a new domain

        @Feature: Domain - Positive Create domain with 255 chars

        @Assert: Domain is created
        """
        with Session(self.browser) as session:
            for name in valid_long_domain_names():
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(
                        session, name=domain_name, description=description)
                    element = self.domain.search(description)
                    self.assertIsNotNone(element)
Beispiel #33
0
    def test_negative_create_with_invalid_name(self):
        """Try to create domain and use whitespace, blank, tab symbol or
        too long string of different types as its name value

        @id: 5a8ba1a8-2da8-48e1-8b2a-96d91161bf94

        @Assert: Domain is not created
        """
        with Session(self.browser) as session:
            for name in invalid_values_list(interface='ui'):
                with self.subTest(name):
                    make_domain(session, name=name, description=name)
                    error = session.nav.wait_until_element(
                        common_locators['name_haserror'])
                    self.assertIsNotNone(error)
Beispiel #34
0
    def test_positive_create_with_name(self):
        """Create a new domain with different names

        :id: 142f90e3-a2a3-4f99-8f9b-11189f230bc5

        :expectedresults: Domain is created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in generate_strings_list(length=4):
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(
                        session, name=domain_name, description=description)
                    self.assertIsNotNone(self.domain.search(description))
Beispiel #35
0
    def test_positive_create_with_name(self):
        """Create a new domain with different names

        :id: 142f90e3-a2a3-4f99-8f9b-11189f230bc5

        :expectedresults: Domain is created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in generate_strings_list(length=4):
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(
                        session, name=domain_name, description=description)
                    self.assertIsNotNone(self.domain.search(description))
Beispiel #36
0
    def test_positive_create_with_name(self):
        """Create a new domain

        @id: 142f90e3-a2a3-4f99-8f9b-11189f230bc5

        @Assert: Domain is created
        """
        with Session(self.browser) as session:
            for name in generate_strings_list(length=4):
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(session,
                                name=domain_name,
                                description=description)
                    element = self.domain.search(description)
                    self.assertIsNotNone(element)
Beispiel #37
0
 def test_remove_domain(self, name):
     """
     @Test: Delete a domain
     @Feature: Domain - Delete
     @Assert: Domain is deleted
     """
     name = generate_string("alpha", 4)
     domain_name = description = DOMAIN % name
     with Session(self.browser) as session:
         make_domain(session, name=domain_name, description=description)
         element = self.domain.search(description)
         self.assertIsNotNone(element)
         self.domain.delete(description, really=True,)
         self.assertIsNotNone(self.user.wait_until_element(
             common_locators["notif.success"]))
         self.assertIsNone(self.domain.search(description, timeout=5))
Beispiel #38
0
    def test_positive_create_with_long_name(self):
        """Create a new domain

        @id: 0b856ad7-97a6-4632-8b84-1d8ee45bedc8

        @Assert: Domain is created
        """
        with Session(self.browser) as session:
            for name in valid_long_domain_names():
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(session,
                                name=domain_name,
                                description=description)
                    element = self.domain.search(description)
                    self.assertIsNotNone(element)
Beispiel #39
0
    def test_update_domain(self, testdata):
        """@Test: Update a domain with name and description\

        @Feature: Domain - Update

        @Assert: Domain is updated

        """
        domain_name = description = DOMAIN % testdata['name']
        new_name = new_description = DOMAIN % testdata['newname']
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description)
            self.assertIsNotNone(element)
            self.domain.update(domain_name, new_name, new_description)
            self.assertIsNotNone(self.domain.search(new_description))
Beispiel #40
0
    def test_positive_create_with_long_name(self):
        """Create a new domain with long names

        :id: 0b856ad7-97a6-4632-8b84-1d8ee45bedc8

        :expectedresults: Domain is created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in valid_long_domain_names():
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(
                        session, name=domain_name, description=description)
                    element = self.domain.search(description)
                    self.assertIsNotNone(element)
Beispiel #41
0
    def test_positive_create_with_long_name(self):
        """Create a new domain with long names

        :id: 0b856ad7-97a6-4632-8b84-1d8ee45bedc8

        :expectedresults: Domain is created

        :CaseImportance: Critical
        """
        with Session(self) as session:
            for name in valid_long_domain_names():
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(
                        session, name=domain_name, description=description)
                    element = self.domain.search(description)
                    self.assertIsNotNone(element)
Beispiel #42
0
 def test_positive_set_domain_parameter_1(self, name):
     """
     @Test: Set parameter name and value for domain
     @Feature: Domain - Misc
     @Assert: Domain is updated
     """
     domain_name = description = DOMAIN % name
     param_name = generate_string("alpha", 4)
     param_value = generate_string("alpha", 3)
     with Session(self.browser) as session:
         make_domain(session, name=domain_name, description=description)
         element = self.domain.search(description)
         self.assertIsNotNone(element)
         try:
             self.domain.set_domain_parameter(description, param_name,
                                              param_value)
         except Exception as e:
             self.fail(e)
Beispiel #43
0
    def test_positive_set_parameter_long(self):
        """Set a parameter in a domain with 255 chars in name and value.

        :id: b346ae66-1720-46af-b0da-460c52ce9476

        :expectedresults: Domain parameter is created.

        :CaseLevel: Integration
        """
        domain_name = description = DOMAIN % gen_string('alpha', 4)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(description))
            self.domain.set_domain_parameter(
                description,
                param_name=gen_string('alpha', 255),
                param_value=gen_string('alpha', 255),
            )
Beispiel #44
0
    def test_positive_set_parameter_long(self):
        """Set a parameter in a domain with 255 chars in name and value.

        @id: b346ae66-1720-46af-b0da-460c52ce9476

        @Assert: Domain parameter is created.

        @CaseLevel: Integration
        """
        domain_name = description = DOMAIN % gen_string('alpha', 4)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(description))
            self.domain.set_domain_parameter(
                description,
                param_name=gen_string('alpha', 255),
                param_value=gen_string('alpha', 255),
            )
Beispiel #45
0
    def test_positive_set_parameter_blank(self):
        """Set a parameter in a domain with blank value.

        :id: b5a67709-57ad-4043-8e72-190ec31b8217

        :expectedresults: Domain parameter is created with blank value.

        :CaseLevel: Integration
        """
        domain_name = description = DOMAIN % gen_string('alpha', 4)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(description))
            self.domain.set_domain_parameter(
                description,
                param_name=gen_string('alpha'),
                param_value='',
            )
Beispiel #46
0
    def test_positive_remove_parameter(self):
        """Remove a selected domain parameter

        :id: 8f7f8501-cf39-418f-a412-1a4b53698bc3

        :expectedresults: Domain parameter is removed

        :CaseLevel: Integration
        """
        with Session(self.browser) as session:
            domain_name = description = DOMAIN % gen_string('alpha', 4)
            param_name = gen_string('alpha')
            param_value = gen_string('alpha')
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(domain_name))
            self.domain.set_domain_parameter(description, param_name,
                                             param_value)
            self.domain.remove_domain_parameter(description, param_name)
Beispiel #47
0
    def test_positive_set_parameter_blank(self):
        """Set a parameter in a domain with blank value.

        @id: b5a67709-57ad-4043-8e72-190ec31b8217

        @Assert: Domain parameter is created with blank value.

        @CaseLevel: Integration
        """
        domain_name = description = DOMAIN % gen_string('alpha', 4)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(description))
            self.domain.set_domain_parameter(
                description,
                param_name=gen_string('alpha'),
                param_value='',
            )
Beispiel #48
0
    def test_remove_domain(self, name):
        """@Test: Delete a domain

        @Feature: Domain - Delete

        @Assert: Domain is deleted

        """
        name = gen_string("alpha", 4)
        domain_name = description = DOMAIN % name
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description)
            self.assertIsNotNone(element)
            self.domain.delete(description, really=True,)
            self.assertIsNotNone(self.user.wait_until_element(
                common_locators["notif.success"]))
            self.assertIsNone(self.domain.search(description, timeout=5))
Beispiel #49
0
    def test_positive_update(self):
        """Update a domain with name and description

        :id: 25ff4a1d-3ca1-4153-be45-4fe1e63f3f16

        :expectedresults: Domain is updated

        :CaseImportance: Critical
        """
        domain_name = description = DOMAIN % gen_string('alpha')
        with Session(self) as session:
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(domain_name))
            for testdata in valid_domain_update_data():
                with self.subTest(testdata):
                    new_name = new_description = DOMAIN % testdata['name']
                    self.domain.update(domain_name, new_name, new_description)
                    self.assertIsNotNone(self.domain.search(new_name))
                    domain_name = new_name  # for next iteration
Beispiel #50
0
 def test_positive_set_domain_parameter_3(self):
     """
     @Test: Set a parameter in a domain with blank value.
     @Feature: Domain - Misc.
     @Assert: Domain parameter is created with blank value.
     """
     name = generate_string("alpha", 4)
     domain_name = description = DOMAIN % name
     param_name = generate_string("alpha", 4)
     param_value = ""
     with Session(self.browser) as session:
         make_domain(session, name=domain_name, description=description)
         element = self.domain.search(description)
         self.assertIsNotNone(element)
         try:
             self.domain.set_domain_parameter(description, param_name,
                                              param_value)
         except Exception as e:
             self.fail(e)
Beispiel #51
0
 def test_remove_domain_parameter(self, name):
     """
     @Test: Remove a selected domain paramter
     @Feature: Domain - Misc
     @Assert: Domain parameter is removed
     """
     domain_name = description = DOMAIN % name
     param_name = generate_string("alpha", 3)
     param_value = generate_string("alpha", 3)
     with Session(self.browser) as session:
         make_domain(session, name=domain_name, description=description)
         element = self.domain.search(description)
         self.assertIsNotNone(element)
         try:
             self.domain.set_domain_parameter(description, param_name,
                                              param_value)
             self.domain.remove_domain_parameter(description, param_name)
         except Exception as e:
             self.fail(e)
Beispiel #52
0
    def test_positive_update(self):
        """Update a domain with name and description

        :id: 25ff4a1d-3ca1-4153-be45-4fe1e63f3f16

        :expectedresults: Domain is updated

        :CaseImportance: Critical
        """
        domain_name = description = DOMAIN % gen_string('alpha')
        with Session(self) as session:
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(domain_name))
            for testdata in valid_domain_update_data():
                with self.subTest(testdata):
                    new_name = new_description = DOMAIN % testdata['name']
                    self.domain.update(domain_name, new_name, new_description)
                    self.assertIsNotNone(self.domain.search(new_name))
                    domain_name = new_name  # for next iteration
    def test_positive_set_parameter_blank(self):
        """Set a parameter in a domain with blank value.

        @Feature: Domain - Misc.

        @Assert: Domain parameter is created with blank value.
        """
        name = gen_string('alpha', 4)
        domain_name = description = DOMAIN % name
        param_name = gen_string('alpha', 4)
        param_value = ''
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description)
            self.assertIsNotNone(element)
            try:
                self.domain.set_domain_parameter(
                    description, param_name, param_value)
            except UIError as err:
                self.fail(err)
Beispiel #54
0
    def test_negative_set_parameter(self):
        """Set a parameter in a domain with 256 chars in name and value.

        @id: 1c647d66-6a3f-4d88-8e6b-60f2fc7fd603

        @Assert: Domain parameter is not updated. Error is raised

        @CaseLevel: Integration
        """
        domain_name = description = DOMAIN % gen_string('alpha', 4)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(description))
            self.domain.set_domain_parameter(
                description,
                param_name=gen_string('alpha', 256),
                param_value=gen_string('alpha', 256),
            )
            self.assertIsNotNone(self.domain.wait_until_element(
                common_locators['table_haserror']))
Beispiel #55
0
    def test_positive_remove_parameter(self):
        """Remove a selected domain parameter

        @id: 8f7f8501-cf39-418f-a412-1a4b53698bc3

        @Assert: Domain parameter is removed

        @CaseLevel: Integration
        """
        with Session(self.browser) as session:
            domain_name = description = DOMAIN % gen_string('alpha', 4)
            param_name = gen_string('alpha')
            param_value = gen_string('alpha')
            make_domain(
                session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(domain_name))
            self.domain.set_domain_parameter(
                description, param_name, param_value)
            self.domain.remove_domain_parameter(
                description, param_name)
Beispiel #56
0
    def test_negative_set_parameter(self):
        """Set a parameter in a domain with 256 chars in name and value.

        :id: 1c647d66-6a3f-4d88-8e6b-60f2fc7fd603

        :expectedresults: Domain parameter is not updated. Error is raised

        :CaseLevel: Integration
        """
        domain_name = description = DOMAIN % gen_string('alpha', 4)
        with Session(self) as session:
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(description))
            self.domain.set_domain_parameter(
                description,
                param_name=gen_string('alpha', 256),
                param_value=gen_string('alpha', 256),
            )
            self.assertIsNotNone(self.domain.wait_until_element(
                common_locators['table_haserror']))
Beispiel #57
0
    def test_positive_set_domain_parameter_1(self, name):
        """@Test: Set parameter name and value for domain

        @Feature: Domain - Misc

        @Assert: Domain is updated

        """
        domain_name = description = DOMAIN % name
        param_name = gen_string("alpha", 4)
        param_value = gen_string("alpha", 3)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            element = self.domain.search(description)
            self.assertIsNotNone(element)
            try:
                self.domain.set_domain_parameter(description, param_name,
                                                 param_value)
            except Exception as e:
                self.fail(e)
Beispiel #58
0
    def test_positive_update(self):
        """Update a domain with name and description

        @id: 25ff4a1d-3ca1-4153-be45-4fe1e63f3f16

        @Assert: Domain is updated
        """
        domain_name = description = DOMAIN % gen_string('alpha', 10)
        with Session(self.browser) as session:
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(domain_name))
            for testdata in valid_domain_update_data():
                with self.subTest(testdata):
                    bug_id = testdata.pop('bugzilla', None)
                    if bug_id is not None and bz_bug_is_open(bug_id):
                        self.skipTest(
                            'Bugzilla bug {0} is open.'.format(bug_id))
                    new_name = new_description = DOMAIN % testdata['name']
                    self.domain.update(domain_name, new_name, new_description)
                    self.assertIsNotNone(self.domain.search(new_name))
                    domain_name = new_name  # for next iteration
Beispiel #59
0
    def test_positive_set_parameter(self):
        """Set parameter name and value for domain

        :id: a05615de-c9e5-4784-995c-b2fe2a1dfd3e

        :expectedresults: Domain is updated

        :CaseLevel: Integration
        """
        with Session(self.browser) as session:
            for name in generate_strings_list(length=4):
                with self.subTest(name):
                    domain_name = description = DOMAIN % name
                    make_domain(session,
                                name=domain_name,
                                description=description)
                    self.assertIsNotNone(self.domain.search(domain_name))
                    self.domain.set_domain_parameter(
                        description,
                        param_name=gen_string('alpha'),
                        param_value=gen_string('alpha'))
Beispiel #60
0
    def test_negative_set_parameter_same(self):
        """Again set the same parameter for domain with name and value.

        :id: 6266f12e-cf94-4564-ba26-b467ced2737f

        :expectedresults: Domain parameter with same values is not created.

        :CaseLevel: Integration
        """
        domain_name = description = DOMAIN % gen_string('alpha', 4)
        param_name = gen_string('alpha')
        param_value = gen_string('alpha')
        with Session(self) as session:
            make_domain(session, name=domain_name, description=description)
            self.assertIsNotNone(self.domain.search(description))
            self.domain.set_domain_parameter(
                description, param_name, param_value)
            self.domain.set_domain_parameter(
                description, param_name, param_value)
            self.assertIsNotNone(session.nav.wait_until_element(
                common_locators['table_haserror']))