feat(picker): New folder button for Create New's custom folder picker

Turns on the picker's New folder button for "Choose the folder to create the
case in", the folder picker behind Create New's custom folder option.
This commit is contained in:
Devvyn committed 2026-11-05 07:30:29 +08:00
1 parent 2aa6016d33
commit cddfb48ea6
4 files changed
+11 -3

No files matched your search

+8 -1
View File
@@ -166,13 +166,20 @@ describe('PathPicker New folder', () => {
expect(doc.querySelector('.path-picker-overlay')).not.toBeNull();
});
it("is on for Create New's custom folder picker too", () => {
const start = sessionUiJs.indexOf('openNewCasePathPicker() {');
expect(sessionUiJs.slice(start, sessionUiJs.indexOf('PathPicker.open', start) + 400)).toContain(
'allowNewFolder: true'
);
});
it('is on for Link Existing and off for the other session-ui pickers', () => {
const block = (name: string) => {
const start = sessionUiJs.indexOf(`${name}() {`);
return sessionUiJs.slice(start, sessionUiJs.indexOf('PathPicker.open', start) + 400);
};
expect(block('openLinkCasePathPicker')).toContain('allowNewFolder: true');
for (const other of ['openDockerWorkspacePathPicker', 'openDockerWorkdirPicker', 'openNewCasePathPicker']) {
for (const other of ['openDockerWorkspacePathPicker', 'openDockerWorkdirPicker']) {
expect(block(other), other).not.toContain('allowNewFolder');
}
});