From 23d6c4dcc007f17059728cbdcbd401cf0dc07705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 21 Feb 2018 12:28:20 +0100 Subject: [PATCH] tests: Fix import error in calendar The Calendar module requires C_ at import time, which is only available after Environment.init() has been called. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38 --- tests/interactive/calendar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/interactive/calendar.js b/tests/interactive/calendar.js index a54b562d5..f2a70bb72 100644 --- a/tests/interactive/calendar.js +++ b/tests/interactive/calendar.js @@ -6,8 +6,6 @@ const Clutter = imports.gi.Clutter; const Lang = imports.lang; const St = imports.gi.St; -const Calendar = imports.ui.calendar; - function test() { let stage = new Clutter.Stage({ width: 400, height: 400 }); UI.init(stage); @@ -18,6 +16,8 @@ function test() { style: 'padding: 10px; spacing: 10px; font: 15px sans-serif;' }); stage.add_actor(vbox); + // Calendar can only be imported after Environment.init() + const Calendar = imports.ui.calendar; let calendar = new Calendar.Calendar(); vbox.add(calendar.actor, { expand: true,