Skip to content

Commit

Permalink
test(refactor): try to select multiple action texts
Browse files Browse the repository at this point in the history
  • Loading branch information
anon-pradip committed Aug 19, 2024
1 parent 8ea256a commit 9ff8cfa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The version of OCIS to use in pipelines that test against OCIS
OCIS_COMMITID=ed101c14e3b3b8dbcd4cc35084edda0545ad5ce8
OCIS_COMMITID=b4dab08608d5ff5bb8ab81da312a24e49c7a0bb6
OCIS_BRANCH=master
3 changes: 2 additions & 1 deletion tests/e2e/cucumber/features/app-provider/urlJourneys.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: url stability for mobile and desktop client
# This is a minimal test for the integration of ocis with different online office suites like Collabora and OnlyOffice
# Check that the file can be opened in collabora or onlyoffice using the url. https://github.com/owncloud/web/issues/9897


Scenario: open office suite files with Collabora and onlyOffice
Given "Admin" creates following users using API
| id |
Expand All @@ -18,6 +18,7 @@ Feature: url stability for mobile and desktop client
And "Alice" creates the following resources
| resource | type | content |
| MicrosoftWord.docx | Microsoft Word | Microsoft Word Content |
And for "Alice" file "MicrosoftWord.docx" should not be locked
And "Alice" opens the "files" app

# desktop feature
Expand Down
8 changes: 5 additions & 3 deletions tests/e2e/cucumber/steps/ui/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,8 @@ Then(

actionType === 'should'
? await expect(lockLocator).toBeVisible()
: await expect(lockLocator).not.toBeVisible()
: // can take more than 5 seconds for lock to be released in case of OnlyOffice
await expect(lockLocator).not.toBeVisible({ timeout: config.timeout })
}
)

Expand Down Expand Up @@ -926,10 +927,11 @@ Then(
const { page } = this.actorsEnvironment.getActor({ key: stepUser })
const resourceObject = new objects.applicationFiles.Resource({ page })
for (const info of stepTable.hashes()) {
const actions = await resourceObject.getAllAvailableActions({ resource })
if (actionType === 'should') {
expect(await resourceObject.getAllAvailableActions({ resource })).toContain(info.action)
expect(actions.some((action) => action.startsWith(info.action))).toBe(true)
} else {
expect(await resourceObject.getAllAvailableActions({ resource })).not.toContain(info.action)
expect(actions.some((action) => action.startsWith(info.action))).toBe(false)
}
}
}
Expand Down

0 comments on commit 9ff8cfa

Please sign in to comment.