def test_actions(self):
        # Click through many menu option combinations that do not require
        # further interaction. Activate options in pairs of two.

        pv = self.pile_viewer
        tinit = pv.viewer.tmin
        tinitlen = pv.viewer.tmax - pv.viewer.tmin

        non_dialog_actions = [
            'Indivdual Scale',
            'Common Scale',
            'Common Scale per Station',
            'Common Scale per Component',
            'Scaling based on Minimum and Maximum',
            'Scaling based on Mean +- 2 x Std. Deviation',
            'Scaling based on Mean +- 4 x Std. Deviation',
            'Sort by Names',
            'Sort by Distance',
            'Sort by Azimuth',
            'Sort by Distance in 12 Azimuthal Blocks',
            'Sort by Backazimuth',
            '3D distances',
            'Subsort by Network, Station, Location, Channel',
            'Subsort by Network, Station, Channel, Location',
            'Subsort by Station, Network, Channel, Location',
            'Subsort by Location, Network, Station, Channel',
            'Subsort by Channel, Network, Station, Location',
            'Subsort by Network, Station, Channel (Grouped by Location)',
            'Subsort by Station, Network, Channel (Grouped by Location)',
        ]

        dialog_actions = [
            'Open waveform files...',
            'Open waveform directory...',
            'Open station files...',
            'Save markers...',
            'Save selected markers...',
            'Open marker file...',
            'Open event file...',
            'Save as SVG|PNG',
            ]

        options = [
            'Antialiasing',
            'Liberal Fetch Optimization',
            'Clip Traces',
            'Show Boxes',
            'Color Traces',
            'Show Scale Ranges',
            'Show Scale Axes',
            'Show Zero Lines',
            'Fix Scale Ranges',
            'Allow Downsampling',
            'Allow Degapping',
            'FFT Filtering',
            'Bandpass is Lowpass + Highpass',
            'Watch Files',
        ]

        # create an event marker and activate it
        self.add_one_pick()

        keys = list('mAhefrRh+-fgc?')
        keys.extend([Qt.Key_PageUp, Qt.Key_PageDown])

        def fire_key(x):
            QTest.keyPress(self.pile_viewer, key)

        for key in keys:
            QTest.qWait(100)
            fire_key(key)

        event = model.Event()
        markers = pv.viewer.get_markers()
        self.assertEqual(len(markers), 1)
        markers[0]._event = event

        pv.viewer.set_active_event(event)
        pv.viewer.set_event_marker_as_origin()

        right_click_menu = self.viewer.menu

        for action_text in dialog_actions:
            self.trigger_menu_item(right_click_menu, action_text, dialog=True)

        for action_text in non_dialog_actions:
            for oa in options:
                for ob in options:
                    self.trigger_menu_item(right_click_menu, action_text)
                    self.trigger_menu_item(right_click_menu, oa)
                    self.trigger_menu_item(right_click_menu, ob)

                options.remove(oa)

        self.viewer.go_to_event_by_name(event.name)
        self.viewer.go_to_time(tinit, tinitlen)