From 121a3b60d82a4d40df0dc0e376786e588f38dda9 Mon Sep 17 00:00:00 2001 From: horatio Date: Tue, 24 Sep 2024 15:24:12 -0400 Subject: [PATCH] new form termplate and routing rendering properly Co-authored-by: tangoyankee --- client/app/router.js | 8 +++++++- client/app/routes/projects/new.js | 4 ++++ client/app/templates/projects/new.hbs | 2 ++ client/tests/unit/routes/projects/new-test.js | 11 +++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 client/app/routes/projects/new.js create mode 100644 client/app/templates/projects/new.hbs create mode 100644 client/tests/unit/routes/projects/new-test.js diff --git a/client/app/router.js b/client/app/router.js index 9d563e78..9c76f575 100644 --- a/client/app/router.js +++ b/client/app/router.js @@ -10,7 +10,13 @@ export default class Router extends EmberRouterScroll { // TODO: wrap in an authenticated route Router.map(function() { // eslint-disable-line - this.route('projects'); + this.route('projects', function() { + }); + +if (config.featureFlagSelfService) { + this.route('projects/new', {path: 'projects/new'} ); +} + this.route('login'); this.route('logout'); diff --git a/client/app/routes/projects/new.js b/client/app/routes/projects/new.js new file mode 100644 index 00000000..ecdd31f9 --- /dev/null +++ b/client/app/routes/projects/new.js @@ -0,0 +1,4 @@ +import Route from '@ember/routing/route'; + +export default class ProjectsNewRoute extends Route { +} diff --git a/client/app/templates/projects/new.hbs b/client/app/templates/projects/new.hbs new file mode 100644 index 00000000..400fa51a --- /dev/null +++ b/client/app/templates/projects/new.hbs @@ -0,0 +1,2 @@ +

Create your new project here

+{{outlet}} \ No newline at end of file diff --git a/client/tests/unit/routes/projects/new-test.js b/client/tests/unit/routes/projects/new-test.js new file mode 100644 index 00000000..90dcc01f --- /dev/null +++ b/client/tests/unit/routes/projects/new-test.js @@ -0,0 +1,11 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Route | projects/new', function(hooks) { + setupTest(hooks); + + test('it exists', function(assert) { + let route = this.owner.lookup('route:projects/new'); + assert.ok(route); + }); +});