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
|
||||
|
||||
* 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
|
||||
### v 1.2
|
||||
|
||||
|
@ -200,8 +200,7 @@
|
||||
transform
|
||||
-translate-x-1/2
|
||||
text-center
|
||||
top-1/2
|
||||
-translate-y-1/2
|
||||
|
||||
"
|
||||
@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 vuexStore from '../../src/store/index'
|
||||
import {
|
||||
createNewAscii
|
||||
createNewAscii,
|
||||
exportMirc,
|
||||
mergeLayers,
|
||||
cyrb53
|
||||
} from '../../src/ascii'
|
||||
import 'jest-canvas-mock';
|
||||
import hotkeysImport from 'hotkeys-js';
|
||||
@ -27,14 +30,6 @@ describe('Editor.vue', () => {
|
||||
let store
|
||||
|
||||
beforeEach(() => {
|
||||
// state = {
|
||||
// clicks: 2
|
||||
// }
|
||||
|
||||
// actions = {
|
||||
// moduleActionClick: jest.fn()
|
||||
// }
|
||||
|
||||
store = vuexStore
|
||||
hotkeys = hotkeysImport
|
||||
|
||||
@ -58,7 +53,6 @@ describe('Editor.vue', () => {
|
||||
hotkeys
|
||||
})
|
||||
|
||||
|
||||
expect(store.getters.asciibirdMeta[0]).toStrictEqual({
|
||||
"title": "New Test ASCII",
|
||||
"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