new splash ascii, test cases
This commit is contained in:
parent
0f37686ebc
commit
571f8b89af
@ -83,6 +83,8 @@ A most latest production build to use is available at https://asciibird.jewbird.
|
|||||||
### Working on now
|
### Working on now
|
||||||
|
|
||||||
* If you drag a panel, then right click you can't drag it anymore
|
* If you drag a panel, then right click you can't drag it anymore
|
||||||
|
* Resize canvas undo
|
||||||
|
* When undoing blocks defaults to current fg instead of blocks fg
|
||||||
* Unit testing
|
* Unit testing
|
||||||
### v 1.2
|
### v 1.2
|
||||||
|
|
||||||
|
@ -200,8 +200,7 @@
|
|||||||
transform
|
transform
|
||||||
-translate-x-1/2
|
-translate-x-1/2
|
||||||
text-center
|
text-center
|
||||||
top-1/2
|
|
||||||
-translate-y-1/2
|
|
||||||
"
|
"
|
||||||
@mouseup.right="openContextMenu"
|
@mouseup.right="openContextMenu"
|
||||||
>
|
>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -6,7 +6,10 @@ import Vuex from 'vuex'
|
|||||||
import Editor from '@/views/Editor.vue'
|
import Editor from '@/views/Editor.vue'
|
||||||
import vuexStore from '../../src/store/index'
|
import vuexStore from '../../src/store/index'
|
||||||
import {
|
import {
|
||||||
createNewAscii
|
createNewAscii,
|
||||||
|
exportMirc,
|
||||||
|
mergeLayers,
|
||||||
|
cyrb53
|
||||||
} from '../../src/ascii'
|
} from '../../src/ascii'
|
||||||
import 'jest-canvas-mock';
|
import 'jest-canvas-mock';
|
||||||
import hotkeysImport from 'hotkeys-js';
|
import hotkeysImport from 'hotkeys-js';
|
||||||
@ -27,14 +30,6 @@ describe('Editor.vue', () => {
|
|||||||
let store
|
let store
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
// state = {
|
|
||||||
// clicks: 2
|
|
||||||
// }
|
|
||||||
|
|
||||||
// actions = {
|
|
||||||
// moduleActionClick: jest.fn()
|
|
||||||
// }
|
|
||||||
|
|
||||||
store = vuexStore
|
store = vuexStore
|
||||||
hotkeys = hotkeysImport
|
hotkeys = hotkeysImport
|
||||||
|
|
||||||
@ -58,7 +53,6 @@ describe('Editor.vue', () => {
|
|||||||
hotkeys
|
hotkeys
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
expect(store.getters.asciibirdMeta[0]).toStrictEqual({
|
expect(store.getters.asciibirdMeta[0]).toStrictEqual({
|
||||||
"title": "New Test ASCII",
|
"title": "New Test ASCII",
|
||||||
"history": [],
|
"history": [],
|
||||||
@ -83,4 +77,51 @@ describe('Editor.vue', () => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
it('new ascii exports as expected', () => {
|
||||||
|
const wrapper = mount(Editor, {
|
||||||
|
store,
|
||||||
|
localVue,
|
||||||
|
hotkeys
|
||||||
|
})
|
||||||
|
|
||||||
|
// Blank ascii exported to mIRC
|
||||||
|
let mircExportHash = cyrb53(exportMirc(mergeLayers()).output.join(""));
|
||||||
|
|
||||||
|
expect(mircExportHash).toEqual(182731023251036);
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
it('fill tool on new ascii and export', () => {
|
||||||
|
const wrapper = mount(Editor, {
|
||||||
|
store,
|
||||||
|
localVue,
|
||||||
|
hotkeys,
|
||||||
|
})
|
||||||
|
|
||||||
|
wrapper.vm.x = 1;
|
||||||
|
wrapper.vm.y = 1;
|
||||||
|
|
||||||
|
wrapper.vm.fill(false);
|
||||||
|
|
||||||
|
// Black canvas fill
|
||||||
|
let mircExportHash = cyrb53(exportMirc(mergeLayers()).output.join(""));
|
||||||
|
expect(mircExportHash).toEqual(8495140863968528);
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// it('brush tool on new ascii and export', () => {
|
||||||
|
// const wrapper = mount(Editor, {
|
||||||
|
// store,
|
||||||
|
// localVue,
|
||||||
|
// hotkeys,
|
||||||
|
// })
|
||||||
|
|
||||||
|
// // Black canvas fill
|
||||||
|
// let mircExportHash = cyrb53(exportMirc(mergeLayers()).output.join(""));
|
||||||
|
// expect(mircExportHash).toEqual(182731023251036);
|
||||||
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user