Skip to content

Commit

Permalink
Fix ocis e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Apr 14, 2022
1 parent 9814639 commit cf77878
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/web-runtime/src/components/UploadInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<span v-text="uploadInfoTitle" />
</span>

<oc-button appearance="raw" @click="closeInfo">
<oc-button id="close-upload-info-btn" appearance="raw" @click="closeInfo">
<oc-icon name="close" />
</oc-button>
</div>
Expand Down
9 changes: 4 additions & 5 deletions tests/e2e/support/objects/app-files/resource/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,12 @@ export const uploadResource = async (args: uploadResourceArgs): Promise<void> =>
await page.locator('#fileUploadInput').setInputFiles(resources.map((file) => file.path))

if (createVersion) {
const fileName = resources.map((file) => path.basename(file.name))
await Promise.all([
page.waitForResponse((resp) => resp.url().endsWith(fileName[0]) && resp.status() === 204),
page.locator('.oc-modal-body-actions-confirm').click()
])
await page.locator('.oc-modal-body-actions-confirm').click()
// @TODO check if upload was successful
}

await page.locator('#close-upload-info-btn').click()

await waitForResources({
page: page,
names: resources.map((file) => path.basename(file.name))
Expand Down

0 comments on commit cf77878

Please sign in to comment.