on 2c033d4 help sign in
unity8/tests/plugins/Unity/Launcher/launchermodeltest.cpp
596 lines 24 kB history raw
1/*
2 * Copyright 2013-2015 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Michael Zanetti <michael.zanetti@canonical.com>
18 */
20// unity-api
21#include <unity/shell/launcher/LauncherModelInterface.h>
22#include <unity/shell/application/ApplicationInfoInterface.h>
24#include "launcheritem.h"
25#include "launchermodel.h"
26#include "dbusinterface.h"
27#include "gsettings.h"
28#include "asadapter.h"
29#include "AccountsServiceDBusAdaptor.h"
31#include <QtTest>
32#include <QDBusInterface>
33#include <QDBusReply>
34#include <QDomDocument>
36// This is a mock, specifically to test the LauncherModel
37class MockApp: public unity::shell::application::ApplicationInfoInterface
39 Q_OBJECT
40public:
41 MockApp(const QString &appId, QObject *parent = 0): ApplicationInfoInterface(appId, parent), m_appId(appId), m_focused(false) { }
42 QString appId() const override { return m_appId; }
43 QString name() const override { return "mock"; }
44 QString comment() const override { return "this is a mock"; }
45 QUrl icon() const override { return QUrl(); }
46 ApplicationInfoInterface::Stage stage() const override { return ApplicationInfoInterface::MainStage; }
47 ApplicationInfoInterface::State state() const override { return ApplicationInfoInterface::Running; }
48 bool focused() const override { return m_focused; }
49 QString splashTitle() const override { return QString(); }
50 QUrl splashImage() const override { return QUrl(); }
51 bool splashShowHeader() const override { return true; }
52 QColor splashColor() const override { return QColor(0,0,0,0); }
53 QColor splashColorHeader() const override { return QColor(0,0,0,0); }
54 QColor splashColorFooter() const override { return QColor(0,0,0,0); }
55 Qt::ScreenOrientations supportedOrientations() const override { return Qt::PortraitOrientation; }
56 bool rotatesWindowContents() const override { return false; }
58 // Methods used for mocking (not in the interface)
59 void setFocused(bool focused) { m_focused = focused; Q_EMIT focusedChanged(focused); }
60private:
61 QString m_appId;
62 bool m_focused;
63};
65// This is a mock, specifically to test the LauncherModel
66class MockAppManager: public unity::shell::application::ApplicationManagerInterface
68 Q_OBJECT
69public:
70 MockAppManager(QObject *parent = 0): ApplicationManagerInterface(parent) {}
71 int rowCount(const QModelIndex &) const override { return m_list.count(); }
72 QVariant data(const QModelIndex &, int ) const override { return QVariant(); }
73 QString focusedApplicationId() const override {
74 Q_FOREACH(MockApp *app, m_list) {
75 if (app->focused()) return app->appId();
76 }
77 return QString();
78 }
79 unity::shell::application::ApplicationInfoInterface *get(int index) const override { return m_list.at(index); }
80 unity::shell::application::ApplicationInfoInterface *findApplication(const QString &appId) const override {
81 Q_FOREACH(MockApp* app, m_list) {
82 if (app->appId() == appId) {
83 return app;
84 }
85 }
86 return nullptr;
87 }
88 unity::shell::application::ApplicationInfoInterface *startApplication(const QString &, const QStringList &) override { return nullptr; }
89 bool stopApplication(const QString &appId) override {
90 Q_FOREACH(MockApp* app, m_list) {
91 if (app->appId() == appId) {
92 removeApplication(m_list.indexOf(app));
93 return true;
94 }
95 }
96 return false;
97 }
98 bool focusApplication(const QString &appId) override {
99 Q_FOREACH(MockApp* app, m_list) {
100 app->setFocused(app->appId() == appId);
101 }
102 Q_EMIT focusedApplicationIdChanged();
103 return true;
104 }
106 void unfocusCurrentApplication() override { }
108 void addApplication(MockApp *app) {
109 beginInsertRows(QModelIndex(), count(), count());
110 m_list.append(app);
111 endInsertRows();
112 }
113 void removeApplication(int index) {
114 beginRemoveRows(QModelIndex(), index, index);
115 m_list.takeAt(index)->deleteLater();
116 endRemoveRows();
117 }
118 bool requestFocusApplication(const QString &appId) override { Q_UNUSED(appId); return true; }
119 bool suspended() const override { return false; }
120 void setSuspended(bool) override {}
121 bool forceDashActive() const override { return false; }
122 void setForceDashActive(bool) override {}
124private:
125 QList<MockApp*> m_list;
126};
128class LauncherModelTest : public QObject
130 Q_OBJECT
132private:
133 LauncherModel *launcherModel;
134 MockAppManager *appManager;
136 QList<QVariantMap> getASConfig() {
137 AccountsServiceDBusAdaptor *as = launcherModel->m_asAdapter->m_accounts;
138 return as->getUserProperty("", "", "LauncherItems").value<QList<QVariantMap>>();
139 }
141private Q_SLOTS:
143 void initTestCase() {
144 launcherModel = new LauncherModel(this);
145 QCoreApplication::processEvents(); // to let the model register on DBus
146 QCOMPARE(launcherModel->rowCount(QModelIndex()), 0);
148 appManager = new MockAppManager(this);
149 launcherModel->setApplicationManager(appManager);
150 }
152 // Adding 2 apps to the mock appmanager. Both should appear in the launcher.
153 void init() {
154 appManager->addApplication(new MockApp("abs-icon"));
155 QCOMPARE(launcherModel->rowCount(QModelIndex()), 1);
157 appManager->addApplication(new MockApp("no-icon"));
158 QCOMPARE(launcherModel->rowCount(QModelIndex()), 2);
160 launcherModel->m_settings->setStoredApplications(QStringList());
161 }
163 // Removing apps from appmanager and launcher as pinned ones would stick
164 void cleanup() {
165 while (appManager->count() > 0) {
166 appManager->removeApplication(0);
167 }
168 while (launcherModel->rowCount(QModelIndex()) > 0) {
169 launcherModel->requestRemove(launcherModel->get(0)->appId());
170 }
171 }
173 void testMove() {
174 QCOMPARE(launcherModel->get(0)->pinned(), false);
175 QCOMPARE(launcherModel->get(1)->pinned(), false);
177 LauncherItemInterface *item0BeforeMove = launcherModel->get(0);
178 LauncherItemInterface *item1BeforeMove = launcherModel->get(1);
179 launcherModel->move(1, 0);
181 QCOMPARE(item0BeforeMove, launcherModel->get(1));
182 QCOMPARE(item1BeforeMove, launcherModel->get(0));
184 // moved item must be pinned now
185 QCOMPARE(item0BeforeMove->pinned(), false);
186 QCOMPARE(item1BeforeMove->pinned(), true);
187 }
189 void testPinning() {
190 QSignalSpy spy(launcherModel, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)));
191 QCOMPARE(launcherModel->get(0)->pinned(), false);
192 QCOMPARE(launcherModel->get(1)->pinned(), false);
193 launcherModel->pin(launcherModel->get(0)->appId());
194 QCOMPARE(launcherModel->get(0)->pinned(), true);
195 QCOMPARE(launcherModel->get(1)->pinned(), false);
196 QCOMPARE(spy.count() > 0, true);
197 QCOMPARE(spy.at(0).at(2).value<QVector<int>>().first(), (int)LauncherModelInterface::RolePinned);
199 // App should be pinned now
200 spy.clear();
201 launcherModel->requestRemove(launcherModel->get(0)->appId());
202 QCOMPARE(launcherModel->get(0)->pinned(), false);
203 QCOMPARE(launcherModel->get(1)->pinned(), false);
204 QCOMPARE(spy.count(), 1);
205 QCOMPARE(spy.at(0).at(2).value<QVector<int>>().first(), (int)LauncherModelInterface::RolePinned);
207 // Now that the app is unpinned, nothing should change and the signal should not be emitted
208 spy.clear();
209 launcherModel->requestRemove(launcherModel->get(0)->appId());
210 QCOMPARE(launcherModel->get(0)->pinned(), false);
211 QCOMPARE(launcherModel->get(1)->pinned(), false);
212 QCOMPARE(spy.count(), 0);
213 }
215 void testRemove_data() {
217 QTest::addColumn<bool>("pinned");
218 QTest::addColumn<bool>("running");
220 QTest::newRow("non-pinned, running") << false << true;
221 QTest::newRow("pinned, running") << true << true;
222 QTest::newRow("pinned, non-running") << true << false;
223 }
225 void testRemove() {
226 QFETCH(bool, pinned);
227 QFETCH(bool, running);
229 // In the beginning we always have two items
230 QCOMPARE(launcherModel->rowCount(QModelIndex()), 2);
232 // pin one if required
233 if (pinned) {
234 launcherModel->pin("abs-icon");
235 }
237 // stop it if required
238 if (!running) {
239 appManager->stopApplication("abs-icon");
240 }
242 // Now remove it
243 launcherModel->requestRemove("abs-icon");
245 if (running) {
246 // both apps are running, both apps must still be here
247 QCOMPARE(launcherModel->rowCount(QModelIndex()), 2);
249 // Item must be unpinned now
250 int index = launcherModel->findApplication("abs-icon");
251 QCOMPARE(launcherModel->get(index)->pinned(), false);
253 } else if (pinned) {
254 // Item 1 must go away, item 0 is here to stay
255 QCOMPARE(launcherModel->rowCount(QModelIndex()), 1);
256 }
258 // done our checks. now stop the app if was still running
259 if (running) {
260 appManager->stopApplication("abs-icon");
261 }
263 // It needs to go away in any case now
264 QCOMPARE(launcherModel->rowCount(QModelIndex()), 1);
265 }
267 void testQuickListPinningRemoving() {
268 // we start with 2 unpinned items
269 QCOMPARE(launcherModel->get(0)->pinned(), false);
270 QCOMPARE(launcherModel->get(1)->pinned(), false);
271 QCOMPARE(launcherModel->rowCount(QModelIndex()), 2);
273 // find the Pin item in the quicklist
274 QuickListModel *model = qobject_cast<QuickListModel*>(launcherModel->get(0)->quickList());
275 int pinActionIndex = -1;
276 for (int i = 0; i < model->rowCount(QModelIndex()); ++i) {
277 if (model->get(i).actionId() == "pin_item") {
278 pinActionIndex = i;
279 break;
280 }
281 }
282 QVERIFY(pinActionIndex >= 0);
284 // trigger pin item quicklist action => Item must be pinned now.
285 launcherModel->quickListActionInvoked(launcherModel->get(0)->appId(), pinActionIndex);
286 QCOMPARE(launcherModel->get(0)->pinned(), true);
287 QCOMPARE(launcherModel->rowCount(QModelIndex()), 2);
289 // quicklist needs to transform to remove item. trigger it and check it item goes away
290 launcherModel->quickListActionInvoked(launcherModel->get(0)->appId(), pinActionIndex);
291 QCOMPARE(launcherModel->get(0)->pinned(), false);
293 // still needs to be here as the app is still here
294 QCOMPARE(launcherModel->rowCount(QModelIndex()), 2);
295 // close the app
296 appManager->removeApplication(0);
297 // Now it needs to go away
298 QCOMPARE(launcherModel->rowCount(QModelIndex()), 1);
299 }
301 void testApplicationFocused() {
302 // all apps unfocused at beginning...
303 QCOMPARE(launcherModel->get(0)->focused(), false);
304 QCOMPARE(launcherModel->get(1)->focused(), false);
306 appManager->focusApplication("abs-icon");
307 QCOMPARE(launcherModel->rowCount(QModelIndex()), 2);
308 QCOMPARE(launcherModel->get(0)->focused(), true);
309 QCOMPARE(launcherModel->get(1)->focused(), false);
311 appManager->focusApplication("no-icon");
312 QCOMPARE(launcherModel->rowCount(QModelIndex()), 2);
313 QCOMPARE(launcherModel->get(0)->focused(), false);
314 QCOMPARE(launcherModel->get(1)->focused(), true);
315 }
317 void testClosingApps() {
318 // At the start there are 2 items. Let's pin one.
319 launcherModel->pin("abs-icon");
320 while (appManager->count() > 0) {
321 appManager->removeApplication(0);
322 }
323 // The pinned one needs to stay, the other needs to disappear
324 QCOMPARE(launcherModel->rowCount(QModelIndex()), 1);
325 QCOMPARE(launcherModel->get(0)->appId(), QLatin1String("abs-icon"));
326 }
328 void testGetUrlForAppId() {
329 QCOMPARE(launcherModel->getUrlForAppId(QString()), QString());
330 QCOMPARE(launcherModel->getUrlForAppId(""), QString());
331 QCOMPARE(launcherModel->getUrlForAppId("no-name"), QString("application:///no-name.desktop"));
332 QCOMPARE(launcherModel->getUrlForAppId("com.test.good"), QString("application:///com.test.good.desktop"));
333 QCOMPARE(launcherModel->getUrlForAppId("com.test.good_application"), QString("appid://com.test.good/application/current-user-version"));
334 QCOMPARE(launcherModel->getUrlForAppId("com.test.good_application_1.2.3"), QString("appid://com.test.good/application/current-user-version"));
335 }
337 void testIntrospection() {
338 QDBusInterface interface("com.canonical.Unity.Launcher", "/com/canonical/Unity/Launcher", "org.freedesktop.DBus.Introspectable");
339 QDBusReply<QString> reply = interface.call("Introspect");
340 QStringList nodes = extractNodes(reply.value());
341 QCOMPARE(nodes.count(), launcherModel->rowCount());
343 appManager->addApplication(new MockApp("foobar"));
344 reply = interface.call("Introspect");
345 nodes = extractNodes(reply.value());
346 QCOMPARE(nodes.contains("foobar"), true);
348 appManager->removeApplication(2);
349 reply = interface.call("Introspect");
350 nodes = extractNodes(reply.value());
351 QCOMPARE(nodes.contains("foobar"), false);
352 }
354 QStringList extractNodes(const QString &introspectionXml) {
355 QXmlStreamReader introspectReply(introspectionXml);
357 QStringList ret;
358 while (!introspectReply.atEnd() && !introspectReply.hasError()) {
359 QXmlStreamReader::TokenType token = introspectReply.readNext();
361 if (token == QXmlStreamReader::StartElement) {
362 if (introspectReply.name() == "node" && introspectReply.attributes().count() > 0) {
363 ret << introspectReply.attributes().value("name").toString();
364 }
365 }
366 }
367 return ret;
368 }
370 void testCountEmblems() {
371 // Call GetAll on abs-icon
372 QDBusInterface interface("com.canonical.Unity.Launcher", "/com/canonical/Unity/Launcher/abs_2Dicon", "org.freedesktop.DBus.Properties");
373 QDBusReply<QVariantMap> reply = interface.call("GetAll");
374 QVariantMap map = reply.value();
376 // Make sure GetAll returns a map with count and countVisible props
377 QCOMPARE(map.contains("count"), true);
378 QCOMPARE(map.contains("countVisible"), true);
380 // Make sure count is intitilized to 0 and non-visible
381 QCOMPARE(map.value("count").toInt(), 0);
382 QCOMPARE(map.value("countVisible").toBool(), false);
384 // Now make it visible and set it to 55 through D-Bus
385 interface.call("Set", "com.canonical.Unity.Launcher.Item", "count", QVariant::fromValue(QDBusVariant(55)));
386 interface.call("Set", "com.canonical.Unity.Launcher.Item", "countVisible", QVariant::fromValue(QDBusVariant(true)));
388 // Fetch it again using GetAll
389 reply = interface.call("GetAll");
390 map = reply.value();
392 // Make sure values have changed on the D-Bus interface
393 QCOMPARE(map.value("count").toInt(), 55);
394 QCOMPARE(map.value("countVisible").toBool(), true);
396 // Now the item on the upper side of the API
397 int index = launcherModel->findApplication("abs-icon");
398 QCOMPARE(index >= 0, true);
400 // And make sure values have changed there as well
401 QCOMPARE(launcherModel->get(index)->countVisible(), true);
402 QCOMPARE(launcherModel->get(index)->count(), 55);
403 }
405 void testCountEmblemAddsRemovesItem_data() {
406 QTest::addColumn<bool>("isPinned");
407 QTest::addColumn<bool>("isRunning");
408 QTest::addColumn<bool>("startWhenVisible");
409 QTest::newRow("not pinned, not running") << false << false << false;
410 QTest::newRow("pinned, not running") << true << false << false;
411 QTest::newRow("not pinned, not running, starting from notification") << false << false << true;
412 QTest::newRow("pinned, not running, starting from notification") << true << false << true;
413 QTest::newRow("not pinned, running") << false << true << false;
414 QTest::newRow("pinned, running") << true << true << false;
415 }
417 void testCountEmblemAddsRemovesItem() {
418 QFETCH(bool, isPinned);
419 QFETCH(bool, isRunning);
420 QFETCH(bool, startWhenVisible);
422 // Make sure item is here as expected after init() and that count is not visible
423 int index = launcherModel->findApplication("abs-icon");
424 QCOMPARE(index == -1, false);
425 QCOMPARE(launcherModel->get(index)->countVisible(), false);
427 // Pin if we need to
428 if (isPinned) {
429 launcherModel->pin("abs-icon");
430 }
431 QCOMPARE(launcherModel->get(0)->pinned(), isPinned);
433 // Stop it if we need to
434 if (!isRunning) {
435 appManager->stopApplication("abs-icon");
436 }
437 QCOMPARE(launcherModel->findApplication("abs-icon") >= 0, isRunning || isPinned);
440 // set the count emblem to visible
441 QDBusInterface interface("com.canonical.Unity.Launcher", "/com/canonical/Unity/Launcher/abs_2Dicon", "org.freedesktop.DBus.Properties");
442 interface.call("Set", "com.canonical.Unity.Launcher.Item", "count", QVariant::fromValue(QDBusVariant(55)));
443 interface.call("Set", "com.canonical.Unity.Launcher.Item", "countVisible", QVariant::fromValue(QDBusVariant(true)));
445 // Make sure item is here and that count is visible
446 index = launcherModel->findApplication("abs-icon");
447 QCOMPARE(index == -1, false);
448 QCOMPARE(launcherModel->get(index)->countVisible(), true);
450 if (!isRunning && startWhenVisible) {
451 appManager->addApplication(new MockApp("abs-icon"));
452 }
454 // Hide count emblem again
455 interface.call("Set", "com.canonical.Unity.Launcher.Item", "countVisible", QVariant::fromValue(QDBusVariant(false)));
457 // Make sure item is shown/hidden as expected
458 index = launcherModel->findApplication("abs-icon");
459 QCOMPARE(index == -1, !isRunning && !isPinned && !startWhenVisible);
460 }
462 void testRefreshAfterDeletedDesktopFiles_data() {
463 QTest::addColumn<bool>("deleted");
464 QTest::newRow("have .desktop files") << false;
465 QTest::newRow("deleted .desktop files") << true;
466 }
468 void testRefreshAfterDeletedDesktopFiles() {
469 QFETCH(bool, deleted);
471 // pin both apps
472 launcherModel->pin("abs-icon");
473 launcherModel->pin("no-icon");
474 // close both apps
475 appManager->removeApplication(0);
476 appManager->removeApplication(0);
478 // "delete" the .desktop files
479 QString oldCurrent = QDir::currentPath();
480 if (deleted) {
481 // In testing mode, the launcher searches the current dir for the sample .desktop file
482 // We can make that fail by changing the current dir
483 QDir::setCurrent("..");
484 }
486 // Call refresh
487 QDBusInterface interface("com.canonical.Unity.Launcher", "/com/canonical/Unity/Launcher", "com.canonical.Unity.Launcher");
488 QDBusReply<void> reply = interface.call("Refresh");
490 // Make sure the call to Refresh returned without error.
491 QCOMPARE(reply.isValid(), true);
493 QCOMPARE(launcherModel->rowCount(), deleted ? 0 : 2);
495 // Restoring current dir
496 QDir::setCurrent(oldCurrent);
497 }
499 void testSettings() {
500 GSettings *settings = launcherModel->m_settings;
501 QSignalSpy spy(launcherModel, SIGNAL(hint()));
503 // Nothing pinned at startup
504 QCOMPARE(settings->storedApplications().count(), 0);
506 // pin both apps
507 launcherModel->pin("abs-icon");
508 launcherModel->pin("no-icon");
509 QCOMPARE(spy.count(), 0);
511 // Now settings should have 2 apps
512 QCOMPARE(settings->storedApplications().count(), 2);
514 // close both apps
515 appManager->removeApplication(0);
516 appManager->removeApplication(0);
518 // Now settings should have 2 apps
519 QCOMPARE(settings->storedApplications().count(), 2);
521 // Now remove 1 app through the backend, make sure one is still there
522 settings->simulateDConfChanged(QStringList() << "abs-icon");
523 QCOMPARE(settings->storedApplications().count(), 1);
524 QCOMPARE(spy.count(), 1);
526 // Check if it disappeared from the frontend too
527 QCOMPARE(launcherModel->rowCount(), 1);
529 // Add them back but in reverse order
530 settings->simulateDConfChanged(QStringList() << "no-icon" << "abs-icon");
531 QCOMPARE(launcherModel->rowCount(), 2);
532 QCOMPARE(launcherModel->get(0)->appId(), QString("no-icon"));
533 QCOMPARE(launcherModel->get(1)->appId(), QString("abs-icon"));
534 QCOMPARE(spy.count(), 2);
535 }
537 void testAddSyncsToAS() {
538 // Make sure launcher and AS are in sync when we start the test
539 QCOMPARE(launcherModel->rowCount(), getASConfig().count());
541 int oldCount = launcherModel->rowCount();
542 appManager->addApplication(new MockApp("rel-icon"));
543 QCOMPARE(launcherModel->rowCount(), oldCount + 1);
544 QCOMPARE(launcherModel->rowCount(), getASConfig().count());
545 }
547 void testRemoveSyncsToAS() {
548 // Make sure launcher and AS are in sync when we start the test
549 QCOMPARE(launcherModel->rowCount(), getASConfig().count());
551 int oldCount = launcherModel->rowCount();
552 appManager->stopApplication("abs-icon");
553 QCOMPARE(launcherModel->rowCount(), oldCount - 1);
554 QCOMPARE(launcherModel->rowCount(), getASConfig().count());
555 }
557 void testMoveSyncsToAS() {
558 // Make sure launcher and AS are in sync when we start the test
559 QCOMPARE(launcherModel->rowCount(), getASConfig().count());
561 for (int i = 0; i < launcherModel->rowCount(); i++) {
562 QString launcherAppId = launcherModel->get(i)->appId();
563 QString asAppId = getASConfig().at(i).value("id").toString();
564 QCOMPARE(launcherAppId, asAppId);
565 }
567 launcherModel->move(0, 1);
569 for (int i = 0; i < launcherModel->rowCount(); i++) {
570 QString launcherAppId = launcherModel->get(i)->appId();
571 QString asAppId = getASConfig().at(i).value("id").toString();
572 QCOMPARE(launcherAppId, asAppId);
573 }
574 }
576 void testCountChangeSyncsToAS() {
577 // Find the index of the abs-icon app
578 int index = launcherModel->findApplication("abs-icon");
580 // Make sure it's invisible and 0 at the beginning
581 QCOMPARE(getASConfig().at(index).value("countVisible").toBool(), false);
582 QCOMPARE(getASConfig().at(index).value("count").toInt(), 0);
584 // Change the count of the abs-icon app through D-Bus
585 QDBusInterface interface("com.canonical.Unity.Launcher", "/com/canonical/Unity/Launcher/abs_2Dicon", "org.freedesktop.DBus.Properties");
586 interface.call("Set", "com.canonical.Unity.Launcher.Item", "count", QVariant::fromValue(QDBusVariant(55)));
587 interface.call("Set", "com.canonical.Unity.Launcher.Item", "countVisible", QVariant::fromValue(QDBusVariant(true)));
589 // Make sure it changed to visible and 55
590 QCOMPARE(getASConfig().at(index).value("countVisible").toBool(), true);
591 QCOMPARE(getASConfig().at(index).value("count").toInt(), 55);
592 }
593};
595QTEST_GUILESS_MAIN(LauncherModelTest)
596#include "launchermodeltest.moc"