forked from xtermjs/xterm.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
131 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (c) 2019 The xterm.js authors. All rights reserved. | ||
* @license MIT | ||
*/ | ||
|
||
import test from '@playwright/test'; | ||
import { ISharedRendererTestContext, injectSharedRendererTests } from '../../../out-test/playwright/SharedRendererTests'; | ||
import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils'; | ||
import { platform } from 'os'; | ||
|
||
let ctx: ITestContext; | ||
const ctxWrapper: ISharedRendererTestContext = { | ||
value: undefined, | ||
skipSelectionTests: true | ||
} as any; | ||
test.beforeAll(async ({ browser }) => { | ||
ctx = await createTestContext(browser); | ||
await openTerminal(ctx); | ||
ctxWrapper.value = ctx; | ||
await ctx.page.evaluate(` | ||
window.addon = new CanvasAddon(true); | ||
window.term.loadAddon(window.addon); | ||
`); | ||
}); | ||
test.afterAll(async () => await ctx.page.close()); | ||
|
||
test.describe('Canvas Renderer Integration Tests', async () => { | ||
// HACK: webgl2 is often not supported in headless firefox on Linux | ||
// https://github.com/microsoft/playwright/issues/11566 | ||
if (platform() === 'linux') { | ||
test.skip(({ browserName }) => browserName === 'firefox'); | ||
} | ||
|
||
injectSharedRendererTests(ctxWrapper); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { PlaywrightTestConfig } from '@playwright/test'; | ||
|
||
const config: PlaywrightTestConfig = { | ||
testDir: '.', | ||
timeout: 10000, | ||
projects: [ | ||
{ | ||
name: 'Chrome Stable', | ||
use: { | ||
browserName: 'chromium', | ||
channel: 'chrome' | ||
} | ||
}, | ||
{ | ||
name: 'Firefox Stable', | ||
use: { | ||
browserName: 'firefox' | ||
} | ||
}, | ||
{ | ||
name: 'WebKit', | ||
use: { | ||
browserName: 'webkit' | ||
} | ||
} | ||
], | ||
reporter: 'list', | ||
webServer: { | ||
command: 'npm start', | ||
port: 3000, | ||
timeout: 120000, | ||
reuseExistingServer: !process.env.CI | ||
} | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es2015", | ||
"lib": [ | ||
"es6", | ||
], | ||
"rootDir": ".", | ||
"outDir": "../out-test", | ||
"sourceMap": true, | ||
"removeComments": true, | ||
"baseUrl": ".", | ||
"paths": { | ||
"common/*": [ | ||
"../../../src/common/*" | ||
], | ||
"browser/*": [ | ||
"../../../src/browser/*" | ||
] | ||
}, | ||
"strict": true, | ||
"types": [ | ||
"../../../node_modules/@types/node", | ||
"../../../node_modules/@lunapaint/png-codec", | ||
"../../../out-test/playwright/TestUtils", | ||
"../../../out-test/playwright/SharedRendererTests" | ||
] | ||
}, | ||
"include": [ | ||
"./**/*", | ||
"../../../typings/xterm.d.ts" | ||
], | ||
"references": [ | ||
{ | ||
"path": "../../../src/common" | ||
}, | ||
{ | ||
"path": "../../../src/browser" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"files": [], | ||
"include": [], | ||
"references": [ | ||
{ "path": "./src" } | ||
{ "path": "./src" }, | ||
{ "path": "./test" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters