Skip to content

Commit 1846f7b

Browse files
dukovmetacoma
authored andcommitted
Test fixes
Change-Id: I365789e0aedc0bdc8a8ee2c5fc7a4ebf90425ad9
1 parent 810217f commit 1846f7b

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

tests/osx/SKBase.applescript

+10
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ BaseTestCase.prototype.quitByHotkey = function() {
6363
this.sendKeyCombination(['command down'], 'q')
6464
}
6565

66+
BaseTestCase.prototype.quitApp = function(appname = '') {
67+
if (appname != '') {
68+
an = appname
69+
} else {
70+
an = this.appname
71+
}
72+
app = Application(an)
73+
app.quit()
74+
}
75+
6676
BaseTestCase.prototype.typeString = function(str) {
6777
var customKeyCodes = {
6878
"0":29,

tests/osx/run_tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function runAll() {
1616
echo -e "${BASE_LIB}\n${tst}" | osascript -l JavaScript
1717
if [ $? != 0 ]
1818
then
19-
let ERR_COUNT=${ERR_COUNT} + 1
19+
let ERR_COUNT=${ERR_COUNT}+1
2020
fi
2121
echo
2222
done

tests/osx/test_base_paste_ops.applescript

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function SKBasePasteOps() {
99
this.runApp(this.bundle_path, this.appname, 1)
1010
assert(this.isAppRunning(this.appname), true)
1111

12-
this.quitByHotkey()
12+
this.quitApp()
1313
delay(1)
1414
assert(this.isAppRunning(this.appname), false)
1515
}
@@ -23,7 +23,7 @@ function SKBasePasteOps() {
2323
assert(this.isAppRunning(this.appname), true)
2424

2525
this.runApp(this.bundle_path, this.appname, 1)
26-
this.quitByHotkey()
26+
this.quitApp()
2727
delay(1)
2828
assert(this.isAppRunning(this.appname), false)
2929
}
@@ -53,7 +53,7 @@ function SKBasePasteOps() {
5353
delay(1)
5454

5555
this.runApp(this.terminal_bundle, this.terminal_app, 2)
56-
this.quitByHotkey()
56+
this.quitApp(this.terminal_app)
5757
delay(2)
5858

5959
res = this.runShellCmd("cat /tmp/test" + timeStamp)

0 commit comments

Comments
 (0)