Contains the frontend journey for EMCS TFE to Create a Movement. Using hmrc-scaffold-g8.
-
Enter an
sbt
shell by issuing the commandsbt
in your terminal window. (alternative, if using IntelliJ click on thesbt shell
tab in the bottom panel) -
Once the sbt shell has initialised enter the command
g8Scaffold template
wheretemplate
is replaced with one of the following available scaffolding templates:checkboxPage
contentPage
datePage
intPage
multipleQuestionsPage
radioButtonPage
stringPage
yesNoPage
characterCountPage
-
The g8Scaffolding will prompt for values to properties. Such as the
className
-
Enter appropriate values for each prompt
-
Once the g8Scaffold says
success :)
, exit out of the sbt shell and back to a normal terminal window -
Run the script
./migrate.sh
to run the migrations (this creates the messages entries and the routes entries - along with a few other things) -
Run the script
./move2section.sh SECTION_NAME
to move the files to the right section (replace SECTION_NAME with a section from controllers/sections). You'll need to manually add.sections.SECTION_NAME
to package names and import paths in the routes, html files, viewmodels, and controllers. -
Manually move routes from
app.routes
to theconf/SECTION_NAME.routes
file. -
Your page is ready to be refactored and enhanced with business rules, content changes and anything else.
-
IMPORTANT:
-
Using the scaffolds to generate tests is not a replacement for writing good tests. Please refactor and enhance the default tests with tests which cover extra logic and business rules
-
Scaffold are here to help us get a head start with simple pages, but do refactor the generated code to improve quality where appropriate
-
If you find an improvement that could be applied to the Scaffolds update the
g8
template so that this can be used by future Engineers
This code is open source software licensed under the Apache 2.0 License.