mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 18:39:33 +01:00
fix(clone): refresh the preview after the preflight, tidy wording and the invariants paragraph
This commit is contained in:
1 parent
d2c75784d3
commit
a4bd35b704
3 files changed
+18
-3
No files matched your search
@@ -72,4 +72,18 @@ describe('Clone Repo custom folder', () => {
|
||||
const { body } = await requestBody(fetchMock);
|
||||
expect(body.path).toBeUndefined();
|
||||
});
|
||||
|
||||
it('refreshes the preview when the preflight replaces the case name', () => {
|
||||
const { app, doc, set } = bootClone();
|
||||
set('cloneRepoUrl', 'https://github.com/opticon454/bifrost?tab=readme-ov-file');
|
||||
set('cloneCaseName', 'bifrost-tab-readme-ov-file');
|
||||
set('cloneCasePath', '/mnt/projects');
|
||||
app.updateCloneCasePathPreview();
|
||||
expect(doc.getElementById('cloneCasePathPreview')?.textContent).toBe(
|
||||
'Will clone into: /mnt/projects/bifrost-tab-readme-ov-file'
|
||||
);
|
||||
app._applyClonePreflight({ gitAvailable: true, parse: { cloneable: true, suggestedName: 'bifrost' } }, '');
|
||||
expect((doc.getElementById('cloneCaseName') as HTMLInputElement).value).toBe('bifrost');
|
||||
expect(doc.getElementById('cloneCasePathPreview')?.textContent).toBe('Will clone into: /mnt/projects/bifrost');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user