Navigation for plugins page structure doesn't work for tests

Bug #1540245 reported by Georgy Dyuldin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Timur Sufiev

Bug Description

I can't override navigation structure for sahara dashboard in tests.
Fresh sahara navigation structure looks like this (from config):

plugin_page_structure={
            "Project":
                {
                    "Data Processing":
                        {
                            "_":
                                (
                                    "Clusters",
                                    "Jobs",
                                    "Cluster Templates",
                                    "Node Group Templates",
                                    "Job Templates",
                                    "Job Binaries",
                                    "Data Sources",
                                    "Image Registry",
                                    "Plugins"
                                )
                        }
                }
        }

In horizon (https://github.com/openstack/horizon/blob/master/openstack_dashboard/test/integration_tests/pages/navigation.py#L333) this structure present as string value.
After decoding it using json.loads structure contains dicts and list, but rec function (https://github.com/openstack/horizon/blob/master/openstack_dashboard/test/integration_tests/pages/navigation.py#L320) doesn't process lists (only tuples).

tags: added: sahara
Timur Sufiev (tsufiev-x)
Changed in horizon:
assignee: nobody → Timur Sufiev (tsufiev-x)
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/274666

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/274666
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=f93c39258694d880b930823b5a1120114dda65bc
Submitter: Jenkins
Branch: master

commit f93c39258694d880b930823b5a1120114dda65bc
Author: Timur Sufiev <email address hidden>
Date: Mon Feb 1 16:44:24 2016 +0300

    Fix i9n tests pluggable nav structure

    Since JSON converted into Python object contains only dicts and lists,
    when searching for leaf-nodes in sidebar nav structure we should treat
    lists the same way as tuples. Also remove 'Data Processing' section
    from CORE_PAGE_STRUCTURE which hid this issue before with 2 initlal
    sahara-dashboard tests.

    Change-Id: I5b84fd3b769ae559cea484319b6b8956b80f99ae
    Closes-Bug: #1540245

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0b3

This issue was fixed in the openstack/horizon 9.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.