diff --git a/app/components/app-header/component.js b/app/components/app-header/component.js index c623e6c61..3387b59a7 100644 --- a/app/components/app-header/component.js +++ b/app/components/app-header/component.js @@ -1,13 +1,56 @@ import Component from '@ember/component'; import ENV from 'screwdriver-ui/config/environment'; +import { computed, get } from '@ember/object'; +import { inject as service } from '@ember/service'; +import { getOwner } from '@ember/application'; export default Component.extend({ + router: service(), + session: service(), tagName: 'header', showSearch: false, docUrl: ENV.APP.SDDOC_URL, slackUrl: ENV.APP.SLACK_URL, releaseVersion: ENV.APP.RELEASE_VERSION, searchTerm: '', + isAdmin: computed( + 'session.data.authenticated.scope', + function isAdminFunction() { + const isAdmin = (this.session.data.authenticated.scope || []).includes( + 'admin' + ); + + return isAdmin; + } + ), + isNewUI: computed('router.{currentRouteName,currentURL}', { + get() { + const currentURL = get(this, 'router.currentURL'); + const isNewUIRoute = currentURL.includes('/v2/'); + + return isNewUIRoute; + } + }), + hasAlternativeRoute: computed( + 'isNewUI', + 'router.{currentRouteName,currentURL}', + { + get() { + const routeName = this.router.currentRouteName; + + let alterRouteName = `v2.${this.router.currentRouteName}`; + + if (this.isNewUI) { + // to remove v2. prefix + alterRouteName = routeName.slice(3); + } + + const alterRoute = getOwner(this).lookup(`route:${alterRouteName}`); + + return alterRoute; + } + } + ), actions: { invalidateSession() { this.onInvalidate(); @@ -26,6 +69,17 @@ export default Component.extend({ }, openSearchForm() { this.set('showSearch', true); + }, + switchUI() { + const currentURL = get(this, 'router.currentURL'); + + let targetURL = `/v2${currentURL}`; + + if (this.isNewUI) { + targetURL = currentURL.split('/v2/').join('/'); + } + + this.router.transitionTo(targetURL); } } }); diff --git a/app/components/app-header/styles.scss b/app/components/app-header/styles.scss index 8aafa11d5..d050232d3 100644 --- a/app/components/app-header/styles.scss +++ b/app/components/app-header/styles.scss @@ -169,6 +169,10 @@ pointer-events: none; } + .dropdown-item.switch-ui { + cursor: pointer; + } + .dropdown-item > a.active > span { font-size: 12px; color: $sd-text-light; diff --git a/app/components/app-header/template.hbs b/app/components/app-header/template.hbs index bc6cec42c..1329f4c6c 100644 --- a/app/components/app-header/template.hbs +++ b/app/components/app-header/template.hbs @@ -182,6 +182,17 @@ {{/unless}} {{/each}} {{ddm.divider}} + {{#if this.isAdmin}} + + {{#if this.hasAlternativeRoute}} + Switch to {{if this.isNewUI "Old" "New"}} UI + + {{/if}} + + {{/if}} {{#if (not @session.data.authenticated.isGuest)}} diff --git a/app/components/newui-pipeline-nav/component.js b/app/components/newui-pipeline-nav/component.js new file mode 100644 index 000000000..557064773 --- /dev/null +++ b/app/components/newui-pipeline-nav/component.js @@ -0,0 +1,3 @@ +import Component from '@ember/component'; + +export default Component.extend({}); diff --git a/app/components/newui-pipeline-nav/styles.scss b/app/components/newui-pipeline-nav/styles.scss new file mode 100755 index 000000000..f0a197f18 --- /dev/null +++ b/app/components/newui-pipeline-nav/styles.scss @@ -0,0 +1,52 @@ +ul.pipeline-nav { + list-style-type: none; + margin: 0; + padding: 0; + + text-align: center; + + display: grid; + grid-column-gap: 0px; + grid-row-gap: 0px; + + grid-template-columns: auto; + grid-template-rows: 40px 40px 40px 40px auto; + + grid-template-areas: + 'builds' + 'secrets' + 'options' + 'metrics' + 'rest'; + + a { + &.active { + color: #1c64f2; + } + + color: #6b7280; + } + + &:first-child { + padding-top: 20px; + } + + .svg-inline--fa { + cursor: pointer; + } + + .builds { + grid-area: builds; + } + + .secrets { + grid-area: secrets; + } + + .options { + grid-area: options; + } + .metrics { + grid-area: metrics; + } +} diff --git a/app/components/newui-pipeline-nav/template.hbs b/app/components/newui-pipeline-nav/template.hbs new file mode 100644 index 000000000..645c65cb3 --- /dev/null +++ b/app/components/newui-pipeline-nav/template.hbs @@ -0,0 +1,14 @@ + diff --git a/app/router.js b/app/router.js index c511bfd49..44dca8248 100644 --- a/app/router.js +++ b/app/router.js @@ -15,7 +15,7 @@ Router.map(function route() { 'pipeline', { path: '/pipelines/:pipeline_id' }, function secretsRoute() { - this.route('jobs', function eventsRoute() { + this.route('jobs', function jobsRoute() { this.route('index', { path: '/' }); }); this.route('events', function eventsRoute() { @@ -124,6 +124,37 @@ Router.map(function route() { this.route('404', { path: '/*path' }); this.route('pipeline-visualizer'); + + this.route('v2', function v2Route() { + this.route('index', { path: '/' }); + this.route( + 'pipeline', + { path: '/pipelines/:pipeline_id' }, + function pipelinesRoute() { + this.route('builds'); + this.route('secrets'); + this.route('options'); + this.route('metrics'); + + this.route('events', function eventsRoute() { + this.route('show', { path: '/:event_id' }); + }); + this.route('jobs', function jobsRoute() { + this.route('index', { path: '/' }); + }); + this.route('pulls'); + } + ); + + this.route( + 'dashboard', + { path: '/dashboards' }, + function dashboardsRoute() { + this.route('index', { path: '/' }); + this.route('show', { path: '/:collection_id' }); + } + ); + }); }); /* eslint-enable array-callback-return */ diff --git a/app/styles/app.scss b/app/styles/app.scss index ddf43cf1a..9643d90ce 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -74,6 +74,7 @@ $pipeline-header-height-max: 134px; @import 'app/styles/user-settings'; @import 'app/styles/create'; @import 'app/styles/commands-templates'; +@import 'app/styles/new-ui'; .container { box-sizing: border-box; diff --git a/app/styles/new-ui.scss b/app/styles/new-ui.scss new file mode 100644 index 000000000..f4a9f8bf1 --- /dev/null +++ b/app/styles/new-ui.scss @@ -0,0 +1,85 @@ +.new-ui { + // to accommodate and offset old ui margins + margin-right: -15px; + margin-left: -15px; + height: 100%; + // height: 100vh; + + .grid-container { + display: grid; + height: 100%; + + grid-column-gap: 0px; + grid-row-gap: 0px; + + grid-template-columns: 50px; + grid-template-rows: auto; + + grid-template-areas: 'left right'; + + .grid-item.left { + background-color: #fff; + border-left: 1px solid #f2f2f2; + border-right: 1px solid #f2f2f2; + + grid-area: left; + } + + .grid-item.right { + grid-area: right; + + display: grid; + grid-column-gap: 0px; + grid-row-gap: 0px; + + grid-template-areas: + 'pipeline-header pipeline-header' + 'pipeline-tab pipeline-tab' + 'pipeline-content pipeline-workflowgraph'; + + grid-template-rows: 80px 52px 1fr; + grid-template-columns: 2fr 8fr; + + .grid-item.pipeline-header { + grid-area: pipeline-header; + } + + .grid-item.pipeline-tab { + grid-area: pipeline-tab; + + display: grid; + padding-top: 8px; + padding-bottom: 1px; + + ul.nav-tabs.nav { + border: none; + + li { + border-bottom: 3px solid #fff; + padding-left: 15px; + padding-right: 15px; + text-align: center; + + &.active { + border-bottom-color: #1c64f2; + } + + a { + &.active { + color: #1c64f2; + } + + color: #6b7280; + border: none; + padding: 8px 16px 9px 16px; + } + } + } + } + + .grid-item.pipeline-content { + grid-area: pipeline-content; + } + } + } +} diff --git a/app/v2/pipeline/builds/route.js b/app/v2/pipeline/builds/route.js new file mode 100644 index 000000000..9d4c40156 --- /dev/null +++ b/app/v2/pipeline/builds/route.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelineBuildsRoute extends Route {} diff --git a/app/v2/pipeline/builds/template.hbs b/app/v2/pipeline/builds/template.hbs new file mode 100644 index 000000000..0a7d744fc --- /dev/null +++ b/app/v2/pipeline/builds/template.hbs @@ -0,0 +1,2 @@ +{{page-title "Builds"}} +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/controller.js b/app/v2/pipeline/controller.js new file mode 100644 index 000000000..7ba1bf167 --- /dev/null +++ b/app/v2/pipeline/controller.js @@ -0,0 +1,26 @@ +import Controller from '@ember/controller'; +import { service } from '@ember/service'; +import { action } from '@ember/object'; + +export default class NewPipelineController extends Controller { + @service session; + + get collections() { + return this.model.collections; + } + + get pipeline() { + return this.model.pipeline; + } + + @action + addToCollection(pipelineId, collection) { + const { pipelineIds } = collection; + + if (!pipelineIds.includes(pipelineId)) { + collection.set('pipelineIds', [...pipelineIds, pipelineId]); + } + + return collection.save(); + } +} diff --git a/app/v2/pipeline/events/controller.js b/app/v2/pipeline/events/controller.js new file mode 100644 index 000000000..6809e8bf8 --- /dev/null +++ b/app/v2/pipeline/events/controller.js @@ -0,0 +1,3 @@ +import Controller from '@ember/controller'; + +export default class NewPipelineEventsController extends Controller {} diff --git a/app/v2/pipeline/events/index/route.js b/app/v2/pipeline/events/index/route.js new file mode 100644 index 000000000..4cf38725d --- /dev/null +++ b/app/v2/pipeline/events/index/route.js @@ -0,0 +1,9 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelineEventsIndexRoute extends Route { + /* eslint-disable camelcase */ + model({ event_id }) { + return this; + } + /* eslint-enable camelcase */ +} diff --git a/app/v2/pipeline/events/index/template.hbs b/app/v2/pipeline/events/index/template.hbs new file mode 100644 index 000000000..cf303da1e --- /dev/null +++ b/app/v2/pipeline/events/index/template.hbs @@ -0,0 +1,2 @@ +{{page-title "Index"}} +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/events/route.js b/app/v2/pipeline/events/route.js new file mode 100644 index 000000000..5d510dd64 --- /dev/null +++ b/app/v2/pipeline/events/route.js @@ -0,0 +1,9 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelineEventsRoute extends Route { + /* eslint-disable camelcase */ + model({ event_id }) { + return this; + } + /* eslint-enable camelcase */ +} diff --git a/app/v2/pipeline/events/show/route.js b/app/v2/pipeline/events/show/route.js new file mode 100644 index 000000000..7438b66d7 --- /dev/null +++ b/app/v2/pipeline/events/show/route.js @@ -0,0 +1,9 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelineEventsShowRoute extends Route { + /* eslint-disable camelcase */ + model({ event_id }) { + return this; + } + /* eslint-enable camelcase */ +} diff --git a/app/v2/pipeline/events/show/template.hbs b/app/v2/pipeline/events/show/template.hbs new file mode 100644 index 000000000..a2c0e2e0a --- /dev/null +++ b/app/v2/pipeline/events/show/template.hbs @@ -0,0 +1,2 @@ +{{page-title "Show"}} +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/events/template.hbs b/app/v2/pipeline/events/template.hbs new file mode 100644 index 000000000..dab0c8811 --- /dev/null +++ b/app/v2/pipeline/events/template.hbs @@ -0,0 +1,2 @@ +{{page-title "Events"}} +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/index/route.js b/app/v2/pipeline/index/route.js new file mode 100644 index 000000000..81cb6eeac --- /dev/null +++ b/app/v2/pipeline/index/route.js @@ -0,0 +1,9 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelineIndexRoute extends Route { + /* eslint-disable camelcase */ + model({ pipeline_id }) { + return this; + } + /* eslint-enable camelcase */ +} diff --git a/app/v2/pipeline/index/template.hbs b/app/v2/pipeline/index/template.hbs new file mode 100644 index 000000000..8e8b39136 --- /dev/null +++ b/app/v2/pipeline/index/template.hbs @@ -0,0 +1,3 @@ +{{page-title "Index"}} +> pipeline index +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/jobs/index/route.js b/app/v2/pipeline/jobs/index/route.js new file mode 100644 index 000000000..20958f273 --- /dev/null +++ b/app/v2/pipeline/jobs/index/route.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelineJobsIndexRoute extends Route {} diff --git a/app/v2/pipeline/jobs/index/template.hbs b/app/v2/pipeline/jobs/index/template.hbs new file mode 100644 index 000000000..cf303da1e --- /dev/null +++ b/app/v2/pipeline/jobs/index/template.hbs @@ -0,0 +1,2 @@ +{{page-title "Index"}} +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/jobs/route.js b/app/v2/pipeline/jobs/route.js new file mode 100644 index 000000000..94642a0b6 --- /dev/null +++ b/app/v2/pipeline/jobs/route.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelineJobsRoute extends Route {} diff --git a/app/v2/pipeline/jobs/template.hbs b/app/v2/pipeline/jobs/template.hbs new file mode 100644 index 000000000..feee204c7 --- /dev/null +++ b/app/v2/pipeline/jobs/template.hbs @@ -0,0 +1,2 @@ +{{page-title "Jobs"}} +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/metrics/route.js b/app/v2/pipeline/metrics/route.js new file mode 100644 index 000000000..3c1185011 --- /dev/null +++ b/app/v2/pipeline/metrics/route.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelineMetricsRoute extends Route {} diff --git a/app/v2/pipeline/metrics/template.hbs b/app/v2/pipeline/metrics/template.hbs new file mode 100644 index 000000000..7a8ea0988 --- /dev/null +++ b/app/v2/pipeline/metrics/template.hbs @@ -0,0 +1,2 @@ +{{page-title "Metrics"}} +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/options/route.js b/app/v2/pipeline/options/route.js new file mode 100644 index 000000000..215b0e5b5 --- /dev/null +++ b/app/v2/pipeline/options/route.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelineOptionsRoute extends Route {} diff --git a/app/v2/pipeline/options/template.hbs b/app/v2/pipeline/options/template.hbs new file mode 100644 index 000000000..4fd503af1 --- /dev/null +++ b/app/v2/pipeline/options/template.hbs @@ -0,0 +1,2 @@ +{{page-title "Options"}} +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/pulls/route.js b/app/v2/pipeline/pulls/route.js new file mode 100644 index 000000000..04ba7dbab --- /dev/null +++ b/app/v2/pipeline/pulls/route.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelinePullsRoute extends Route {} diff --git a/app/v2/pipeline/pulls/template.hbs b/app/v2/pipeline/pulls/template.hbs new file mode 100644 index 000000000..1cbb18581 --- /dev/null +++ b/app/v2/pipeline/pulls/template.hbs @@ -0,0 +1,2 @@ +{{page-title "Pulls"}} +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/route.js b/app/v2/pipeline/route.js new file mode 100644 index 000000000..2daa077c7 --- /dev/null +++ b/app/v2/pipeline/route.js @@ -0,0 +1,26 @@ +import Route from '@ember/routing/route'; +import RSVP from 'rsvp'; +import { service } from '@ember/service'; +import { set } from '@ember/object'; + +export default class NewPipelineRoute extends Route { + @service router; + + @service store; + + /* eslint-disable camelcase */ + model({ pipeline_id }) { + set(this, 'pipelineId', pipeline_id); + const collections = this.store.findAll('collection').catch(() => []); + + return RSVP.hash({ + pipeline: this.store.findRecord('pipeline', pipeline_id).catch(() => { + this.router.transitionTo('/404'); + + return []; + }), + collections + }); + } + /* eslint-enable camelcase */ +} diff --git a/app/v2/pipeline/secrets/route.js b/app/v2/pipeline/secrets/route.js new file mode 100644 index 000000000..a0e6486e4 --- /dev/null +++ b/app/v2/pipeline/secrets/route.js @@ -0,0 +1,3 @@ +import Route from '@ember/routing/route'; + +export default class NewPipelineSecretsRoute extends Route {} diff --git a/app/v2/pipeline/secrets/template.hbs b/app/v2/pipeline/secrets/template.hbs new file mode 100644 index 000000000..21fe2b1a1 --- /dev/null +++ b/app/v2/pipeline/secrets/template.hbs @@ -0,0 +1,2 @@ +{{page-title "Secrets"}} +{{outlet}} \ No newline at end of file diff --git a/app/v2/pipeline/template.hbs b/app/v2/pipeline/template.hbs new file mode 100644 index 000000000..b6ea2b98e --- /dev/null +++ b/app/v2/pipeline/template.hbs @@ -0,0 +1,36 @@ +{{page-title "Pipeline"}} +{{!-- > pipeline --}} + +
+
+
+ +
+
+
+ +
+ +
+ + + Events + + + Pull Requests + + + Jobs + + +
+ +
+
+
+ +{{outlet}} \ No newline at end of file diff --git a/app/v2/route.js b/app/v2/route.js new file mode 100644 index 000000000..66fdb5c9a --- /dev/null +++ b/app/v2/route.js @@ -0,0 +1,17 @@ +import Route from '@ember/routing/route'; +import { service } from '@ember/service'; + +export default class NewRoute extends Route { + @service session; + + @service router; + + beforeModel(transition) { + this.session.requireAuthentication(transition, 'login'); + + const isAdmin = (this.session.data.authenticated.scope || []).includes('admin'); + if (!isAdmin) { + this.router.transitionTo('/404'); + } + } +} diff --git a/app/v2/template.hbs b/app/v2/template.hbs new file mode 100644 index 000000000..7cc63261f --- /dev/null +++ b/app/v2/template.hbs @@ -0,0 +1,2 @@ +{{page-title "New"}} +{{outlet}} \ No newline at end of file diff --git a/tests/integration/components/app-header/component-test.js b/tests/integration/components/app-header/component-test.js index 3697e6d35..03c5b852e 100644 --- a/tests/integration/components/app-header/component-test.js +++ b/tests/integration/components/app-header/component-test.js @@ -2,9 +2,11 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render, click } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; - import injectScmServiceStub from '../../../helpers/inject-scm'; +const fakeToken = + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImFwcGxlIiwianRpIjoiNTA1NTQzYTUtNDhjZi00OTAyLWE3YTktZGY0NTI1ODFjYWM0IiwiaWF0IjoxNTIxNTcyMDE5LCJleHAiOjE1MjE1NzU2MTl9.ImS1ajOnksl1X74uL85jOjzdUXmBW3HfMdPfP1vjrmc'; + module('Integration | Component | app header', function (hooks) { setupRenderingTest(hooks); @@ -45,7 +47,8 @@ module('Integration | Component | app header', function (hooks) { isAuthenticated: true, data: { authenticated: { - username: 'foofoo' + username: 'foofoo', + token: fakeToken } } }); @@ -66,7 +69,13 @@ module('Integration | Component | app header', function (hooks) { test('it calls the logout method on logout', async function (assert) { assert.expect(2); this.set('sessionMock', { - isAuthenticated: true + isAuthenticated: true, + data: { + authenticated: { + username: 'foofoo', + token: fakeToken + } + } }); this.set('invalidateSession', () => { assert.ok(true); @@ -88,7 +97,13 @@ module('Integration | Component | app header', function (hooks) { injectScmServiceStub(this); this.set('sessionMock', { - isAuthenticated: true + isAuthenticated: true, + data: { + authenticated: { + username: 'foofoo', + token: fakeToken + } + } }); this.set('scmMock', this.owner.lookup('service:scm').getScms()); diff --git a/tests/integration/components/newui-pipeline-nav/component-test.js b/tests/integration/components/newui-pipeline-nav/component-test.js new file mode 100644 index 000000000..d2f9c26c9 --- /dev/null +++ b/tests/integration/components/newui-pipeline-nav/component-test.js @@ -0,0 +1,17 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'screwdriver-ui/tests/helpers'; +import { render } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Component | newui-pipeline-nav', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.set('myAction', function(val) { ... }); + + await render(hbs``); + + assert.dom(this.element).hasText(''); + }); +}); diff --git a/tests/unit/v2/pipeline/builds/route-test.js b/tests/unit/v2/pipeline/builds/route-test.js new file mode 100644 index 000000000..d936145b2 --- /dev/null +++ b/tests/unit/v2/pipeline/builds/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/builds', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/builds'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/controller-test.js b/tests/unit/v2/pipeline/controller-test.js new file mode 100644 index 000000000..21c95f90f --- /dev/null +++ b/tests/unit/v2/pipeline/controller-test.js @@ -0,0 +1,13 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Controller | v2/pipeline', function (hooks) { + setupTest(hooks); + + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup('controller:v2/pipeline'); + + assert.ok(controller); + }); +}); diff --git a/tests/unit/v2/pipeline/events/controller-test.js b/tests/unit/v2/pipeline/events/controller-test.js new file mode 100644 index 000000000..6f5e0e6c9 --- /dev/null +++ b/tests/unit/v2/pipeline/events/controller-test.js @@ -0,0 +1,13 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Controller | v2/pipeline/events', function (hooks) { + setupTest(hooks); + + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup('controller:v2/pipeline/events'); + + assert.ok(controller); + }); +}); diff --git a/tests/unit/v2/pipeline/events/index/route-test.js b/tests/unit/v2/pipeline/events/index/route-test.js new file mode 100644 index 000000000..70016099e --- /dev/null +++ b/tests/unit/v2/pipeline/events/index/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/events/index', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/events/index'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/events/route-test.js b/tests/unit/v2/pipeline/events/route-test.js new file mode 100644 index 000000000..124392d3f --- /dev/null +++ b/tests/unit/v2/pipeline/events/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/events', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/events'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/events/show/route-test.js b/tests/unit/v2/pipeline/events/show/route-test.js new file mode 100644 index 000000000..0019356c0 --- /dev/null +++ b/tests/unit/v2/pipeline/events/show/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/events/show', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/events/show'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/index/route-test.js b/tests/unit/v2/pipeline/index/route-test.js new file mode 100644 index 000000000..cb26543dc --- /dev/null +++ b/tests/unit/v2/pipeline/index/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/index', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/index'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/jobs/index/route-test.js b/tests/unit/v2/pipeline/jobs/index/route-test.js new file mode 100644 index 000000000..30743b655 --- /dev/null +++ b/tests/unit/v2/pipeline/jobs/index/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/jobs/index', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/jobs/index'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/jobs/route-test.js b/tests/unit/v2/pipeline/jobs/route-test.js new file mode 100644 index 000000000..c8f90ffa1 --- /dev/null +++ b/tests/unit/v2/pipeline/jobs/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/jobs', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/jobs'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/metrics/route-test.js b/tests/unit/v2/pipeline/metrics/route-test.js new file mode 100644 index 000000000..701b58b22 --- /dev/null +++ b/tests/unit/v2/pipeline/metrics/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/metrics', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/metrics'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/options/route-test.js b/tests/unit/v2/pipeline/options/route-test.js new file mode 100644 index 000000000..0587bd3c1 --- /dev/null +++ b/tests/unit/v2/pipeline/options/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/options', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/options'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/pulls/route-test.js b/tests/unit/v2/pipeline/pulls/route-test.js new file mode 100644 index 000000000..9272a5388 --- /dev/null +++ b/tests/unit/v2/pipeline/pulls/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/pulls', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/pulls'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/route-test.js b/tests/unit/v2/pipeline/route-test.js new file mode 100644 index 000000000..f5d32a25b --- /dev/null +++ b/tests/unit/v2/pipeline/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline'); + + assert.ok(route); + }); +}); diff --git a/tests/unit/v2/pipeline/secrets/route-test.js b/tests/unit/v2/pipeline/secrets/route-test.js new file mode 100644 index 000000000..3bbb3ba5d --- /dev/null +++ b/tests/unit/v2/pipeline/secrets/route-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'screwdriver-ui/tests/helpers'; + +module('Unit | Route | v2/pipeline/secrets', function (hooks) { + setupTest(hooks); + + test('it exists', function (assert) { + let route = this.owner.lookup('route:v2/pipeline/secrets'); + + assert.ok(route); + }); +});