FileDetailSharingFragmentIT.kt 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. *
  3. * Nextcloud Android client application
  4. *
  5. * @author Tobias Kaminsky
  6. * Copyright (C) 2020 Tobias Kaminsky
  7. * Copyright (C) 2020 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.owncloud.android.ui.fragment
  23. import android.widget.ImageView
  24. import androidx.appcompat.widget.PopupMenu
  25. import com.owncloud.android.AbstractIT
  26. import com.owncloud.android.R
  27. import com.owncloud.android.lib.resources.shares.OCShare
  28. import org.junit.Test
  29. class FileDetailSharingFragmentIT : AbstractIT() {
  30. @Test
  31. fun listShares_file_none() {
  32. throw NotImplementedError()
  33. }
  34. @Test
  35. fun listShares_file_all() {
  36. // with multiple public share links
  37. throw NotImplementedError()
  38. }
  39. @Test
  40. fun listShares_folder_none() {
  41. throw NotImplementedError()
  42. }
  43. @Test
  44. fun listShares_folder_all() {
  45. // with multiple public share links
  46. throw NotImplementedError()
  47. }
  48. @Test
  49. fun publicLink_optionMenu() {
  50. val sut = FileDetailSharingFragment()
  51. val overflowMenuShareLink = ImageView(targetContext)
  52. val popup = PopupMenu(targetContext, overflowMenuShareLink)
  53. popup.inflate(R.menu.fragment_file_detail_sharing_public_link)
  54. val publicShare = OCShare()
  55. sut.prepareLinkOptionsMenu(popup.menu, publicShare)
  56. // TODO check all options
  57. // scenarios: public link, email, …, both for file/folder
  58. }
  59. }