Skip to content

Commit

Permalink
Fixed details overview page loading issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hhovsepy committed May 7, 2021
1 parent 1cc3e4a commit 5c1532a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ spec:
- "istio-system/istio-telemetry.istio-system.svc.cluster.local"
- "istio-system/istio-policy.istio-system.svc.cluster.local"
- "default/*.other.svc.cluster.local"
- "bookinfo/www.google.com"

- "bookinfo/wrong.bookinfo.svc.cluster.local"

9 changes: 4 additions & 5 deletions kiali_qe/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3131,7 +3131,7 @@ def items(self):
for el in self.browser.elements(locator=self.ROWS,
parent=ListViewAbstract.DETAILS_ROOT):
_name = el.text.replace('W', '').strip()
# TODO status
# TODO status and tooltip
# create Workload instance
_workload = AppWorkload(
name=_name,
Expand All @@ -3146,16 +3146,15 @@ class CardViewIstioConfig(CardViewAbstract):
GATEWAYS = '//div[@id="gateways"]//ul[contains(@class, "details")]//li'
SECTION_ROOT = (ListViewAbstract.DETAILS_ROOT +
'//article[@id="IstioConfigCard"]')
ROWS = SECTION_ROOT+'//table//tbody//tr'
ROW = SECTION_ROOT+'//table'\
'//tbody//tr//td//a[text()="{}"]/..//span[text()="{}"]/../../..'
ROWS = '//div/table/tbody/tr'
ROW = ROWS+'//td//a[text()="{}"]/..//span[text()="{}"]/../../..'
SUBSETS_ROW = '//div[@id="subsets"]//table//tbody//tr'

@property
def items(self):

_items = []
for el in self.browser.elements(self.ROWS):
for el in self.browser.elements(self.SECTION_ROOT+self.ROWS):
_columns = list(self.browser.elements(locator=self.COLUMN, parent=el))
if len(_columns) < 2:
# empty row
Expand Down
2 changes: 1 addition & 1 deletion kiali_qe/rest/openshift_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def application_details(self, namespace, application_name):

_application = ApplicationDetails(
name=application_name,
workloads=workloads.values(),
workloads=list(set(workloads.values())),
services=list(set(services)),
istio_sidecar=all([w.istio_sidecar for w in workloads.values()]),
health=None,
Expand Down
4 changes: 4 additions & 0 deletions kiali_qe/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,10 @@ def assert_details(self, name, namespace, check_metrics=False, force_refresh=Fal
application_details_ui.application_status.deployment_statuses,
application_details_oc.application_status.deployment_statuses,
application_details_ui.name)'''
assert is_equal([_w.name for _w in application_details_ui.workloads],
[_w.name for _w in application_details_rest.workloads])
assert is_equal([_w.name for _w in application_details_oc.workloads],
[_w.name for _w in application_details_rest.workloads])
for workload_ui in application_details_ui.workloads:
found = False
for workload_rest in application_details_rest.workloads:
Expand Down
2 changes: 1 addition & 1 deletion kiali_qe/tests/test_applications_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_application_graph_overview(kiali_client, openshift_client, browser, pic
def test_application_details_random(kiali_client, openshift_client, browser, pick_namespace):
tests = ApplicationsPageTest(
kiali_client=kiali_client, openshift_client=openshift_client, browser=browser)
namespace = pick_namespace(BOOKINFO_2)
namespace = pick_namespace(BOOKINFO)
tests.assert_random_details(namespaces=[namespace])


Expand Down

0 comments on commit 5c1532a

Please sign in to comment.