Navigation for plugins page structure doesn't work for tests

Bug #1540245 reported by Georgy Dyuldin on 2016-02-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
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) on 2016-02-01
Changed in horizon:
assignee: nobody → Timur Sufiev (tsufiev-x)
importance: Undecided → High

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

Changed in horizon:
status: New → In Progress

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

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  Edit
Everyone can see this information.

Other bug subscribers