Aga Wronska | e436f94 | 2016-02-08 12:00:38 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.documentsui; |
| 18 | |
| 19 | import static com.android.documentsui.StubProvider.ROOT_0_ID; |
| 20 | |
Aga Wronska | e436f94 | 2016-02-08 12:00:38 -0800 | [diff] [blame] | 21 | import android.test.suitebuilder.annotation.LargeTest; |
Aga Wronska | e436f94 | 2016-02-08 12:00:38 -0800 | [diff] [blame] | 22 | |
| 23 | @LargeTest |
Steve McKay | b9a20d1 | 2016-02-19 12:57:05 -0800 | [diff] [blame] | 24 | public class RootsUiTest extends ActivityTest<FilesActivity> { |
Aga Wronska | e436f94 | 2016-02-08 12:00:38 -0800 | [diff] [blame] | 25 | |
| 26 | private static final String TAG = "RootUiTest"; |
| 27 | |
Steve McKay | b9a20d1 | 2016-02-19 12:57:05 -0800 | [diff] [blame] | 28 | public RootsUiTest() { |
Aga Wronska | e436f94 | 2016-02-08 12:00:38 -0800 | [diff] [blame] | 29 | super(FilesActivity.class); |
| 30 | } |
| 31 | |
| 32 | @Override |
| 33 | public void setUp() throws Exception { |
| 34 | super.setUp(); |
| 35 | initTestFiles(); |
Steve McKay | b9a20d1 | 2016-02-19 12:57:05 -0800 | [diff] [blame] | 36 | bots.roots.openRoot(ROOT_0_ID); |
Aga Wronska | e436f94 | 2016-02-08 12:00:38 -0800 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | public void testRootTapped_GoToRootFromChildDir() throws Exception { |
Steve McKay | b9a20d1 | 2016-02-19 12:57:05 -0800 | [diff] [blame] | 40 | bots.directory.openDocument(dirName1); |
| 41 | bots.main.assertWindowTitle(dirName1); |
| 42 | bots.roots.openRoot(ROOT_0_ID); |
| 43 | bots.main.assertWindowTitle(ROOT_0_ID); |
Aga Wronska | e436f94 | 2016-02-08 12:00:38 -0800 | [diff] [blame] | 44 | assertDefaultContentOfTestDir0(); |
| 45 | } |
| 46 | } |