Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha committed Jan 9, 2023
1 parent a4fdc34 commit 5fc4642
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/e2e/cucumber/steps/ui/shares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ Then(
const shareObject = new objects.applicationFiles.Share({ page })
for (const { resource, owner } of stepTable.hashes()) {
const isAcceptedSharePresent = await shareObject.isAcceptedSharePresent(resource, owner)
expect(isAcceptedSharePresent).toBe(shouldExist)
expect(isAcceptedSharePresent, '${resource} does not exist in accepted share').toBe(
shouldExist
)
}
}
)
4 changes: 2 additions & 2 deletions tests/e2e/support/objects/app-files/share/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { errors, Page } from 'playwright'
import util from 'util'

const acceptedShareList =
const acceptedShareItem =
'//*[@data-test-resource-name="%s"]/ancestor::tr//span[@data-test-user-name="%s"]'
export const acceptedShareExists = async ({
page,
Expand All @@ -16,7 +16,7 @@ export const acceptedShareExists = async ({
}): Promise<boolean> => {
let exist = true
await page
.waitForSelector(util.format(acceptedShareList, resource, owner), { timeout })
.waitForSelector(util.format(acceptedShareItem, resource, owner), { timeout })
.catch((e) => {
if (!(e instanceof errors.TimeoutError)) {
throw e
Expand Down

0 comments on commit 5fc4642

Please sign in to comment.