Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nc16/fulltetsearch: moving final class to private, new interface in public #14302

Merged
merged 5 commits into from
Mar 5, 2019

Conversation

ArtificialOwl
Copy link
Member

Also storing the source in the management of extracts

@ArtificialOwl ArtificialOwl changed the title moving final class to private, new interface in public nc16/fulltetsearch: moving final class to private, new interface in public Feb 20, 2019
@ArtificialOwl ArtificialOwl added the 3. to review Waiting for reviews label Feb 20, 2019
@ArtificialOwl ArtificialOwl added this to the Nextcloud 16 milestone Feb 20, 2019
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code makes sense 👍

@juliusknorr
Copy link
Member

Won't this break compatibility for apps, so it is no longer possible to have a 15 and 16 compatibile app with fulltextsearch? Maybe we should keep an alias interface like OCP\FullTextSearch\Model\IndexDocument for OCP\FullTextSearch\Model\IIndexDocument so we can properly deprecate it and remove it after some time?

@MorrisJobke
Copy link
Member

Won't this break compatibility for apps, so it is no longer possible to have a 15 and 16 compatibile app with fulltextsearch? Maybe we should keep an alias interface like OCP\FullTextSearch\Model\IndexDocument for OCP\FullTextSearch\Model\IIndexDocument so we can properly deprecate it and remove it after some time?

Ah right - I thought it was 16+ anyways, but you are right it was there in 15.

@nickvergessen
Copy link
Member

Would still be fine by me, because the number of FullTextSearch apps is limited to his own Apps anyway atm.

@ArtificialOwl
Copy link
Member Author

ArtificialOwl commented Feb 20, 2019

Exactly, in-app integration in deck and spreed are only available for NC16+

@juliusknorr
Copy link
Member

juliusknorr commented Feb 20, 2019

Exactly, in-app integration in deck and spreed are only available for NC16+

Is there a way we can make the integration in deck work on 16 while keeping the app 15 compatible then? I would like to avoid the need of two separate releases. Maybe we need to move it to a separate app then?

@ArtificialOwl
Copy link
Member Author

ArtificialOwl commented Feb 20, 2019

Exactly, in-app integration in deck and spreed are only available for NC16+

Is there a way we can make the integration in deck work on 16 while keeping the app 15 compatible then? I would like to avoid the need of two separate releases. Maybe we need to move it to a separate app then?

I can try something like in info.xml:

    <fulltextsearch>
        <provider version="15">OCA\Deck\Provider\Deck15Provider</provider>
        <provider version="16">OCA\Deck\Provider\DeckProvider</provider>
    </fulltextsearch>

does not seems to break any rules, and I can filter the loading of the right class depends on the version of Nextcloud.

@ArtificialOwl
Copy link
Member Author

ArtificialOwl commented Mar 1, 2019

@ArtificialOwl
Copy link
Member Author

ping @nickvergessen @juliushaertl - please review

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
@ArtificialOwl ArtificialOwl force-pushed the enhancement/noid/fulltextsearch-final-class branch from deb694c to adfadf8 Compare March 4, 2019 10:55
@MorrisJobke MorrisJobke mentioned this pull request Mar 4, 2019
45 tasks
@MorrisJobke
Copy link
Member

Status of 16696: failure

  • DB=sqlite, ENABLE_REDIS=false, PHP=7.3
Show full log
There was 1 failure:

1) TrashbinTest::testExpireOldFiles
Failed asserting that null is identical to 'file2.txt'.

/drone/src/github.com/nextcloud/server/apps/files_trashbin/tests/TrashbinTest.php:186

--

There was 1 risky test:

1) OCA\TwoFactorBackupCodes\Tests\Db\BackupCodeMapperTest::testInsertArgonEncryptedCodes
This test did not perform any assertions

  • DB=mysql, ENABLE_REDIS=false, PHP=7.3
Show full log
There was 1 failure:

1) TrashbinTest::testExpireOldFiles
Failed asserting that null is identical to 'file2.txt'.

/drone/src/github.com/nextcloud/server/apps/files_trashbin/tests/TrashbinTest.php:186

--

There was 1 risky test:

1) OCA\TwoFactorBackupCodes\Tests\Db\BackupCodeMapperTest::testInsertArgonEncryptedCodes
This test did not perform any assertions

  • TESTS=acceptance, TESTS-ACCEPTANCE=app-comments
    • tests/acceptance/features/app-comments.feature:222
