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

[tests-only][full-ci] sharee cannot see activity #11637

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=10a67114f1866c3cc5ad6da9e435e6fdfcd36543
OCIS_COMMITID=8ba090e1e26b18dd997e054880afc7f5cf09f2a7
OCIS_BRANCH=master
6 changes: 3 additions & 3 deletions tests/e2e/cucumber/features/smoke/activity.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: Users can see all activities of the resources and spaces
# see activity in the shared resources
When "Brian" logs in
And "Brian" navigates to the shared with me page
Then "Brian" should see activity of the following resource
| resource | activity |
| sharedFolder/subFolder | alice added subFolder to sharedFolder |
Then "Brian" should not see any activity of the following resource
| resource |
| sharedFolder/subFolder |
And "Brian" logs out
12 changes: 12 additions & 0 deletions tests/e2e/cucumber/steps/ui/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -971,3 +971,15 @@ Then(
}
}
)

Then(
'{string} should not see any activity of the following resource(s)',
async function (this: World, stepUser: string, stepTable: DataTable): Promise<void> {
const { page } = this.actorsEnvironment.getActor({ key: stepUser })
const resourceObject = new objects.applicationFiles.Resource({ page })

for (const info of stepTable.hashes()) {
await resourceObject.checkEmptyActivity({ resource: info.resource })
}
}
)
18 changes: 18 additions & 0 deletions tests/e2e/support/objects/app-files/resource/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2077,3 +2077,21 @@ export const checkActivity = async ({
await expect(page.getByTestId(activitySidebarPanel)).toBeVisible()
await expect(page.locator(activitySidebarPanelBodyContent)).toContainText(activity)
}

export const checkEmptyActivity = async ({
page,
resource
}: {
page: Page
resource: string
}): Promise<void> => {
const paths = resource.split('/')
const finalResource = paths.pop()
for (const path of paths) {
await clickResource({ page, path })
}
await sidebar.open({ page: page, resource: finalResource })
await sidebar.openPanel({ page: page, name: 'activities' })
await expect(page.getByTestId(activitySidebarPanel)).toBeVisible()
await expect(page.locator(activitySidebarPanelBodyContent)).toContainText('No activities')
}
4 changes: 4 additions & 0 deletions tests/e2e/support/objects/app-files/resource/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,4 +360,8 @@ export class Resource {
}): Promise<void> {
await po.checkActivity({ page: this.#page, resource, activity })
}

async checkEmptyActivity({ resource }: { resource: string }): Promise<void> {
await po.checkEmptyActivity({ page: this.#page, resource })
}
}