Esempio n. 1
0
 def setUpClass(self):
     self.data = keyData()
     self.driver = self.data.get_driver()
     self.data.open_keycloack(self.driver)
     self.data.login_keycloack(self.driver)
     self.driver.find_element_by_xpath(
         "//*[@id='view']/div[2]/div[3]/ul/li[2]/a").click()
     self.f = open(self.data.get_json_file_path(), "r")
 def check_cqube_app_setting(self):
     cal = keyData()
     cal.navigate_to_clients(self.driver)
     json_cqube_admin_client = cal.check_clients(self.file, 'cqube_app')
     cal.click_on_cqube_app(self.driver)
     cal.click_on_settings(self.driver)
     keycloack_cqube_admin_client = cal.check_setting(self.driver)
     cal.click_on_client_scopes(self.driver)
     return json_cqube_admin_client, keycloack_cqube_admin_client
Esempio n. 3
0
    def test_enabled(self):
        data = keyData()
        data.navigate_to_clients(self.driver)
        time.sleep(2)
        cal = Enabled(self.driver, self.file)

        json_enabled, table_enabled = cal.check_enabled()
        self.assertEqual(json_enabled,
                         table_enabled,
                         msg="json_enabled is not equal to table_enabled")
Esempio n. 4
0
 def check_cqube_flask_optional_scopes(self):
     cal = keyData()
     cal.navigate_to_clients(self.driver)
     cal.click_on_cqube_flask(self.driver)
     time.sleep(3)
     cal.click_on_client_scopes(self.driver)
     json_assigned_ClientScopes = cal.check_assigned_ClientScopes_json(self.file)
     json_assigned_ClientScopes.sort()
     keycloack_assigned_optional_client_scopes= cal.assigned_optional_client_scopes(self.driver)
     keycloack_assigned_optional_client_scopes.sort()
     return json_assigned_ClientScopes,keycloack_assigned_optional_client_scopes
Esempio n. 5
0
 def setUpClass(self):
     self.data = keyData()
     self.file = self.data.open_json_file()
     self.driver = self.data.get_driver()
     self.data.open_keycloack(self.driver)
     self.data.login_keycloack(self.driver)
     time.sleep(2)
     # self.driver.navigate_to_clients(self.driver)
     self.driver.find_element_by_xpath(
         "//*[@id='view']/div[2]/div[2]/ul/li[2]/a").click()
     time.sleep(3)
 def check_cqube_admin_default_scopes(self):
     cal = keyData()
     cal.navigate_to_clients(self.driver)
     cal.click_on_cqube_admin(self.driver)
     time.sleep(3)
     cal.click_on_client_scopes(self.driver)
     jason_defaultClientScopes = cal.check_defaultClientScopes_json(
         self.file)
     keycloack_assigned_default_client_scopes = cal.check_assigned_default_client_scopes(
         self.driver)
     jason_defaultClientScopes.sort()
     keycloack_assigned_default_client_scopes.sort()
     return jason_defaultClientScopes, keycloack_assigned_default_client_scopes
Esempio n. 7
0
 def check_BaseUrl_with_domain_name_and_privateip(self):
     cal = keyData()
     json_baseurl = []
     url = []
     for x in self.file['clients']:
         if x['clientId'] == 'cqube_app' or x[
                 'clientId'] == 'cqube_admin' or x[
                     'clientId'] == 'cqube_flask':
             json_baseurl.append(x['rootUrl'])
     url.append(cal.get_privateip())
     url.append(cal.get_domain_cqube_name())
     url.append(cal.get_domain_cqube_name() + "/data")
     json_baseurl.sort()
     url.sort()
     return json_baseurl, url
Esempio n. 8
0
    def check_clienid(self):
        json_clientid = []
        table_clientid = []
        for x in self.file['clients']:
            json_clientid.append(x['clientId'])

        table = keyData()
        result = table.get_row_count(self.driver)

        for x in range(1, result):
            table_clientid.append(
                self.driver.find_element_by_xpath('//tbody/tr[%d]/td[1]' %
                                                  x).text)

        # print(json_clientid)
        # print(table_clientid)
        return json_clientid, table_clientid
Esempio n. 9
0
    def check_enabled(self):
        json_enabled = []
        table_enabled = []
        for x in self.file['clients']:
            json_enabled.append(str(x['enabled']))

        table = keyData()
        table.navigate_to_clients(self.driver)
        result = table.get_row_count(self.driver)

        for x in range(1, result):
            table_enabled.append(
                self.driver.find_element_by_xpath('//tbody/tr[%d]/td[2]' %
                                                  x).text)

        # print(json_enabled)
        # print(table_enabled)
        return json_enabled, table_enabled