Show full log
  Scenario: search a comment                                      # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-comments.feature:222
    Given I am logged in                                          # LoginPageContext::iAmLoggedIn()
    And I open the details view for "welcome.txt"                 # FileListContext::iOpenTheDetailsViewFor()
    And I open the "Comments" tab in the details view             # FilesAppContext::iOpenTheTabInTheDetailsView()
      Tab headers in details view in Files app could not be found after 100 seconds
      Tab header named Comments in details view in Files app could not be found after 100 seconds (NoSuchElementException)
    And I create a new comment with "Hello world" as message      # CommentsAppContext::iCreateANewCommentWithAsMessage()
    And I see a comment with "Hello world" as message             # CommentsAppContext::iSeeACommentWithAsMessage()
    When I search for "hello"                                     # SearchContext::iSearchFor()
    Then I see that the search result 1 is "user0Hello world"     # SearchContext::iSeeThatTheSearchResultIs()
    And I see that the search result 1 was found in "welcome.txt" # SearchContext::iSeeThatTheSearchResultWasFoundIn()
  • TESTS=acceptance, TESTS-ACCEPTANCE=app-files
    • tests/acceptance/features/app-files.feature:41
    • tests/acceptance/features/app-files.feature:90
    • tests/acceptance/features/app-files.feature:133
    • tests/acceptance/features/app-files.feature:154
Show full log
  Scenario: viewing a favorite file in its folder shows the correct sidebar view # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files.feature:41
    Given I am logged in                                                         # LoginPageContext::iAmLoggedIn()
    And I create a new folder named "other"                                      # FileListContext::iCreateANewFolderNamed()
      │ Create menu button in file list could not be clicked
      │ Exception message: Element is not currently visible and so may not be interacted with
      │ Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
      │ System info: host: '86172144a388', ip: '172.17.0.7', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-43-generic', java.version: '1.8.0_91'
      │ Driver info: driver.version: unknown
      │ Trying again
      │ 
    And I mark "other" as favorite                                               # FileListContext::iMarkAsFavorite()
    And I mark "welcome.txt" as favorite                                         # FileListContext::iMarkAsFavorite()
    And I see that "other" is marked as favorite                                 # FileListContext::iSeeThatIsMarkedAsFavorite()
    And I see that "welcome.txt" is marked as favorite                           # FileListContext::iSeeThatIsMarkedAsFavorite()
    And I open the "Favorites" section                                           # AppNavigationContext::iOpenTheSection()
    And I open the details view for "other"                                      # FileListContext::iOpenTheDetailsViewFor()
      Row for file other in file list could not be found after 100 seconds
      File actions menu button for file other in file list could not be found after 100 seconds (NoSuchElementException)
    And I see that the details view is open                                      # FilesAppContext::iSeeThatTheDetailsViewIsOpen()
    And I see that the file name shown in the details view is "other"            # FilesAppContext::iSeeThatTheFileNameShownInTheDetailsViewIs()
    When I view "welcome.txt" in folder                                          # FileListContext::iViewInFolder()
    Then I see that the current section is "All files"                           # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    And I see that the details view is open                                      # FilesAppContext::iSeeThatTheDetailsViewIsOpen()
    And I see that the file name shown in the details view is "welcome.txt"      # FilesAppContext::iSeeThatTheFileNameShownInTheDetailsViewIs()
    When I open the details view for "other"                                     # FileListContext::iOpenTheDetailsViewFor()
    And I see that the file name shown in the details view is "other"            # FilesAppContext::iSeeThatTheFileNameShownInTheDetailsViewIs()
  Scenario: show favorites                                            # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files.feature:90
    Given I am logged in                                              # LoginPageContext::iAmLoggedIn()
    And I mark "welcome.txt" as favorite                              # FileListContext::iMarkAsFavorite()
    When I open the "Favorites" section                               # AppNavigationContext::iOpenTheSection()
    Then I see that the current section is "Favorites"                # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    Then I see that the file list contains a file named "welcome.txt" # FileListContext::iSeeThatTheFileListContainsAFileNamed()
      Row for file welcome.txt in file list could not be found after 100 seconds (NoSuchElementException)
  Scenario: show deleted files for a second time                      # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files.feature:133
    Given I am logged in                                              # LoginPageContext::iAmLoggedIn()
    And I open the "Deleted files" section                            # AppNavigationContext::iOpenTheSection()
    And I see that the current section is "Deleted files"             # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    And I open the "All files" section                                # AppNavigationContext::iOpenTheSection()
    And I see that the current section is "All files"                 # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    And I delete "welcome.txt"                                        # FileListContext::iDelete()
    When I open the "Deleted files" section                           # AppNavigationContext::iOpenTheSection()
    Then I see that the current section is "Deleted files"            # AppNavigationContext::iSeeThatTheCurrentSectionIs()
    Then I see that the file list contains a file named "welcome.txt" # FileListContext::iSeeThatTheFileListContainsAFileNamed()
      Row for file welcome.txt in file list could not be found after 100 seconds (NoSuchElementException)
  Scenario: move a selection to another folder                                       # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files.feature:154
    Given I am logged in                                                             # LoginPageContext::iAmLoggedIn()
    And I create a new folder named "Folder"                                         # FileListContext::iCreateANewFolderNamed()
    And I create a new folder named "Not selected folder"                            # FileListContext::iCreateANewFolderNamed()
    And I create a new folder named "Destination"                                    # FileListContext::iCreateANewFolderNamed()
    When I select "welcome.txt"                                                      # FileListContext::iSelect()
    And I select "Folder"                                                            # FileListContext::iSelect()
    And I start the move or copy operation for the selected files                    # FileListContext::iStartTheMoveOrCopyOperationForTheSelectedFiles()
    And I select "Destination" in the file picker                                    # FilePickerContext::iSelectInTheFilePicker()
      Row for file Destination in the file picker dialog could not be found after 100 seconds (NoSuchElementException)
    And I move to the last selected folder in the file picker                        # FilePickerContext::iMoveToTheLastSelectedFolderInTheFilePicker()
    Then I see that the file list does not contain a file named "welcome.txt"        # FileListContext::iSeeThatTheFileListDoesNotContainAFileNamed()
    And I see that the file list does not contain a file named "Folder"              # FileListContext::iSeeThatTheFileListDoesNotContainAFileNamed()
    And I see that the file list contains a file named "Not selected folder"         # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I enter in the folder named "Destination"                                    # FileListContext::iEnterInTheFolderNamed()
    And I see that the file list contains a file named "welcome.txt"                 # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I see that the file list contains a file named "Folder"                      # FileListContext::iSeeThatTheFileListContainsAFileNamed()
    And I see that the file list does not contain a file named "Not selected folder" # FileListContext::iSeeThatTheFileListDoesNotContainAFileNamed()
  • TESTS=acceptance, TESTS-ACCEPTANCE=login
    • tests/acceptance/features/login.feature:38
