on xenial help sign in
Don't check for sound-playback if check is not intended.
commitb5fc9db4bdf4fc0cf0da10876e59e2b81830e6c8 authorMirco Müller <mirco.mueller@ubuntu.com> dateMon 26 Jan 2015, 15:25 (12 years ago) parentea6d2df
2 files changed+8−4
tests/qmltests/Notifications/tst_Notifications.qml+4−2 tests/qmltests/Notifications/tst_OptionToggle.qml+4−2
tests/qmltests/Notifications/tst_Notifications.qml+4−2
@@ -602,8 +602,10 @@ Item {
602602 compare(bodyLabel.visible, data.bodyVisible, "body-text visibility is incorrect")
603603 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")
604604
605− var audioItem = findInvisibleChild(notification, "sound")
606− compare(audioItem.playbackState, data.hasSound ? Audio.PlayingState : Audio.StoppedState, "Audio has wrong state")
605+ if (data.hasSound) {
606+ var audioItem = findInvisibleChild(notification, "sound")
607+ compare(audioItem.playbackState, data.hasSound ? Audio.PlayingState : Audio.StoppedState, "Audio has wrong state")
608+ }
607609
608610 if(data.buttonRowVisible) {
609611 var buttonCancel = findChild(buttonRow, "notify_button1")
tests/qmltests/Notifications/tst_OptionToggle.qml+4−2
@@ -238,8 +238,10 @@ Row {
238238 compare(bodyLabel.visible, data.bodyVisible, "body-text visibility is incorrect")
239239 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")
240240
241− var audioItem = findInvisibleChild(notification, "sound")
242− compare(audioItem.playbackState, data.hasSound ? Audio.PlayingState : Audio.StoppedState, "Audio has wrong state")
241+ if (data.hasSound) {
242+ var audioItem = findInvisibleChild(notification, "sound")
243+ compare(audioItem.playbackState, data.hasSound ? Audio.PlayingState : Audio.StoppedState, "Audio has wrong state")
244+ }
243245
244246 if(data.buttonRowVisible) {
245247 var buttonCancel = findChild(buttonRow, "notify_button1")