Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "electerm",
|
||||
"version": "1.25.20",
|
||||
"version": "1.25.22",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "electerm",
|
||||
"version": "1.25.20",
|
||||
"version": "1.25.22",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "electerm",
|
||||
"version": "1.25.20",
|
||||
"version": "1.25.22",
|
||||
"description": "Terminal/ssh/telnet/serialport/sftp client(linux, mac, win)",
|
||||
"main": "app.js",
|
||||
"bin": "npm/electerm",
|
||||
|
||||
@@ -317,7 +317,7 @@ export default class Tab extends React.Component {
|
||||
const rect = target.getBoundingClientRect()
|
||||
const items = this.renderContext()
|
||||
this.uid = generate()
|
||||
this.props.store.openContextMenu({
|
||||
window.store.openContextMenu({
|
||||
items,
|
||||
pos: {
|
||||
left: rect.left,
|
||||
|
||||
@@ -23,7 +23,7 @@ export default class WindowControl extends Component {
|
||||
window.pre.runGlobalAsync('unmaximize')
|
||||
}
|
||||
const closeApp = () => {
|
||||
window.StorageEvent.exit()
|
||||
window.store.exit()
|
||||
}
|
||||
return (
|
||||
<div className='window-controls'>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* basic ssh test
|
||||
* need TEST_HOST TEST_PASS TEST_USER env set
|
||||
*/
|
||||
|
||||
const { _electron: electron } = require('playwright')
|
||||
const {
|
||||
test: it
|
||||
} = require('@playwright/test')
|
||||
const { describe } = it
|
||||
it.setTimeout(100000)
|
||||
const { expect } = require('chai')
|
||||
const delay = require('./common/wait')
|
||||
const appOptions = require('./common/app-options')
|
||||
const extendClient = require('./common/client-extend')
|
||||
|
||||
describe('ssh', function () {
|
||||
it('should open window and basic ssh ls command works', async function () {
|
||||
const electronApp = await electron.launch(appOptions)
|
||||
const client = await electronApp.firstWindow()
|
||||
extendClient(client, electronApp)
|
||||
await delay(4500)
|
||||
await delay(4500)
|
||||
await client.rightClick('.tabs .tab', 10, 10)
|
||||
await client.click('.context-menu.show .anticon-copy')
|
||||
await delay(4500)
|
||||
const tabsCount = await client.evaluate(() => {
|
||||
return window.store.tabs.length
|
||||
})
|
||||
expect(tabsCount).equal(2)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user