Show full log
  Scenario: log in with invalid user once fixed by admin              # /drone/src/github.com/nextcloud/server/tests/acceptance/features/login.feature:38
    Given I act as John                                               # ActorContext::iActAs()
    And I can not log in with user unknownUser and password 123456acb # LoginPageContext::iCanNotLogInWithUserAndPassword()
    When I act as Jane                                                # ActorContext::iActAs()
    And I am logged in as the admin                                   # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                      # SettingsMenuContext::iOpenTheUserSettings()
    And I click the New user button                                   # UsersSettingsContext::iClickTheNewUserButton()
    And I see that the new user form is shown                         # UsersSettingsContext::iSeeThatTheNewUserFormIsShown()
    And I create user unknownUser with password 123456acb             # UsersSettingsContext::iCreateUserWithPassword()
    And I see that the list of users contains the user unknownUser    # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()
    And I act as John                                                 # ActorContext::iActAs()
    And I log in with user unknownUser and password 123456acb         # LoginPageContext::iLogInWithUserAndPassword()
    Then I see that the current page is the Files app                 # FilesAppContext::iSeeThatTheCurrentPageIsTheFilesApp()
      Failed asserting that 'http://acceptance-login/index.php/login?user=unknownUser' starts with "http://acceptance-login/index.php/apps/files/".
  • TESTS=acceptance, TESTS-ACCEPTANCE=users
    • tests/acceptance/features/users.feature:4
    • tests/acceptance/features/users.feature:13
    • tests/acceptance/features/users.feature:25
    • tests/acceptance/features/users.feature:35
    • tests/acceptance/features/users.feature:47
