mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-17 21:47:47 +00:00
Fix Context Menu Popup Parameters (#1957)
* Revamp app status to be event listener based * Move test scripts to their own folder, set scripts to fail on any command failure * Make scripts executable * Fix context menu params
This commit is contained in:
parent
cb92f59e57
commit
4b45f813b3
26
.travis.yml
26
.travis.yml
@ -35,29 +35,19 @@ before_install:
|
||||
sh -e /etc/init.d/xvfb start
|
||||
# uncomment once integration tests are included in CI
|
||||
# docker pull dternyak/eth-priv-to-addr:latest
|
||||
sudo apt-get install libusb-1.0
|
||||
sudo apt-get install libusb-1.0
|
||||
fi
|
||||
|
||||
|
||||
install:
|
||||
- yarn --silent
|
||||
|
||||
script:
|
||||
- |
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
npm run prettier:diff
|
||||
npm run test:coverage -- --maxWorkers=2
|
||||
npm run report-coverage
|
||||
npm run tslint
|
||||
npm run tscheck
|
||||
npm run freezer
|
||||
npm run freezer:validate
|
||||
fi
|
||||
before_script:
|
||||
- chmod +x ./travis-scripts/test-{linux,osx}.sh
|
||||
|
||||
script:
|
||||
- ./travis-scripts/test-linux.sh
|
||||
- ./travis-scripts/test-osx.sh
|
||||
|
||||
- |
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
npm run build:electron
|
||||
ls -la dist/electron-builds
|
||||
fi
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
@ -1,4 +1,11 @@
|
||||
import { MenuItemConstructorOptions, shell, BrowserWindow, Menu, clipboard } from 'electron';
|
||||
import {
|
||||
MenuItemConstructorOptions,
|
||||
shell,
|
||||
BrowserWindow,
|
||||
Menu,
|
||||
clipboard,
|
||||
PopupOptions
|
||||
} from 'electron';
|
||||
import { URL } from 'url';
|
||||
|
||||
function popupContextMenu(
|
||||
@ -86,7 +93,14 @@ function popupContextMenu(
|
||||
}
|
||||
|
||||
const ctxMenu = Menu.buildFromTemplate(ctxMenuTmpl);
|
||||
ctxMenu.popup(window, props);
|
||||
|
||||
const popupOpts: PopupOptions = {
|
||||
window,
|
||||
x: props.x,
|
||||
y: props.y
|
||||
};
|
||||
|
||||
ctxMenu.popup(popupOpts);
|
||||
}
|
||||
|
||||
export default popupContextMenu;
|
||||
|
12
travis-scripts/test-linux.sh
Executable file
12
travis-scripts/test-linux.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ev # return value 1 (error) if any command fails, and display each command before its run
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
yarn prettier:diff
|
||||
yarn test:coverage -- --maxWorkers=2
|
||||
yarn report-coverage
|
||||
yarn tslint
|
||||
yarn tscheck
|
||||
yarn freezer
|
||||
yarn freezer:validate
|
||||
fi
|
7
travis-scripts/test-osx.sh
Executable file
7
travis-scripts/test-osx.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ev # return value 1 (error) if any command fails, and display each command before its run
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
yarn build:electron
|
||||
ls -la dist/electron-builds
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user