nightwatch; fixed skeletons

This commit is contained in:
Steven Hugg 2021-05-22 12:00:44 -05:00
parent b1263513ed
commit 18d5e083d4
7 changed files with 2844 additions and 82 deletions

View File

@ -1,22 +1,34 @@
{
"src_folders" : ["test/web"],
src_folders : ["test/web"],
test_settings: {
default: {
launch_url: 'https://8bitworkshop.com',
},
"webdriver" : {
"start_process": true,
"server_path": "node_modules/.bin/chromedriver",
"port": 9515
},
"test_settings" : {
"default" : {
"desiredCapabilities": {
"browserName": "chrome"
safari: {
desiredCapabilities : {
browserName : 'safari',
alwaysMatch: {
acceptInsecureCerts: false
}
},
"screenshots" : {
"enabled" : "true",
"path" : "",
"on_failure": true,
"on_error": true
webdriver: {
port: 4445,
start_process: true,
server_path: '/usr/bin/safaridriver-doesntwork'
}
},
firefox: {
desiredCapabilities : {
browserName : 'firefox'
},
webdriver: {
start_process: true,
port: 4444,
server_path: require('geckodriver').path
}
}
}

2842
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -25,6 +25,7 @@
"bootstrap": "^3.4.1",
"bootstrap-tourist": "^0.2.1",
"btoa": "^1.2.x",
"chromedriver": "^90.0.1",
"clipboard": "^2.0.6",
"electron": "^9.4.0",
"electron-packager": "^15.2.0",
@ -36,6 +37,7 @@
"lzg": "^1.0.x",
"mocha": "^7.2.0",
"mousetrap": "^1.6.5",
"nightwatch": "^1.6.4",
"octokat": "^0.10.0",
"pngjs": "^3.4.0",
"rgbquant": "^1.1.2",
@ -56,6 +58,7 @@
"test-worker": "NODE_PATH=$(pwd) mocha --recursive --timeout 60000 test/cli/testworker.js",
"test-platforms": "NODE_PATH=$(pwd) mocha --recursive --timeout 60000 test/cli/testplatforms.js",
"test-profile": "NODE_PATH=$(pwd) mocha --recursive --timeout 60000 --prof test/cli",
"test-web": "nightwatch -e chrome test/web",
"start": "electron .",
"fuzzbasic": "jsfuzz gen/common/basic/fuzz.js ~/basic/corpus/ --versifier false",
"machine": "node gen/tools/runmachine.js"

View File

@ -84,7 +84,7 @@ __asm
LD SP,#0x4800
EI
; copy initialized data to RAM
LD BC, #l__INITIALIZER
LD BC, #l__INITIALIZER+1
LD A, B
LD DE, #s__INITIALIZED
LD HL, #s__INITIALIZER
@ -136,10 +136,6 @@ byte getchar(byte x, byte y) {
volatile byte video_framecount; // actual framecount
void reset_video_framecount() __critical {
video_framecount = 0;
}
void _buffer() {
__asm
; padding to get to offset 0x66
@ -149,6 +145,7 @@ __asm
nop
nop
nop
nop
__endasm;
}
@ -156,6 +153,11 @@ void rst_66() __interrupt {
video_framecount++;
}
void reset_video_framecount() __critical {
video_framecount = 0;
}
void putchar(byte x, byte y, byte ch) {
vram[29-x][y] = ch;
}
@ -173,6 +175,12 @@ void putstring(byte x, byte y, const char* string) {
}
}
void wait_for_frame() {
byte initial_framecount = video_framecount;
watchdog++;
while (video_framecount == initial_framecount);
}
///
void main() {
@ -180,5 +188,7 @@ void main() {
clrobjs();
enable_stars = 0xff;
enable_irq = 1;
main();
while (1) {
wait_for_frame();
}
}

View File

@ -32,7 +32,6 @@ void start() {
__asm
LD SP,#0x2400
EI
NOP
__endasm;
main();
}
@ -46,7 +45,6 @@ __asm
NOP
NOP
NOP
NOP
__endasm;
scanline96();
}

View File

@ -153,8 +153,9 @@ void draw_box(word x1, byte y1, word x2, byte y2, byte color) {
static byte frame = 0;
void main() {
palette[0] = 0x11;
palette[1] = 0xff+frame++;
blit_solid(0,0,25,25,0x11);
main();
palette[0] = 0x88;
memset(vidmem, 0, sizeof(vidmem));
while (1) {
blit_solid(0,0,25,25,frame++);
}
}

View File

@ -29,8 +29,8 @@ function testDebugging(browser) {
.click('#dbg_step')
.waitForElementVisible('#dbg_step.btn_stopped')
.waitForElementVisible('#mem_info')
.click('#dbg_reset')
.waitForElementVisible('#dbg_reset.btn_stopped')
.click('#dbg_restart')
.waitForElementVisible('#dbg_restart.btn_stopped')
.waitForElementVisible('#mem_info')
.click('#dbg_tovsync')
.waitForElementVisible('#dbg_tovsync.btn_stopped')