chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:46:20 +08:00
commit eb21b65815
830 changed files with 113645 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
const delay = require('./wait')
const { expect } = require('./expect')
exports.basicTerminalTest = async (client, cmd) => {
async function focus () {
client.click('.session-current .term-wrap')
}
async function selectAll () {
await client.keyboard.press('Meta+A')
await delay(401)
}
async function copy () {
await selectAll()
await client.keyboard.press('Meta+C')
await delay(401)
}
await copy()
const text1 = await client.readClipboard()
await delay(301)
await focus()
await delay(1010)
await client.keyboard.type(cmd)
await client.keyboard.press('Enter')
await delay(1011)
await copy()
await delay(101)
const text2 = await client.readClipboard()
expect(text1.trim().length).lessThan(text2.trim().length)
}
exports.getTerminalContent = async function (client) {
await client.click('.session-current .term-wrap')
await delay(300)
await client.keyboard.press('Meta+A')
await delay(300)
await client.keyboard.press('Meta+C')
await delay(300)
const clipboardText = await client.readClipboard()
await client.keyboard.press('Escape')
await delay(300)
return clipboardText
}