blob: 6141832a4499d89c82307ccc32dfd147de854068 [file] [log] [blame]
Aga Wronskae436f942016-02-08 12:00:38 -08001/*
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
17package com.android.documentsui;
18
19import static com.android.documentsui.StubProvider.ROOT_0_ID;
20
Aga Wronskae436f942016-02-08 12:00:38 -080021import android.test.suitebuilder.annotation.LargeTest;
Aga Wronskae436f942016-02-08 12:00:38 -080022
23@LargeTest
Steve McKayb9a20d12016-02-19 12:57:05 -080024public class RootsUiTest extends ActivityTest<FilesActivity> {
Aga Wronskae436f942016-02-08 12:00:38 -080025
26 private static final String TAG = "RootUiTest";
27
Steve McKayb9a20d12016-02-19 12:57:05 -080028 public RootsUiTest() {
Aga Wronskae436f942016-02-08 12:00:38 -080029 super(FilesActivity.class);
30 }
31
32 @Override
33 public void setUp() throws Exception {
34 super.setUp();
35 initTestFiles();
Aga Wronskae436f942016-02-08 12:00:38 -080036 }
37
38 public void testRootTapped_GoToRootFromChildDir() throws Exception {
Steve McKayb9a20d12016-02-19 12:57:05 -080039 bots.directory.openDocument(dirName1);
40 bots.main.assertWindowTitle(dirName1);
41 bots.roots.openRoot(ROOT_0_ID);
42 bots.main.assertWindowTitle(ROOT_0_ID);
Aga Wronskae436f942016-02-08 12:00:38 -080043 assertDefaultContentOfTestDir0();
44 }
45}