mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1013 System : Regression tests for plot images
This commit is contained in:
parent
61ba5c2ca1
commit
22d09c0517
@ -2230,6 +2230,8 @@ void RiaApplication::runRegressionTest(const QString& testRootPath)
|
||||
QString fullPathGeneratedFolder = testCaseFolder.absoluteFilePath(generatedFolderName);
|
||||
saveSnapshotForAllViews(fullPathGeneratedFolder);
|
||||
|
||||
RicSnapshotAllPlotsToFileFeature::createSnapshotOfAllPlotsInFolder(fullPathGeneratedFolder);
|
||||
|
||||
QDir baseDir(testCaseFolder.filePath(baseFolderName));
|
||||
QDir genDir(testCaseFolder.filePath(generatedFolderName));
|
||||
QDir diffDir(testCaseFolder.filePath(diffFolderName));
|
||||
|
@ -178,6 +178,19 @@ void RicSnapshotAllPlotsToFileFeature::saveAllPlots()
|
||||
// Save images in snapshot catalog relative to project directory
|
||||
QString snapshotFolderName = app->createAbsolutePathFromProjectRelativePath("snapshots");
|
||||
|
||||
createSnapshotOfAllPlotsInFolder(snapshotFolderName);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSnapshotAllPlotsToFileFeature::createSnapshotOfAllPlotsInFolder(QString snapshotFolderName)
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
RimProject* proj = app->project();
|
||||
if (!proj) return;
|
||||
|
||||
QDir snapshotPath(snapshotFolderName);
|
||||
if (!snapshotPath.exists())
|
||||
{
|
||||
|
@ -66,6 +66,8 @@ class RicSnapshotAllPlotsToFileFeature : public caf::CmdFeature
|
||||
public:
|
||||
static void saveAllPlots();
|
||||
|
||||
static void createSnapshotOfAllPlotsInFolder(QString snapshotFolderName);
|
||||
|
||||
protected:
|
||||
// Overrides
|
||||
virtual bool isCommandEnabled() override;
|
||||
|
Loading…
Reference in New Issue
Block a user