forked from qt-creator/qt-creator
Vcs: Fix some of the clear case tests
We get the updates now delayed, so wait for them. Change-Id: I53ad5ec5d881bbc87ca8c6becceda6fd9e1e3c43 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
#include <QMetaObject>
|
||||
#include <QMutex>
|
||||
#include <QRegularExpression>
|
||||
#include <QSignalSpy>
|
||||
#include <QTextCodec>
|
||||
#include <QUuid>
|
||||
#include <QVBoxLayout>
|
||||
@@ -2673,10 +2674,12 @@ void ClearCaseTest::testStatusActions()
|
||||
QFETCH(int, status);
|
||||
auto tempStatus = static_cast<FileStatus::Status>(status);
|
||||
|
||||
QSignalSpy spy(dd, &VcsBase::VersionControlBase::slotStateChangedDone);
|
||||
// special case: file should appear as "Unknown" since there is no entry in the index
|
||||
// and we don't want to explicitly set the status for this test case
|
||||
if (tempStatus != FileStatus::Unknown)
|
||||
dd->setStatus(fileName, tempStatus, true);
|
||||
QVERIFY(spy.wait(1000));
|
||||
|
||||
QFETCH(bool, checkOutAction);
|
||||
QFETCH(bool, undoCheckOutAction);
|
||||
@@ -2712,7 +2715,6 @@ void ClearCaseTest::testVcsStatusDynamicReadonlyNotManaged()
|
||||
|
||||
dd->m_viewData = testCase.dummyViewData();
|
||||
dd->m_viewData.isDynamic = true;
|
||||
|
||||
QCOMPARE(dd->vcsStatus(fileName).status, FileStatus::NotManaged);
|
||||
|
||||
}
|
||||
|
@@ -552,6 +552,9 @@ void VersionControlBase::slotStateChanged(const Internal::State &newInternalStat
|
||||
}
|
||||
ICore::removeAdditionalContext(m_context);
|
||||
}
|
||||
#ifdef WITH_TESTS
|
||||
emit slotStateChangedDone();
|
||||
#endif
|
||||
}
|
||||
|
||||
const VcsBasePluginState &VersionControlBase::currentState() const
|
||||
|
@@ -176,6 +176,11 @@ protected:
|
||||
// Returns whether actions should be set up further.
|
||||
bool enableMenuAction(ActionState as, QAction *in) const;
|
||||
|
||||
#if WITH_TESTS
|
||||
signals:
|
||||
void slotStateChangedDone();
|
||||
#endif
|
||||
|
||||
private:
|
||||
void slotStateChanged(const Internal::State &s, Core::IVersionControl *vc);
|
||||
|
||||
|
Reference in New Issue
Block a user