Show full log
  Scenario: create a new user                                       # /drone/src/github.com/nextcloud/server/tests/acceptance/features/users.feature:4
    Given I act as Jane                                             # ActorContext::iActAs()
    And I am logged in as the admin                                 # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                    # SettingsMenuContext::iOpenTheUserSettings()
    And I click the New user button                                 # UsersSettingsContext::iClickTheNewUserButton()
      New user button in Users Settings could not be found (NoSuchElementException)
    And I see that the new user form is shown                       # UsersSettingsContext::iSeeThatTheNewUserFormIsShown()
    When I create user unknownUser with password 123456acb          # UsersSettingsContext::iCreateUserWithPassword()
    Then I see that the list of users contains the user unknownUser # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()
  Scenario: create a new user with a custom display name                       # /drone/src/github.com/nextcloud/server/tests/acceptance/features/users.feature:13
    Given I am logged in as the admin                                          # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                               # SettingsMenuContext::iOpenTheUserSettings()
    When I click the New user button                                           # UsersSettingsContext::iClickTheNewUserButton()
    And I see that the new user form is shown                                  # UsersSettingsContext::iSeeThatTheNewUserFormIsShown()
    And I set the user name for the new user to "test"                         # UsersSettingsContext::iSetTheUserNameForTheNewUserTo()
    And I set the display name for the new user to "Test display name"         # UsersSettingsContext::iSetTheDisplayNameForTheNewUserTo()
    And I set the password for the new user to "123456acb"                     # UsersSettingsContext::iSetThePasswordForTheNewUserTo()
    And I create the new user                                                  # UsersSettingsContext::iCreateTheNewUser()
    Then I see that the list of users contains the user "test"                 # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()
    And I see that the display name for the user "test" is "Test display name" # UsersSettingsContext::iSeeThatTheDisplayNameForTheUserIs()
      Row for user test in Users Settings could not be found after 100 seconds
      displayName cell for user test in Users Settings could not be found after 100 seconds
      displayName input for user test in Users Settings could not be found after 100 seconds (NoSuchElementException)
  Scenario: delete a user                                                      # /drone/src/github.com/nextcloud/server/tests/acceptance/features/users.feature:25
    Given I act as Jane                                                        # ActorContext::iActAs()
    And I am logged in as the admin                                            # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                               # SettingsMenuContext::iOpenTheUserSettings()
    And I see that the list of users contains the user user0                   # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()
    And I open the actions menu for the user user0                             # UsersSettingsContext::iOpenTheActionsMenuOf()
    And I see that the "Delete user" action in the user0 actions menu is shown # UsersSettingsContext::iSeeTheAction()
      Failed asserting that false is true.
    When I click the "Delete user" action in the user0 actions menu            # UsersSettingsContext::iClickTheAction()
    Then I see that the list of users does not contains the user user0         # UsersSettingsContext::iSeeThatTheListOfUsersDoesNotContainsTheUser()
  Scenario: disable a user                                                      # /drone/src/github.com/nextcloud/server/tests/acceptance/features/users.feature:35
    Given I act as Jane                                                         # ActorContext::iActAs()
    And I am logged in as the admin                                             # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                                # SettingsMenuContext::iOpenTheUserSettings()
    And I see that the list of users contains the user user0                    # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()
    And I open the actions menu for the user user0                              # UsersSettingsContext::iOpenTheActionsMenuOf()
    And I see that the "Disable user" action in the user0 actions menu is shown # UsersSettingsContext::iSeeTheAction()
      Failed asserting that false is true.
    When I click the "Disable user" action in the user0 actions menu            # UsersSettingsContext::iClickTheAction()
    Then I see that the list of users does not contains the user user0          # UsersSettingsContext::iSeeThatTheListOfUsersDoesNotContainsTheUser()
    When I open the "Disabled users" section                                    # AppNavigationContext::iOpenTheSection()
    Then I see that the list of users contains the user user0                   # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()
  Scenario: users navigation without disabled users                                   # /drone/src/github.com/nextcloud/server/tests/acceptance/features/users.feature:47
    Given I act as Jane                                                               # ActorContext::iActAs()
    And I am logged in as the admin                                                   # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                                      # SettingsMenuContext::iOpenTheUserSettings()
    And I open the "Disabled users" section                                           # AppNavigationContext::iOpenTheSection()
    And I see that the list of users contains the user disabledUser                   # UsersSettingsContext::iSeeThatTheListOfUsersContainsTheUser()
    And I open the actions menu for the user disabledUser                             # UsersSettingsContext::iOpenTheActionsMenuOf()
    And I see that the "Enable user" action in the disabledUser actions menu is shown # UsersSettingsContext::iSeeTheAction()
      Failed asserting that false is true.
    When I click the "Enable user" action in the disabledUser actions menu            # UsersSettingsContext::iClickTheAction()
    Then I see that the section "Disabled users" is not shown                         # AppNavigationContext::iSeeThatTheSectionIsNotShown()
    When I open the User settings                                                     # SettingsMenuContext::iOpenTheUserSettings()
    Then I see that the section "Disabled users" is not shown                         # AppNavigationContext::iSeeThatTheSectionIsNotShown()

@MorrisJobke MorrisJobke merged commit 5decee6 into master Mar 5, 2019
@MorrisJobke MorrisJobke deleted the enhancement/noid/fulltextsearch-final-class branch March 5, 2019 10:21
@MorrisJobke MorrisJobke mentioned this pull request Mar 6, 2019
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants