FirstRunActivityIT.java 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. *
  3. * Nextcloud Android client application
  4. *
  5. * @author Tobias Kaminsky
  6. * Copyright (C) 2019 Tobias Kaminsky
  7. * Copyright (C) 2019 Nextcloud GmbH
  8. *
  9. * This program is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU Affero General Public License as published by
  11. * the Free Software Foundation, either version 3 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU Affero General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Affero General Public License
  20. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  21. */
  22. package com.nextcloud.client;
  23. import android.Manifest;
  24. import android.app.Activity;
  25. import com.nextcloud.client.onboarding.FirstRunActivity;
  26. import com.owncloud.android.AbstractIT;
  27. import com.owncloud.android.utils.ScreenshotTest;
  28. import org.junit.Rule;
  29. import org.junit.Test;
  30. import androidx.test.espresso.intent.rule.IntentsTestRule;
  31. import androidx.test.rule.GrantPermissionRule;
  32. public class FirstRunActivityIT extends AbstractIT {
  33. @Rule public IntentsTestRule<FirstRunActivity> activityRule = new IntentsTestRule<>(FirstRunActivity.class,
  34. true,
  35. false);
  36. @Rule
  37. public final GrantPermissionRule permissionRule = GrantPermissionRule.grant(
  38. Manifest.permission.WRITE_EXTERNAL_STORAGE);
  39. @Test
  40. @ScreenshotTest
  41. public void open() {
  42. Activity sut = activityRule.launchActivity(null);
  43. screenshot(sut);
  44. }
  45. }