mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
attempt to activate Preferences page using menu accelerator in integration test (test times out without opening page)
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
parent
4a15e65fea
commit
fccbae6fef
@ -5,6 +5,7 @@
|
||||
cluster and vice versa.
|
||||
*/
|
||||
import { Application } from "spectron"
|
||||
const spectronKeys = require("spectron-keys")
|
||||
import * as util from "../helpers/utils"
|
||||
import { spawnSync } from "child_process"
|
||||
|
||||
@ -54,10 +55,12 @@ describe("Lens integration tests", () => {
|
||||
await app.client.keys(['Shift', 'Meta'])
|
||||
})
|
||||
|
||||
it.skip('shows "preferences"', async () => {
|
||||
await app.client.keys(['Meta', ','])
|
||||
it('shows "preferences"', async () => {
|
||||
await app.client.keys(spectronKeys.mapAccelerator("Control+F2")) // attempt to activate the menu bar (I know this is macos only, trying anything)
|
||||
await app.client.keys(spectronKeys.mapAccelerator("Control")) // "key up" the Control key
|
||||
await app.client.keys(spectronKeys.mapAccelerator("CommandOrControl+,")) // Preferences accelerator
|
||||
await app.client.waitUntilTextExists("h2", "Preferences")
|
||||
await app.client.keys('Meta')
|
||||
await app.client.keys(spectronKeys.mapAccelerator("CommandOrControl")) // "key up" the CommandOrControl key
|
||||
})
|
||||
|
||||
it.skip('quits Lens"', async () => {
|
||||
|
||||
@ -310,6 +310,7 @@
|
||||
"react-window": "^1.8.5",
|
||||
"sass-loader": "^8.0.2",
|
||||
"spectron": "11.0.0",
|
||||
"spectron-keys": "0.0.1",
|
||||
"style-loader": "^1.2.1",
|
||||
"terser-webpack-plugin": "^3.0.3",
|
||||
"ts-jest": "^26.1.0",
|
||||
|
||||
@ -10665,6 +10665,11 @@ spdy@^4.0.2:
|
||||
select-hose "^2.0.0"
|
||||
spdy-transport "^3.0.0"
|
||||
|
||||
spectron-keys@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/spectron-keys/-/spectron-keys-0.0.1.tgz#45c3aa535e85fe5f5c71fd18cfa43927826f65db"
|
||||
integrity sha1-RcOqU16F/l9ccf0Yz6Q5J4JvZds=
|
||||
|
||||
spectron@11.0.0:
|
||||
version "11.0.0"
|
||||
resolved "https://registry.yarnpkg.com/spectron/-/spectron-11.0.0.tgz#79d785e6b8898638e77b5186711e3910ed4ca09b"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user