-
Notifications
You must be signed in to change notification settings - Fork 366
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
E2E upload object test #8631
E2E upload object test #8631
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Some minor (I hope) comments
test("Create repo", async ({page}) => { | ||
const repositoriesPage = new RepositoriesPage(page); | ||
await repositoriesPage.goto(); | ||
await repositoriesPage.createRepository(TEST_REPO_NAME, true); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The create repository should be a step in the same test, the upload file test shouldn't test the create repository step
|
||
const repositoryPage = new RepositoryPage(page); | ||
await repositoryPage.uploadObject(filePath); | ||
await expect(page.getByRole('complementary')).toContainText(`lakefs://${TEST_REPO_NAME}/main/${FILE_NAME}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a check that we can see the new file at the right path.
async uploadObject(filePath: string): Promise<void> { | ||
await this.page.getByRole("button", { name: "Upload Object" }).click(); | ||
await this.page.getByText("Drag 'n' drop files or").click(); | ||
const fileInput = await this.page.locator('input[type="file"]'); | ||
await fileInput.setInputFiles(filePath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async uploadObject(filePath: string): Promise<void> { | |
await this.page.getByRole("button", { name: "Upload Object" }).click(); | |
await this.page.getByText("Drag 'n' drop files or").click(); | |
const fileInput = await this.page.locator('input[type="file"]'); | |
await fileInput.setInputFiles(filePath); | |
async uploadObject(filePath: string): Promise<void> { | |
await this.page.getByRole("button", { name: "Upload Object" }).click(); | |
await this.page.getByText("Drag 'n' drop files or").click(); | |
const fileInput = await this.page.locator('input[type="file"]'); | |
await fileInput.setInputFiles(filePath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job!
If you want to verify this indeed catches the bug we had you can try running this test scenario on v1.48.2 and see if it fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Closes #8542