Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
00b01329
Commit
00b01329
authored
6 years ago
by
Arthur Vuagniaux
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#71
: Update tests of ModelCreationTests.java
parent
08a96762
No related branches found
No related tags found
2 merge requests
!87
Test merge gui
,
!86
Resolve "GUI automated tests"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ttool/src/test/java/ui/bot/ModelCreationTests.java
+54
-4
54 additions, 4 deletions
ttool/src/test/java/ui/bot/ModelCreationTests.java
with
54 additions
and
4 deletions
ttool/src/test/java/ui/bot/ModelCreationTests.java
+
54
−
4
View file @
00b01329
...
@@ -8,7 +8,9 @@
...
@@ -8,7 +8,9 @@
package
ui.bot
;
package
ui.bot
;
import
org.assertj.swing.edt.GuiActionRunner
;
import
org.assertj.swing.edt.GuiActionRunner
;
import
org.assertj.swing.finder.JFileChooserFinder
;
import
org.assertj.swing.fixture.FrameFixture
;
import
org.assertj.swing.fixture.FrameFixture
;
import
org.assertj.swing.fixture.JFileChooserFixture
;
import
org.assertj.swing.fixture.JMenuItemFixture
;
import
org.assertj.swing.fixture.JMenuItemFixture
;
import
org.assertj.swing.junit.testcase.AssertJSwingJUnitTestCase
;
import
org.assertj.swing.junit.testcase.AssertJSwingJUnitTestCase
;
import
org.junit.Test
;
import
org.junit.Test
;
...
@@ -35,13 +37,61 @@ public class ModelCreationTests extends AssertJSwingJUnitTestCase {
...
@@ -35,13 +37,61 @@ public class ModelCreationTests extends AssertJSwingJUnitTestCase {
* the tab New. Then save it.
* the tab New. Then save it.
*/
*/
TraceManager
.
addDev
(
"=============="
+
System
.
lineSeparator
()
+
TraceManager
.
addDev
(
"=============="
+
System
.
lineSeparator
()
+
"M
ainFrame
Test: creat
eANew
File: Started"
);
"M
odelCreation
Test
s
: creat
ionOfA
File: Started"
);
JMenuItemFixture
jmf
=
window
.
menuItem
(
"File New"
);
JMenuItemFixture
jmf
=
window
.
menuItem
(
"File New"
);
TraceManager
.
addDev
(
"M
ainFrame
Test: creat
eANew
File: Creating a new file by clicking on New"
);
TraceManager
.
addDev
(
"M
odelCreation
Test
s
: creat
ionOfA
File: Creating a new file by clicking on New"
);
jmf
.
click
();
jmf
.
click
();
if
(
debug
)
if
(
debug
)
ut
.
debugThread
(
3600
,
"MainFrameTest: createANewFile: "
);
ut
.
debugThread
(
3600
,
"ModelCreationTests: ccreationOfAFile: "
);
TraceManager
.
addDev
(
"MainFrameTest: createANewFile: File created"
);
TraceManager
.
addDev
(
"ModelCreationTests: creationOfAFile: File created"
);
jmf
=
window
.
menuItem
(
"File Save As Model"
);
TraceManager
.
addDev
(
"ModelCreationTests: creationOfAFile: Saving the new model by clicking on Save As Model"
);
jmf
.
click
();
if
(
debug
)
ut
.
debugThread
(
3600
,
"ModelCreationTests: creationOfAFile: "
);
JFileChooserFixture
jfc
=
JFileChooserFinder
.
findFileChooser
().
using
(
robot
());
TraceManager
.
addDev
(
"ModelCreationTests: creationOfAFile: Writting the path "
);
jfc
.
fileNameTextBox
().
pressAndReleaseKeys
(
ut
.
stringToKeyEvent
(
"git/TTool/modeling/test"
));
TraceManager
.
addDev
(
"ModelCreationTests: creationOfAFile: End writting"
);
TraceManager
.
addDev
(
"ModelCreationTests: creationOfAFile: Clicking on the Approval Button"
);
jfc
.
approveButton
().
click
();
TraceManager
.
addDev
(
"ModelCreationTests: creationOfAFile: Approve"
);
TraceManager
.
addDev
(
"ModelCreationTests: creationOfAFile: File saved"
);
TraceManager
.
addDev
(
"ModelCreationTests: creationOfAFile: Finished"
+
System
.
lineSeparator
()
+
"=============="
);
}
@Test
public
void
openAFile
()
{
/*
* Description : Open the file that had been created.
*/
TraceManager
.
addDev
(
"=============="
+
System
.
lineSeparator
()
+
"ModelCreationTests: openAFile: Started"
);
JMenuItemFixture
jmf
=
window
.
menuItem
(
"File Model Project"
);
TraceManager
.
addDev
(
"ModelCreationTests: openAFile: Clicking on Open Model, in order to open test.xml"
);
jmf
.
click
();
if
(
debug
)
ut
.
debugThread
(
3600
,
"ModelCreationTests: openAFile: "
);
TraceManager
.
addDev
(
"ModelCreationTests: openAFile: End Clicking"
);
TraceManager
.
addDev
(
"ModelCreationTests: openAFile: Try to open the file test.xml"
);
JFileChooserFixture
jfc
=
JFileChooserFinder
.
findFileChooser
().
using
(
robot
());
TraceManager
.
addDev
(
"ModelCreationTests: openAFile: Writting the path "
);
jfc
.
fileNameTextBox
().
pressAndReleaseKeys
(
ut
.
stringToKeyEvent
(
"git/TTool/modeling/test.xml"
));
TraceManager
.
addDev
(
"ModelCreationTests: openAFile: End writting"
);
TraceManager
.
addDev
(
"ModelCreationTests: openAFile: Clicking on the Approval Button"
);
jfc
.
approveButton
().
click
();
if
(
debug
)
ut
.
debugThread
(
3600
,
"ModelCreationTests: openAFile: "
);
TraceManager
.
addDev
(
"ModelCreationTests: openAFile: Approve"
);
TraceManager
.
addDev
(
"ModelCreationTests: openAFile: End loading the file"
);
TraceManager
.
addDev
(
"ModelCreationTests: openAFile: Finished"
+
System
.
lineSeparator
()
+
"=============="
);
}
}
@Override
@Override
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment