Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,10 @@ void shouldUploadAFolder(@TempDir Path tmpDir) throws IOException {
}

@Test
void shouldUploadAFolderAndThrowForMultipleDirectories() throws IOException {
void shouldUploadAFolderAndThrowForMultipleDirectories(@TempDir Path tmpDir) throws IOException {
page.navigate(server.PREFIX + "/input/folderupload.html");
Locator input = page.locator("input[name=\"file1\"]");
Path dir = Paths.get("file-upload-test"); // Adjust path as necessary
Path dir = tmpDir.resolve("file-upload-test");
Files.createDirectories(dir.resolve("folder1"));
writeFile(dir.resolve("folder1").resolve("file1.txt"), "file1 content");
Files.createDirectories(dir.resolve("folder2"));
Expand All @@ -485,11 +485,11 @@ void shouldUploadAFolderAndThrowForMultipleDirectories() throws IOException {
}

@Test
void shouldThrowIfADirectoryAndFilesArePassed() throws IOException {
void shouldThrowIfADirectoryAndFilesArePassed(@TempDir Path tmpDir) throws IOException {
// Skipping conditions based on environment not directly translatable to Java; needs custom implementation
page.navigate(server.PREFIX + "/input/folderupload.html");
Locator input = page.locator("input[name=\"file1\"]");
Path dir = Paths.get("file-upload-test"); // Adjust path as necessary
Path dir = tmpDir.resolve("file-upload-test");
Files.createDirectories(dir.resolve("folder1"));
writeFile(dir.resolve("folder1").resolve("file1.txt"), "file1 content");
PlaywrightException e = assertThrows(PlaywrightException.class,
Expand All @@ -498,10 +498,10 @@ void shouldThrowIfADirectoryAndFilesArePassed() throws IOException {
}

@Test
void shouldThrowWhenUploadingAFolderInANormalFileUploadInput() throws IOException {
void shouldThrowWhenUploadingAFolderInANormalFileUploadInput(@TempDir Path tmpDir) throws IOException {
page.navigate(server.PREFIX + "/input/fileupload.html");
Locator input = page.locator("input[name=\"file1\"]");
Path dir = Paths.get("file-upload-test"); // Adjust path as necessary
Path dir = tmpDir.resolve("file-upload-test");
Files.createDirectories(dir);
writeFile(dir.resolve("file1.txt"), "file1 content");
PlaywrightException e = assertThrows(PlaywrightException.class,
Expand Down
Loading