-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(renterd): bulk move files via multiselect drag interaction
- Loading branch information
1 parent
be794d5
commit 5f1cb4b
Showing
10 changed files
with
347 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'renterd': minor | ||
--- | ||
|
||
Files and directories can now be selected and moved in bulk to a destination folder. This works even when selecting files (and entire directories) from across multiple different origin directories. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { test } from '@playwright/test' | ||
import { navigateToBuckets } from '../fixtures/navigate' | ||
import { createBucket, openBucket } from '../fixtures/buckets' | ||
import { | ||
getFileRowById, | ||
openDirectory, | ||
createFilesMap, | ||
expectFilesMap, | ||
} from '../fixtures/files' | ||
import { afterTest, beforeTest } from '../fixtures/beforeTest' | ||
import { hoverMouseOver, moveMouseOver } from '@siafoundation/e2e' | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await beforeTest(page, { | ||
hostdCount: 3, | ||
}) | ||
}) | ||
|
||
test.afterEach(async () => { | ||
await afterTest() | ||
}) | ||
|
||
test('move two files by selecting and dragging from one directory out to another', async ({ | ||
page, | ||
}) => { | ||
test.setTimeout(120_000) | ||
const bucketName = 'bucket1' | ||
await navigateToBuckets({ page }) | ||
await createBucket(page, bucketName) | ||
await createFilesMap(page, bucketName, { | ||
'file1.txt': null, | ||
dir1: { | ||
'file2.txt': null, | ||
}, | ||
dir2: { | ||
'file3.txt': null, | ||
'file4.txt': null, | ||
'file5.txt': null, | ||
}, | ||
}) | ||
await navigateToBuckets({ page }) | ||
await openBucket(page, bucketName) | ||
|
||
await openDirectory(page, 'bucket1/dir2/') | ||
|
||
// Select file3 and file4. | ||
const file3 = await getFileRowById(page, 'bucket1/dir2/file3.txt', true) | ||
await file3.click() | ||
const file4 = await getFileRowById(page, 'bucket1/dir2/file4.txt', true) | ||
await file4.click() | ||
|
||
await moveMouseOver(page, file3) | ||
await page.mouse.down() | ||
|
||
const parentDir = await getFileRowById(page, '..', true) | ||
await hoverMouseOver(page, parentDir) | ||
|
||
const file1 = await getFileRowById(page, 'bucket1/file1.txt', true) | ||
await moveMouseOver(page, file1) | ||
await page.mouse.up() | ||
|
||
await expectFilesMap(page, bucketName, { | ||
'file1.txt': 'visible', | ||
'file3.txt': 'visible', | ||
'file4.txt': 'visible', | ||
dir1: { | ||
'file2.txt': 'visible', | ||
}, | ||
dir2: { | ||
'file5.txt': 'visible', | ||
'file3.txt': 'hidden', | ||
'file4.txt': 'hidden', | ||
}, | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.