Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
ab8d238d
by Tony Chemit at 2021-11-29T11:02:35+01:00
-
68c17bcc
by Tony Chemit at 2021-11-29T12:26:26+01:00
13 changed files:
- .gitignore
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/edit/ContentEditUI.jcss
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/table/ContentTableUI.jcss
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/logbook/ActivitySampleUI.jcss
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/logbook/SetUI.jcss
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetUI.jcss
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/observation/SetUI.jcss
- models/persistence/avdth/src/test/java/fr/ird/observe/persistence/avdth/AvdthFixtures.java
- models/persistence/avdth/src/test/java/fr/ird/observe/persistence/avdth/data/AvdthDataBuilderTestSupport.java
- models/persistence/avdth/src/test/java/fr/ird/observe/persistence/avdth/referential/AvdthReferentialBuilderTest.java
- models/persistence/avdth/src/test/java/fr/ird/observe/persistence/avdth/referential/AvdthWeightCategoryBuilderTest.java
- pom.xml
- tests/test/src/main/filtered-resources/observetest.properties
Changes:
| ... | ... | @@ -20,9 +20,3 @@ |
| 20 | 20 |
/src/site/markdown/CHANGELOG.md
|
| 21 | 21 |
/src/site/markdown/*Config.md
|
| 22 | 22 |
/src/site/resources/*Config.properties
|
| 23 |
-/tests/test/src/main/resources/tck/
|
|
| 24 |
-/tests/test/src/main/resources/tck/*
|
|
| 25 |
-/tests/test/src/main/resources/tck/*/*
|
|
| 26 |
-/tests/test/src/main/resources/tck-update/
|
|
| 27 |
-/models/persistence/java/src/test/resources/avdth/
|
|
| 28 |
-/models/persistence/.mvn/avdth/
|
| ... | ... | @@ -22,14 +22,13 @@ |
| 22 | 22 |
|
| 23 | 23 |
#states {
|
| 24 | 24 |
editable:true;
|
| 25 |
- modified:{getValidator().isChanged()};
|
|
| 26 |
- valid:{getValidator().isValid()};
|
|
| 27 | 25 |
enabled:{!states.isReadingMode()};
|
| 28 | 26 |
}
|
| 29 | 27 |
|
| 30 | 28 |
#actions {
|
| 31 | 29 |
visible:{states.isEditable()};
|
| 32 | 30 |
}
|
| 31 |
+ |
|
| 33 | 32 |
#extraActions {
|
| 34 | 33 |
visible:false;
|
| 35 | 34 |
}
|
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
valid:{getValidator().isValid() && getValidatorTable().isValid()};
|
| 25 | 25 |
modified:{tableModel.isModified() || getValidator().isChanged()};
|
| 26 | 26 |
canSaveRow:{getValidatorTable().isChanged() && getValidatorTable().isValid()};
|
| 27 |
- canResetRow:{getValidatorTable().isChanged()};
|
|
| 27 |
+ canResetRow:{tableModel.isCreate() || getValidatorTable().isChanged()};
|
|
| 28 | 28 |
editable:true;
|
| 29 | 29 |
enabled:{!states.isReadingMode()};
|
| 30 | 30 |
}
|
| ... | ... | @@ -70,8 +70,8 @@ |
| 70 | 70 |
}
|
| 71 | 71 |
|
| 72 | 72 |
#resetEntry {
|
| 73 |
- enabled:{tableModel.isCreate() || states.isCanResetRow()};
|
|
| 74 | 73 |
visible:{tableModel.isEditable() && (tableModel.isCreate() || !tableModel.isEmpty())};
|
| 74 |
+ enabled:{states.isCanResetRow()};
|
|
| 75 | 75 |
}
|
| 76 | 76 |
|
| 77 | 77 |
#saveEntry {
|
| ... | ... | @@ -94,7 +94,7 @@ |
| 94 | 94 |
|
| 95 | 95 |
#reset {
|
| 96 | 96 |
visible:{states.isEnabled()};
|
| 97 |
- enabled:{states.isModified()};
|
|
| 97 |
+ enabled:{states.isModified() || tableModel.isCreate()};
|
|
| 98 | 98 |
}
|
| 99 | 99 |
|
| 100 | 100 |
#save {
|
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 |
|
| 23 | 23 |
#states {
|
| 24 | 24 |
samplePartUIModel:{samplePartUI.getModel()};
|
| 25 |
- modified:{validator.isChanged() || samplePartStates.isModified()};
|
|
| 25 |
+ modified:{validator.isChanged() || samplePartStates.isModified() || samplePartStates.isCanResetRow()};
|
|
| 26 | 26 |
valid:{validator.isValid() && samplePartStates.isValid()};
|
| 27 | 27 |
}
|
| 28 | 28 |
|
| ... | ... | @@ -20,6 +20,11 @@ |
| 20 | 20 |
* #L%
|
| 21 | 21 |
*/
|
| 22 | 22 |
|
| 23 |
+#states {
|
|
| 24 |
+ modified:{getValidator().isChanged()};
|
|
| 25 |
+ valid:{getValidator().isValid()};
|
|
| 26 |
+}
|
|
| 27 |
+ |
|
| 23 | 28 |
DateTimeEditor {
|
| 24 | 29 |
showReset:true;
|
| 25 | 30 |
}
|
| ... | ... | @@ -20,6 +20,11 @@ |
| 20 | 20 |
* #L%
|
| 21 | 21 |
*/
|
| 22 | 22 |
|
| 23 |
+#states {
|
|
| 24 |
+ modified:{getValidator().isChanged()};
|
|
| 25 |
+ valid:{getValidator().isValid()};
|
|
| 26 |
+}
|
|
| 27 |
+ |
|
| 23 | 28 |
#shooterSpeed {
|
| 24 | 29 |
enabled:{Objects.equals(true, bean.getShooterUsed())};
|
| 25 | 30 |
}
|
| ... | ... | @@ -20,6 +20,11 @@ |
| 20 | 20 |
* #L%
|
| 21 | 21 |
*/
|
| 22 | 22 |
|
| 23 |
+#states {
|
|
| 24 |
+ modified:{getValidator().isChanged()};
|
|
| 25 |
+ valid:{getValidator().isValid()};
|
|
| 26 |
+}
|
|
| 27 |
+ |
|
| 23 | 28 |
#startTime {
|
| 24 | 29 |
propertyDayDate: {SetDto.PROPERTY_START_SET_DATE};
|
| 25 | 30 |
propertyTimeDate: {SetDto.PROPERTY_START_SET_TIME};
|
| ... | ... | @@ -23,7 +23,9 @@ package fr.ird.observe.persistence.avdth; |
| 23 | 23 |
*/
|
| 24 | 24 |
|
| 25 | 25 |
import fr.ird.observe.test.ObserveFixtures;
|
| 26 |
+import fr.ird.observe.test.ObserveTestConfiguration;
|
|
| 26 | 27 |
|
| 28 |
+import java.nio.file.Path;
|
|
| 27 | 29 |
import java.util.Map;
|
| 28 | 30 |
|
| 29 | 31 |
/**
|
| ... | ... | @@ -35,7 +37,7 @@ import java.util.Map; |
| 35 | 37 |
public class AvdthFixtures extends ObserveFixtures {
|
| 36 | 38 |
|
| 37 | 39 |
public static final Map<String, String> AVDTH = loadFixturesMap("avdth");
|
| 38 |
- |
|
| 40 |
+ public static final String AVDTH_CACHE_PATH = "observetest.avdth.cache.path";
|
|
| 39 | 41 |
/**
|
| 40 | 42 |
* To force prepare even if prepare step is not valid.
|
| 41 | 43 |
*/
|
| ... | ... | @@ -48,9 +50,21 @@ public class AvdthFixtures extends ObserveFixtures { |
| 48 | 50 |
* To launch import for all years.
|
| 49 | 51 |
*/
|
| 50 | 52 |
public static final boolean IMPORT_ALL_YEARS = Boolean.parseBoolean(System.getProperty("test_allYears", "false"));
|
| 53 |
+ /**
|
|
| 54 |
+ * Root path of avdth databases.
|
|
| 55 |
+ */
|
|
| 56 |
+ private static Path avdthCachePath;
|
|
| 57 |
+ |
|
| 58 |
+ public static Path getAvdthCachePath() {
|
|
| 59 |
+ if (avdthCachePath == null) {
|
|
| 60 |
+ avdthCachePath = Path.of(ObserveTestConfiguration.getTestPropertyAsString(AVDTH_CACHE_PATH));
|
|
| 61 |
+ }
|
|
| 62 |
+ return avdthCachePath;
|
|
| 63 |
+ }
|
|
| 51 | 64 |
|
| 52 | 65 |
public static void assertAvdthFixture(String fixtureName, Object actual) {
|
| 53 | 66 |
String expected = AVDTH.get(fixtureName);
|
| 54 | 67 |
assertFixture(fixtureName, expected, actual);
|
| 55 | 68 |
}
|
| 69 |
+ |
|
| 56 | 70 |
}
|
| ... | ... | @@ -47,7 +47,6 @@ import org.junit.Test; |
| 47 | 47 |
import org.junit.runner.RunWith;
|
| 48 | 48 |
import org.junit.runners.Parameterized;
|
| 49 | 49 |
|
| 50 |
-import java.io.File;
|
|
| 51 | 50 |
import java.io.IOException;
|
| 52 | 51 |
import java.nio.file.Files;
|
| 53 | 52 |
import java.nio.file.Path;
|
| ... | ... | @@ -97,11 +96,7 @@ public abstract class AvdthDataBuilderTestSupport extends PersistenceTestSupport |
| 97 | 96 |
}
|
| 98 | 97 |
|
| 99 | 98 |
public static Path getPath(String type) {
|
| 100 |
- return new File("").getAbsoluteFile().toPath()
|
|
| 101 |
- .getParent()
|
|
| 102 |
- .resolve(".mvn")
|
|
| 103 |
- .resolve("avdth")
|
|
| 104 |
- .resolve(type);
|
|
| 99 |
+ return AvdthFixtures.getAvdthCachePath().resolve(type);
|
|
| 105 | 100 |
}
|
| 106 | 101 |
|
| 107 | 102 |
protected abstract Path getRootPath();
|
| ... | ... | @@ -36,7 +36,6 @@ import fr.ird.observe.test.spi.DatabaseNameConfiguration; |
| 36 | 36 |
import org.junit.Assert;
|
| 37 | 37 |
import org.junit.Test;
|
| 38 | 38 |
|
| 39 |
-import java.io.File;
|
|
| 40 | 39 |
import java.io.IOException;
|
| 41 | 40 |
import java.nio.file.Path;
|
| 42 | 41 |
import java.sql.Connection;
|
| ... | ... | @@ -53,10 +52,7 @@ public class AvdthReferentialBuilderTest extends PersistenceTestSupportRead { |
| 53 | 52 |
|
| 54 | 53 |
@Test
|
| 55 | 54 |
public void build() throws SQLException, IOException {
|
| 56 |
- Path avdthFile = new File("").getAbsoluteFile().toPath()
|
|
| 57 |
- .getParent()
|
|
| 58 |
- .resolve(".mvn")
|
|
| 59 |
- .resolve("avdth")
|
|
| 55 |
+ Path avdthFile = AvdthFixtures.getAvdthCachePath()
|
|
| 60 | 56 |
.resolve("OA")
|
| 61 | 57 |
.resolve("OA_2020_V35.mdb");
|
| 62 | 58 |
Path scriptPath = localTestMethodResource.getTestDirectory().toPath().resolve("export-" + avdthFile.toFile().getName().replace(".mdb", ".sql"));
|
| ... | ... | @@ -35,7 +35,6 @@ import fr.ird.observe.test.spi.DatabaseNameConfiguration; |
| 35 | 35 |
import org.junit.Assert;
|
| 36 | 36 |
import org.junit.Test;
|
| 37 | 37 |
|
| 38 |
-import java.io.File;
|
|
| 39 | 38 |
import java.io.IOException;
|
| 40 | 39 |
import java.nio.file.Path;
|
| 41 | 40 |
import java.sql.Connection;
|
| ... | ... | @@ -52,10 +51,7 @@ public class AvdthWeightCategoryBuilderTest extends PersistenceTestSupportRead { |
| 52 | 51 |
|
| 53 | 52 |
@Test
|
| 54 | 53 |
public void build() throws SQLException, IOException {
|
| 55 |
- Path avdthFile = new File("").getAbsoluteFile().toPath()
|
|
| 56 |
- .getParent()
|
|
| 57 |
- .resolve(".mvn")
|
|
| 58 |
- .resolve("avdth")
|
|
| 54 |
+ Path avdthFile = AvdthFixtures.getAvdthCachePath()
|
|
| 59 | 55 |
.resolve("avdth-gen-35_74.mdb");
|
| 60 | 56 |
Path scriptPath = localTestMethodResource.getTestDirectory().toPath().resolve("export-" + avdthFile.toFile().getName().replace(".mdb", ".sql"));
|
| 61 | 57 |
Path scriptTemporaryDirectory = scriptPath.getParent().resolve(scriptPath.toFile().getName().replace(".sql", "-tmp"));
|
| ... | ... | @@ -140,11 +140,15 @@ |
| 140 | 140 |
<persistence.model.version>9.0</persistence.model.version>
|
| 141 | 141 |
<!--persistence previous model version used for tck migration-->
|
| 142 | 142 |
<persistence.previous.model.version>8.0</persistence.previous.model.version>
|
| 143 |
- <!-- tck file name to use -->
|
|
| 144 | 143 |
<tck.filename>tck-v${persistence.model.version}.zip</tck.filename>
|
| 145 | 144 |
<tck.updated.filename>updated-${tck.filename}</tck.updated.filename>
|
| 146 | 145 |
<tck.remote.path>/var/www/html/private/ird-observe/db</tck.remote.path>
|
| 147 | 146 |
<tck.cache.path>${user.home}/.mvn/tck-cache/${model.name}/tck</tck.cache.path>
|
| 147 |
+ <!-- FIXME Create new mojo to deal with avdth cache like for tck -->
|
|
| 148 |
+ <avdth.filename>avdth-v${persistence.model.version}.zip</avdth.filename>
|
|
| 149 |
+ <!-- FIXME Create new mojo to deal with avdth cache like for tck -->
|
|
| 150 |
+ <avdth.remote.path>/var/www/html/private/ird-observe/avdth</avdth.remote.path>
|
|
| 151 |
+ <avdth.cache.path>${user.home}/.mvn/tck-cache/${model.name}/avdth</avdth.cache.path>
|
|
| 148 | 152 |
<!-- Do assert in tests-->
|
| 149 | 153 |
<test.skipAsserts>false</test.skipAsserts>
|
| 150 | 154 |
<runner.modelName>${model.name}</runner.modelName>
|
| ... | ... | @@ -24,6 +24,7 @@ observetest.build.version=${project.version} |
| 24 | 24 |
observetest.model.version=${persistence.model.version}
|
| 25 | 25 |
observetest.previous.model.version=${persistence.previous.model.version}
|
| 26 | 26 |
observetest.tck.cache.path=${tck.cache.path}
|
| 27 |
+observetest.avdth.cache.path=${avdth.cache.path}
|
|
| 27 | 28 |
observetest.first.model.version=7.0
|
| 28 | 29 |
observetest.h2.login=sa
|
| 29 | 30 |
observetest.h2.password=sa
|