jmix-framework / jmix-ui-tests Goto Github PK
View Code? Open in Web Editor NEWJmix v.1 Classic UI test suite
Home Page: https://www.jmix.io
License: Apache License 2.0
Jmix v.1 Classic UI test suite
Home Page: https://www.jmix.io
License: Apache License 2.0
EntityLogViewTest.checkModifiedRecordSetup(Checks modified record for changes with logged setup) io.jmix.tests.ui.test.audit
EntityLogViewTest.checkRemovedAndRestoredRecord(Checks removed and restored entity record) io.jmix.tests.ui.test.audit
EntityLogViewTest.checkCreatedRecord(Checks created setup record) io.jmix.tests.ui.test.audit
Sometimes first test has initialization error, however next tests work fine.
io.jmix.tests.ui.test.audit.EntityLogSetupTest.initializationError
01:28:01 org.rnorth.ducttape.TimeoutException: Timeout waiting for result with exception
01:28:01 org.rnorth.ducttape.TimeoutException: Timeout waiting for result with exception
at app//org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:54)
at app//org.testcontainers.containers.BrowserWebDriverContainer.getWebDriver(BrowserWebDriverContainer.java:292)
at org.testcontainers.containers.BrowserWebDriverContainer$getWebDriver$0.call(Unknown Source)
at app//org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at app//org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at app//org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)
at app//io.jmix.tests.extension.BrowserExtension.startBrowser(BrowserExtension.groovy:45)
at app//io.jmix.tests.extension.BrowserExtension.beforeAll(BrowserExtension.groovy:23)
at app//org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$10(ClassBasedTestDescriptor.java:381)
at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at app//org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:381)
at app//org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:205)
at app//org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:80)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at app//org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1541)
at app//org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at app//org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at app//org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at app//org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at app//org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at [email protected]/java.lang.reflect.Method.invoke(Method.java:566)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
at com.sun.proxy.$Proxy2.stop(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:133)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Suppressed: java.lang.NullPointerException: Cannot invoke method stop() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:44)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:34)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)
at io.jmix.tests.ui.extension.PostgreSQLExtension.afterAll(PostgreSQLExtension.groovy:25)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllCallbacks$16(ClassBasedTestDescriptor.java:447)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllCallbacks$17(ClassBasedTestDescriptor.java:447)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeAfterAllCallbacks(ClassBasedTestDescriptor.java:447)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:229)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:80)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:161)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:161)
... 47 more
Suppressed: java.lang.IllegalStateException: No webdriver is bound to current thread: 1. You need to call open(url) first.
at com.codeborne.selenide.impl.WebDriverThreadLocalContainer.getWebDriver(WebDriverThreadLocalContainer.java:138)
at com.codeborne.selenide.WebDriverRunner.getWebDriver(WebDriverRunner.java:112)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1956)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3843)
at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:50)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329)
at io.jmix.tests.extension.BrowserExtension.stopBrowser(BrowserExtension.groovy:53)
at io.jmix.tests.extension.BrowserExtension.afterAll(BrowserExtension.groovy:38)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllCallbacks$16(ClassBasedTestDescriptor.java:447)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllCallbacks$17(ClassBasedTestDescriptor.java:447)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeAfterAllCallbacks(ClassBasedTestDescriptor.java:447)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:229)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:80)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:161)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:161)
... 47 more
Caused by: org.rnorth.ducttape.TimeoutException: java.util.concurrent.TimeoutException
at app//org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:70)
at app//org.rnorth.ducttape.timeouts.Timeouts.getWithTimeout(Timeouts.java:43)
at app//org.testcontainers.containers.BrowserWebDriverContainer.lambda$getWebDriver$1(BrowserWebDriverContainer.java:293)
at app//org.rnorth.ducttape.unreliables.Unreliables.lambda$retryUntilSuccess$0(Unreliables.java:43)
at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at [email protected]/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204)
at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:65)
... 7 more
For this problem there is an issue in testcontainers: testcontainers/testcontainers-java#5833
And issue in Selenium: SeleniumHQ/selenium#10984
In Selenium fix presents since 4.5.1.
The latest Selenide version is 6.9.0 does not include this fix. Need to update when patch version will be released.
For now there are workarounds from above tickets:
1)
browser = new BrowserWebDriverContainer()
.withCapabilities(capabilities)
.withEnv("SE_OPTS", "--session-retry-interval 1") as BrowserWebDriverContainer
private static FirefoxOptions firefoxOptions = new FirefoxOptions();
@Container
BrowserWebDriverContainer<?> firefox = new BrowserWebDriverContainer<>()
.withNetwork(network)
.withCapabilities(firefoxOptions);
@BeforeEach
void beforeEach() {
RemoteWebDriver remoteWebDriver = await().atMost(20, TimeUnit.SECONDS).until(() -> {
return new RemoteWebDriver(firefox.getSeleniumAddress(), firefoxOptions);
}, Objects::nonNull);
...
}
Waiting new version of Selenide with fixes.
Waiting test containers 1.17.7 release.
org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException:
Could not find method testRuntime() for arguments [org.junit.jupiter:junit-jupiter-engine:5.7.1] on object of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Use LocallyRunExtension
instead of ChromeExtension
and FirefoxExtension
when running tests locally.
Update jmix-ui-test project, add entities from astronomy project
CheckBox
List of changes:
Description
field1.Simple CheckBoxGroup
2.CheckBoxGroup with custom options
3. Dataaware CheckBoxGroup
1.Simple table
-check 'multiselect' option
-check 'sortable' option
-check 'columnControlVisible' option
-check 'reorderingAllowed' option
-check 'showSelection' option
2.Table with max text lenght
-check field with value <= maxTextLength+10
-check field with value > maxTextLength+10
3.Table actions
-check availability of buttons with actions in button panel
-check availability of buttons with actions in context menu
-check availability of buttons with actions using shortcuts
4.Editable table
-check ability to edit value of textField, checkbox, dropdown list
5.Table with formatter
-check formatting of column toUpperCase()
-check formatting of column toLowerCase()
6.Table with icon provider
-check icon depending on entity status value
7.Table with style provier
-check field coloring depending on value
8.ItemClick and EnterPress action
-check setItemClickAction (double click on entity)
-check setEnterPressAction (Enter click on selected entity)
9.Table with generated columns
-check addGeneratedColumn with lookupField
10.Table with aggregation
-check aggregation with type = 'sum'
-check custom AggregationStrategy (most frequet grade)
11.Table without header
-check absence of header i table with columnHeaderVisible="false"
12.Table with key-value container
-TODO
13.GroupTable
-check grouping by default column
-check grouping by several columns
14.GroupTable with style provider
-check coloring of row depemding of field value
15.GroupTable with AggregationDistributionProvider
-check AggregationDistributionProvider(change aggregated recalculates rows value)
16.TreeTable
-TODO
Also update:
fix failed tests:
io.jmix.tests.ui.test.reports.reportactions.CreateReportUiTest.createReportForOneEntityWithoutWizard(Creates a report for one entity without using wizard)
io.jmix.tests.ui.test.reports.editreport.ReportParameterActionUiTest.createReportParameterEntityAndEntitiesList(Creates report parameter with Entity and Entities List types)
io.jmix.tests.ui.test.audit.EntityLogSetupTest.initializationError
Failed due to the following changes: jmix-projects/jmix-ui#677
Tests:
Caused by: NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"[j-test-id='categoryField']"}
1.Simple ComboBox
2.ComboBox with custom options
3. ComboBox filering mode
4. ComboBox handling user input
5. ComboBox with icon provider
6. ComboBox with OptionsStyleProvider
works correctly with https://github.com/Haulmont/jmix-sampler/tree/maistrenko
will be implemented on 1.1.0-SNAPSHOT platform version
Covered cases:
fix failed tests:
io.jmix.tests.sampler.button.ButtonSimpleUiTest.checkSimpleButton(Checks that user can click on simple button)
io.jmix.tests.sampler.datagrid.DataGridFrozenColumnUiTest.checkDataGridFrozenColumns(Check dataGrid frozen columns)
Run UserUiTest
2021-05-04 04:02:46.114 WARN 31752 --- [o-auto-1-exec-3] eclipselink.logging.all : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.7.2-jmix): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: column "id" does not exist
Position: 8
Error Code: 0
Call: SELECT ID, EMAIL, ENABLED, FIRST_NAME, LAST_NAME, PASSWORD, USERNAME, VERSION FROM USER WHERE (USERNAME = ?)
bind => [username]
Query: ReadAllQuery(referenceClass=User sql="SELECT ID, EMAIL, ENABLED, FIRST_NAME, LAST_NAME, PASSWORD, USERNAME, VERSION FROM USER WHERE (USERNAME = ?)")
FetchGroup(){firstName, lastName, password, id, version, email, enabled, username}
Actual situation:
many tests are using the simple report created and removed each time
Classes:
It is a huge waste of time execution
Solution:
import existing report with a unique name instead of creating a new one each time
UPD:
one more scenario is automated
creating a report without wisard
Sometimes a random click on a menu item in the lower left corner of the screen is triggered, so after opening the screen, you need to move the cursor to the lower right corner.
Caused by: NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"[j-test-id='edit']"}
Element not found {By.jTestId: edit}
Expected: not enabled
Caused by: NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":".v-window-modal"}
Element not found {.v-window-modal}
Expected: visible
Failed tests:
Update the structure for ui tests/screens
In the CI configuration test fails because WebdavDocumentEventListener
takes:
jmix.webdav.auto-generate-unique-resource-uri=true
despite @SpringBootTest
has:
properties = ["jmix.webdav.auto-generate-unique-resource-uri=false"]
1.Simple button
2.Localized button
3.Button with action
4.Button with programmatically created button
5.LinkButton
6.Simple PopupButton
7.PopupButton with custom popup layout
see http://jmix-testit.haulmont.com/projects/5/tests?isolatedSection=c11d2d3c-e920-49ea-97eb-190903218109 check-list
Covered:
-create setup record
-edit setup record
-create setup record with the same name
-remove setup record
-check filter in the view tab
-check modified record for changes not logged setup
-check modified record for changes with logged setup
-check removed and restored entity record
TODO:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.