mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
fix(dom) bug in Firefox with Imagus extension enabled: change getCurrentName to read from data-name instead of title (#313)
Separated out name generation/parsing logic. Added test case.
This commit is contained in:
parent
b6f30d1ccb
commit
c057b950c8
9 changed files with 122 additions and 25 deletions
|
|
@ -1,31 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const test = require('supertape');
|
||||
const stub = require('@cloudcmd/stub');
|
||||
|
||||
const btoa = require('../../common/btoa');
|
||||
|
||||
test('btoa: browser', (t) => {
|
||||
const btoaOriginal = global.btoa;
|
||||
const str = 'hello';
|
||||
|
||||
global.btoa = stub();
|
||||
|
||||
btoa(str);
|
||||
|
||||
t.calledWith(global.btoa, [str], 'should call global.btoa');
|
||||
t.end();
|
||||
|
||||
global.btoa = btoaOriginal;
|
||||
});
|
||||
|
||||
test('btoa: node', (t) => {
|
||||
const str = 'hello';
|
||||
const expected = 'aGVsbG8=';
|
||||
|
||||
const result = btoa(str);
|
||||
|
||||
t.equal(result, expected, 'should encode base64');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<span data-name="js-date" class="date reduce-text">date</span>
|
||||
<span data-name="js-owner" class="owner reduce-text">owner</span>
|
||||
<span data-name="js-mode" class="mode reduce-text">mode</span>
|
||||
</div><ul data-name="js-files" class="files"><li draggable="true" data-name="js-file-.." class="">
|
||||
</div><ul data-name="js-files" class="files"><li draggable="true" data-name="js-file-Li4=" class="">
|
||||
<span data-name="js-type" class="mini-icon directory"></span>
|
||||
<span data-name="js-name" class="name reduce-text"><a href="/fs/etc" title=".." draggable="true">..</a></span>
|
||||
<span data-name="js-size" class="size reduce-text"><dir></span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue