Test-case ubuntu-app-launch/click-app
<dl>
    <dt>Ensure the clock is installed via click by running: <tt>click list</tt></dt>
        <dd><tt>com.ubuntu.clock</tt> should be listed. <i>Note the version for later</i></dd>
    <dt>Ensure the clock app is not currently running: <tt>ubuntu-app-list</tt></dt>
        <dd>Clock application shouldn't be listed</dd>
    <dt>Launch the clock application: <tt>ubuntu-app-launch com.ubuntu.clock_clock_$(version from click list)</tt></dt>
        <dd>The clock application should be brought to focus and shown to the user</dd>
</dl>

Test-case ubuntu-app-launch/legacy-app
<dl>
    <dt>Ensure that the system-settings is installed: <tt>apt-cache policy ubuntu-system-settings</tt></dt>
        <dd>One of the versions in the version table should a <tt>***</tt> next to it</dd>
    <dt>Ensure the settings app is not currently running: <tt>ubuntu-app-list</tt></dt>
        <dd>Settings shouldn't be listed</dd>
    <dt>Launch the settings application: <tt>ubuntu-app-launch ubuntu-system-settings</tt></dt>
        <dd>The settings application should be brought to focus and shown to the user</dd>
</dl>

Test-case ubuntu-app-launch/secondary-activation
<dl>
    <dt>Run test case: ubuntu-app-launch/legacy-app</dt>
        <dd>Everything behaves as expected</dd>
    <dt>Use the launcher to return to the home screen</dt>
        <dd>The settings app is no longer shown</dd>
    <dt>Send a URL to the service: <tt>ubuntu-app-launch ubuntu-system-settings settings:///system/battery</tt></dt>
        <dd>The settings application should come back into focus and be on the power settings pane</dd>
</dl>

Test-case ubuntu-app-launch/helper-run
<dl>
    <dt>NOTE: Test is theoretical today, needs other components to be written</dt>
    <dt>Get a device that supports sending SMS</dt>
        <dd>Typically this is a phone</dd>
    <dt>Note the SMS sent count visible on the lock screen infographic for this user</dt>
    <dt>Start the messaging app</dt>
    <dt>Send an SMS</dt>
        <dd>SMS should report as being sent successfully</dd>
    <dt>Wait approximately 1 minute</dt>
        <dd>Screen should lock</dd>
    <dt>Look at the lock screen infographic for the SMS sent count</dt>
        <dd>Count should have incremented by 1</dd>
</dl>

Test-case ubuntu-app-launch/security-app-launch
<dl>
    <dt>Setup the security tests: https://wiki.ubuntu.com/Touch/Testing#Running_Security_tests</dt>
    <dt>Execute the <tt>click-apparmor</tt> test to start and stop several confined applications</dt>
        <dd>Ensure that all applications start and stop correctly</dd>
</dl>

Test-case ubuntu-app-launch/cgroup-containment
<dl>
    <dt>Install the Terminal app if not already installed</dt>
        <dd>It can be found in the Application Store if not currently installed</dd>
    <dt>Launch the Terminal app</dt>
        <dd>A new application should open with a terminal prompt where you can type commands</dd>
    <dt>Ensure the Terminal is in a terminal specific cgroup</dt>
        <dd>Type the command <tt>cat /proc/self/cgroup</tt> on the Terminal app.</dd>
        <dd>Under the "freeze" cgroup the end of the path should include the AppID of the terminal. An example would be (the version many change): <tt>4:freezer:/user.slice/user-32011.slice/session-c2.scope/upstart/application-click-com.ubuntu.terminal_terminal_0.5.106</tt></dd>
</dl>

Test-case ubuntu-app-launch/correct-job-type
<dl>
    <dt>Launch the settings application: <tt>ubuntu-app-launch ubuntu-system-settings</tt></dt>
        <dd>The settings application should be brought to focus and shown to the user</dd>
    <dt>Launch the clock application: <tt>ubuntu-app-launch `ubuntu-app-triplet com.ubuntu.clock`</tt></dt>
        <dd>The clock application should be brought to focus and shown to the user</dd>
    <dt>Verify the settings app is running under the <tt>application-legacy</tt> upstart job</dt>
        <dd>Running <tt>initctl list | grep application-legacy | grep ubuntu-system-settings</tt> should return a single entry</dd>
    <dt>Verify the clock app is running under the <tt>application-click</tt> upstart job</dt>
        <dd>Running <tt>initctl list | grep application-click | grep com.ubuntu.clock</tt> should return a single entry</dd>
</dl>
