Skip to content

Commit

Permalink
Tika version is fixed, adding tag using API
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed Jun 21, 2023
1 parent d83ee28 commit 66f312a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FEDERATED = 2
NOTIFICATIONS = 3

ALPINE_GIT = "alpine/git:latest"
APACHE_TIKA = "apache/tika:latest"
APACHE_TIKA = "apache/tika:2.8.0.0"
DEEPDIVER_DOCKER_ORACLE_XE_11G = "deepdiver/docker-oracle-xe-11g:latest"
DRONE_CLI_ALPINE = "drone/cli:alpine"
MINIO_MC = "minio/mc:RELEASE.2021-10-07T04-19-58Z"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ services:
command: tika:9998

tika:
image: apache/tika:latest
image: apache/tika:2.8.0.0
container_name: web_tika
ports:
- 9998:9998
Expand Down
15 changes: 1 addition & 14 deletions tests/e2e/cucumber/features/smoke/fullTextSearch.ocis.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Feature: Search
And "Admin" assigns following roles to the users using API
| id | role |
| Brian | Space Admin |

And "Alice" logs in
And "Alice" creates the following folder in personal space using API
| name |
Expand All @@ -24,7 +23,6 @@ Feature: Search
And "Alice" shares the following resource using API
| resource | recipient | type | role |
| folderToShare | Brian | user | Can edit |

And "Brian" logs in
And "Brian" accepts the following share using API
| name |
Expand All @@ -38,7 +36,6 @@ Feature: Search
| filesForUpload/textfile.txt | fileWithTag.txt |
| filesForUpload/textfile.txt | withTag.txt |
| filesForUpload/textfile.txt | testFolder/innerTextfile.txt |

And "Brian" creates the following project spaces using API
| name | id |
| FullTextSearch | fulltextsearch.1 |
Expand All @@ -50,18 +47,13 @@ Feature: Search
| spaceFolder/spaceTextfile.txt | This is test file. |

And "Brian" opens the "files" app
# And "Brian" adds the following tags for the following resources using API
# | resource | tags |
# | fileWithTag.txt | tag 1 |
# | withTag.txt | tag 1 |
And "Brian" adds the following tags for the following resources using the sidebar panel
| resource | tags |
| fileWithTag.txt | tag 1 |
| withTag.txt | tag 1 |

Scenario: Search for content of file
And "Brian" opens the "files" app

Scenario: Search for content of file
When "Brian" searches "" using the global search bar
Then "Brian" should see the message "Search for files" on the webUI

Expand Down Expand Up @@ -94,9 +86,4 @@ Feature: Search
| fileToShare.txt |
| fileWithTag.txt |
| withTag.txt |

When "Brian" opens the following file in texteditor
| resource |
| textfile.txt |
Then "Brian" should see the message "No results found" on the webUI
And "Brian" logs out
19 changes: 0 additions & 19 deletions tests/e2e/cucumber/steps/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,22 +298,3 @@ Given(
}
}
)

// Given(
// '{string} adds the following tags for the following resources using API',
// async function (
// this: World,
// stepUser: string,
// stepTable: DataTable
// ): Promise<void> {
// const user = this.usersEnvironment.getUser({ key: stepUser })
// for (const info of stepTable.hashes()) {
// await api.graph.addTagsToTheResource({
// user,
// shareWith: info.user,
// shareType: info.shareType,
// role: info.role
// })
// }
// }
// )
6 changes: 3 additions & 3 deletions tests/e2e/cucumber/steps/ui/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,15 @@ When(
)

When(
/^"([^"].*)" opens the following file(?:s)? in (mediaviewer|pdfviewer|texteditor)$/,
/^"([^"].*)" opens the following file(?:s)? in (mediaviewer|pdfviewer)$/,
async function (this: World, stepUser: string, actionType: string, stepTable: DataTable) {
const { page } = this.actorsEnvironment.getActor({ key: stepUser })
const resourceObject = new objects.applicationFiles.Resource({ page })

for (const info of stepTable.hashes()) {
await resourceObject.openFile({
await resourceObject.openFileInViewer({
name: info.resource,
actionType: actionType as 'mediaviewer' | 'pdfviewer' | 'texteditor'
actionType: actionType as 'mediaviewer' | 'pdfviewer'
})
}
}
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/support/objects/app-files/resource/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const checkBoxForTrashbin = `//*[@data-test-resource-path="%s"]//ancestor::tr//i
export const fileRow =
'//ancestor::*[(contains(@class, "oc-tile-card") or contains(@class, "oc-tbody-tr"))]'
export const resourceNameSelector =
':is(#files-space-table, .oc-tiles-item, #files-shared-with-me-accepted-section, .files-table) [data-test-resource-name="%s"]'
':is(#files-space-table, .oc-tiles-item, #files-shared-with-me-accepted-section) [data-test-resource-name="%s"]'
const breadcrumbResourceNameSelector =
'//span[contains(@class, "oc-breadcrumb-item-text") and text()="%s"]'
const addNewResourceButton = `#new-file-menu-btn`
Expand Down Expand Up @@ -1108,13 +1108,13 @@ export const removeTagsFromResource = async (args: resourceTagsArgs): Promise<vo
await sidebar.close({ page })
}

export interface openFileArgs {
export interface openFileInViewerArgs {
page: Page
name: string
actionType: 'mediaviewer' | 'pdfviewer' | 'texteditor'
actionType: 'mediaviewer' | 'pdfviewer'
}

export const openFile = async (args: openFileArgs): Promise<void> => {
export const openFileInViewer = async (args: openFileInViewerArgs): Promise<void> => {
const { page, name, actionType } = args

if (actionType === 'mediaviewer') {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/support/objects/app-files/resource/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ export class Resource {
await po.editResources({ ...args, page: this.#page })
}

async openFile(args: Omit<po.openFileArgs, 'page'>): Promise<void> {
await po.openFile({ ...args, page: this.#page })
async openFileInViewer(args: Omit<po.openFileInViewerArgs, 'page'>): Promise<void> {
await po.openFileInViewer({ ...args, page: this.#page })
}

async addTags(args: Omit<po.resourceTagsArgs, 'page'>): Promise<void> {
Expand Down

0 comments on commit 66f312a

Please sign in to comment.