Fix: file-manager and swarm-desktop bugs (#714)
- drive capacity display with stamp polling - download/upload progress handling - overlay and tooltip issues - FileMaganger readme - ultra-light mode handling - account feed view page - download media files - remove not found syncing link - fix ultra light node wallet page - tooltip issues --------- Co-authored-by: Andrei Mitrea <andrei.mitrea.hq@gmail.com> Co-authored-by: nidishk <nidishkrishnan45@gmail.com> Co-authored-by: Ferenc Sárai <sarai.ferenc@gmail.com> Co-authored-by: Nándor Komlódi <nandor.komlodi@gmail.com> Co-authored-by: rolandlor <33499567+rolandlor@users.noreply.github.com>
This commit is contained in:
+21
-5
@@ -1,22 +1,38 @@
|
||||
import { detectIndexHtml } from './file'
|
||||
|
||||
describe('file utils', () => {
|
||||
it('detectIndexHtml should find index.html', () => {
|
||||
it('detectIndexHtml should find index.html with multiple files', () => {
|
||||
expect(
|
||||
detectIndexHtml([
|
||||
{ name: 'swarm.png', path: 'swarm.png' },
|
||||
{ name: 'index.html', path: 'index.html' },
|
||||
]),
|
||||
).toBe('index.html')
|
||||
).toEqual({ indexPath: 'index.html' })
|
||||
})
|
||||
|
||||
it('detectIndexHtml should find index.htm', () => {
|
||||
it('detectIndexHtml should find index.htm with multiple files', () => {
|
||||
expect(
|
||||
detectIndexHtml([
|
||||
{ name: 'index.htm', path: 'index.htm' },
|
||||
{ name: 'swarm.png', path: 'swarm.png' },
|
||||
]),
|
||||
).toBe('index.htm')
|
||||
).toEqual({ indexPath: 'index.htm' })
|
||||
})
|
||||
|
||||
it('detectIndexHtml should NOT detect single index.html file as website', () => {
|
||||
expect(
|
||||
detectIndexHtml([
|
||||
{ name: 'index.html', path: 'index.html' },
|
||||
]),
|
||||
).toBe(false)
|
||||
})
|
||||
|
||||
it('detectIndexHtml should NOT detect single index.htm file as website', () => {
|
||||
expect(
|
||||
detectIndexHtml([
|
||||
{ name: 'index.htm', path: 'index.htm' },
|
||||
]),
|
||||
).toBe(false)
|
||||
})
|
||||
|
||||
it('detectIndexHtml should find nested index.html', () => {
|
||||
@@ -25,7 +41,7 @@ describe('file utils', () => {
|
||||
{ name: 'swarm.png', path: 'sample-folder/swarm.png' },
|
||||
{ name: 'index.html', path: 'sample-folder/index.html' },
|
||||
]),
|
||||
).toBe('index.html')
|
||||
).toEqual({ indexPath: 'sample-folder/index.html', commonPrefix: 'sample-folder/' })
|
||||
})
|
||||
|
||||
it('detectIndexHtml should not find nested index.htm when ambigous', () => {
|
||||
|
||||
Reference in New Issue
Block a user