Initialize smartkvm package
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import { SmartBrowserKvm } from '../ts/smartkvm.classes.browserkvm.js';
|
||||
|
||||
tap.test('SmartBrowserKvm manual smoke test', async () => {
|
||||
if (!process.env.SMARTKVM_TEST_URL) {
|
||||
expect(true).toBeTrue();
|
||||
return;
|
||||
}
|
||||
|
||||
const kvm = new SmartBrowserKvm({
|
||||
url: process.env.SMARTKVM_TEST_URL,
|
||||
username: process.env.SMARTKVM_TEST_USERNAME,
|
||||
password: process.env.SMARTKVM_TEST_PASSWORD,
|
||||
headless: process.env.SMARTKVM_TEST_HEADLESS !== 'false',
|
||||
ignoreHttpsErrors: true,
|
||||
timeoutMs: 30000,
|
||||
});
|
||||
|
||||
try {
|
||||
await kvm.connect();
|
||||
const frame = await kvm.captureFrame();
|
||||
expect(frame.mimeType).toEqual('image/png');
|
||||
expect(frame.dataBase64).toBeTypeofString();
|
||||
} finally {
|
||||
await kvm.disconnect();
|
||||
}
|
||||
});
|
||||
|
||||
export default tap.start();
|
||||
Reference in New Issue
Block a user