From fa580f5c87835459289b0498e19f82dfbe598990 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 10 Jun 2020 11:55:58 -0400 Subject: [PATCH 1/7] =?UTF-8?q?chore:=20=F0=9F=A4=96=20integrate=20breadcr?= =?UTF-8?q?umbs=20component=20with=20service=20in=20core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rose/components/layout/global/_body.scss | 3 + ui/core/app/components/.gitkeep | 0 ui/core/app/components/bread-crumbs.hbs | 15 +++++ ui/core/app/controllers/orgs/org/projects.js | 19 ++++++ .../app/controllers/orgs/org/projects/new.js | 19 ++++++ .../controllers/orgs/org/projects/project.js | 13 ++++ .../org/projects/project/host-catalogs.js | 19 ++++++ .../project/host-catalogs/host-catalog.js | 13 ++++ .../org/projects/project/host-catalogs/new.js | 19 ++++++ ui/core/app/styles/app.scss | 34 ----------- .../app/templates/orgs/org/projects/index.hbs | 6 +- .../app/templates/orgs/org/projects/new.hbs | 9 +-- .../host-catalogs/host-catalog/index.hbs | 39 +++++++----- .../projects/project/host-catalogs/index.hbs | 4 ++ .../projects/project/host-catalogs/new.hbs | 4 ++ .../orgs/org/projects/project/index.hbs | 61 ++++++++++--------- ui/core/package.json | 1 + .../components/bread-crumbs-test.js | 13 ++++ .../controllers/orgs/org/projects-test.js | 12 ++++ .../controllers/orgs/org/projects/new-test.js | 12 ++++ .../orgs/org/projects/project-test.js | 12 ++++ .../projects/project/host-catalogs-test.js | 12 ++++ .../host-catalogs/host-catalog-test.js | 12 ++++ .../project/host-catalogs/new-test.js | 12 ++++ yarn.lock | 7 +++ 25 files changed, 285 insertions(+), 85 deletions(-) delete mode 100644 ui/core/app/components/.gitkeep create mode 100644 ui/core/app/components/bread-crumbs.hbs create mode 100644 ui/core/app/controllers/orgs/org/projects.js create mode 100644 ui/core/app/controllers/orgs/org/projects/new.js create mode 100644 ui/core/app/controllers/orgs/org/projects/project.js create mode 100644 ui/core/app/controllers/orgs/org/projects/project/host-catalogs.js create mode 100644 ui/core/app/controllers/orgs/org/projects/project/host-catalogs/host-catalog.js create mode 100644 ui/core/app/controllers/orgs/org/projects/project/host-catalogs/new.js create mode 100644 ui/core/tests/integration/components/bread-crumbs-test.js create mode 100644 ui/core/tests/unit/controllers/orgs/org/projects-test.js create mode 100644 ui/core/tests/unit/controllers/orgs/org/projects/new-test.js create mode 100644 ui/core/tests/unit/controllers/orgs/org/projects/project-test.js create mode 100644 ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs-test.js create mode 100644 ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/host-catalog-test.js create mode 100644 ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/new-test.js diff --git a/addons/rose/addon/styles/rose/components/layout/global/_body.scss b/addons/rose/addon/styles/rose/components/layout/global/_body.scss index 926856f49..4c937b553 100644 --- a/addons/rose/addon/styles/rose/components/layout/global/_body.scss +++ b/addons/rose/addon/styles/rose/components/layout/global/_body.scss @@ -1,3 +1,6 @@ +@use '../../../variables/sizing'; + .rose-layout-global-body { grid-area: body; + padding: sizing.rems(l); } diff --git a/ui/core/app/components/.gitkeep b/ui/core/app/components/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/ui/core/app/components/bread-crumbs.hbs b/ui/core/app/components/bread-crumbs.hbs new file mode 100644 index 000000000..f969028c6 --- /dev/null +++ b/ui/core/app/components/bread-crumbs.hbs @@ -0,0 +1,15 @@ +{{#if this.breadCrumbs}} + + {{#each this.breadCrumbs as |crumb|}} + {{#if crumb.model}} + + {{crumb.label}} + + {{else}} + + {{crumb.label}} + + {{/if}} + {{/each}} + +{{/if}} diff --git a/ui/core/app/controllers/orgs/org/projects.js b/ui/core/app/controllers/orgs/org/projects.js new file mode 100644 index 000000000..e1199f8e8 --- /dev/null +++ b/ui/core/app/controllers/orgs/org/projects.js @@ -0,0 +1,19 @@ +import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; + +export default class OrgsOrgProjectsController extends Controller { + + // =services + + @service intl; + + // =attributes + + /** + * @type {string} + */ + get breadCrumb() { + return this.intl.t('resources.projects'); + } + +} diff --git a/ui/core/app/controllers/orgs/org/projects/new.js b/ui/core/app/controllers/orgs/org/projects/new.js new file mode 100644 index 000000000..5f9540189 --- /dev/null +++ b/ui/core/app/controllers/orgs/org/projects/new.js @@ -0,0 +1,19 @@ +import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; + +export default class OrgsOrgProjectsNewController extends Controller { + + // =services + + @service intl; + + // =attributes + + /** + * @type {string} + */ + get breadCrumb() { + return this.intl.t('titles.new'); + } + +} diff --git a/ui/core/app/controllers/orgs/org/projects/project.js b/ui/core/app/controllers/orgs/org/projects/project.js new file mode 100644 index 000000000..15f6255cf --- /dev/null +++ b/ui/core/app/controllers/orgs/org/projects/project.js @@ -0,0 +1,13 @@ +import Controller from '@ember/controller'; +import { alias } from '@ember/object/computed'; + +export default class OrgsOrgProjectsProjectController extends Controller { + + // =attributes + + /** + * @type {string} + */ + @alias('model.name') breadCrumb; + +} diff --git a/ui/core/app/controllers/orgs/org/projects/project/host-catalogs.js b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs.js new file mode 100644 index 000000000..80dde2c39 --- /dev/null +++ b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs.js @@ -0,0 +1,19 @@ +import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; + +export default class OrgsOrgProjectsProjectHostCatalogsController extends Controller { + + // =services + + @service intl; + + // =attributes + + /** + * @type {string} + */ + get breadCrumb() { + return this.intl.t('resources.host-catalogs'); + } + +} diff --git a/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/host-catalog.js b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/host-catalog.js new file mode 100644 index 000000000..067facc1d --- /dev/null +++ b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/host-catalog.js @@ -0,0 +1,13 @@ +import Controller from '@ember/controller'; +import { alias } from '@ember/object/computed'; + +export default class OrgsOrgProjectsProjectHostCatalogsHostCatalogController extends Controller { + + // =attributes + + /** + * @type {string} + */ + @alias('model.name') breadCrumb; + +} diff --git a/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/new.js b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/new.js new file mode 100644 index 000000000..4fb2aed63 --- /dev/null +++ b/ui/core/app/controllers/orgs/org/projects/project/host-catalogs/new.js @@ -0,0 +1,19 @@ +import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; + +export default class OrgsOrgProjectsProjectHostCatalogsNewController extends Controller { + + // =services + + @service intl; + + // =attributes + + /** + * @type {string} + */ + get breadCrumb() { + return this.intl.t('titles.new'); + } + +} diff --git a/ui/core/app/styles/app.scss b/ui/core/app/styles/app.scss index f7c1e37f1..56d7f26df 100644 --- a/ui/core/app/styles/app.scss +++ b/ui/core/app/styles/app.scss @@ -18,37 +18,3 @@ } } } - -.projects-overview { - margin: sizing.rems(l); -} - -.project-overview, -.project-new { - margin: sizing.rems(l); - - .breadcrumbs, - .breadcrumbs a { - color: #6f7682; - text-decoration: none; - } - - .project-new-form { - .form-actions { - display: flex; - flex-direction: row; - position: relative; - float: right; - - button { - margin-right: 10px; - } - } - - input, - textarea { - box-sizing: border-box; - width: 100%; - } - } -} diff --git a/ui/core/app/templates/orgs/org/projects/index.hbs b/ui/core/app/templates/orgs/org/projects/index.hbs index f141c2649..0ddef022c 100644 --- a/ui/core/app/templates/orgs/org/projects/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/index.hbs @@ -1,4 +1,8 @@ - + + + + +

{{t "resources.projects"}}

diff --git a/ui/core/app/templates/orgs/org/projects/new.hbs b/ui/core/app/templates/orgs/org/projects/new.hbs index a4066d4f5..5289636f7 100644 --- a/ui/core/app/templates/orgs/org/projects/new.hbs +++ b/ui/core/app/templates/orgs/org/projects/new.hbs @@ -1,10 +1,6 @@ - + - + @@ -16,7 +12,6 @@ @model={{@model}} @submit={{route-action "save" @model}} @cancel={{route-action "cancel" @model}} - class="project-new-form" /> diff --git a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/host-catalog/index.hbs b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/host-catalog/index.hbs index de04351ae..b80d3f9b0 100644 --- a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/host-catalog/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/host-catalog/index.hbs @@ -1,18 +1,27 @@ -
+ -

{{t "resources.host-catalog"}}

+ + + - + +

{{t "resources.host-catalog"}}

+
- - {{t 'actions.delete'}} - -
+ + + + + {{t 'actions.delete'}} + + + +
diff --git a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs index 490cb5b65..1d845501b 100644 --- a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/index.hbs @@ -1,5 +1,9 @@ + + + +

{{t "resources.host-catalogs"}}

diff --git a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/new.hbs b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/new.hbs index 2f5cdf96a..1ac7bf86f 100644 --- a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/new.hbs +++ b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/new.hbs @@ -1,5 +1,9 @@ + + + +

{{t "titles.new"}}

diff --git a/ui/core/app/templates/orgs/org/projects/project/index.hbs b/ui/core/app/templates/orgs/org/projects/project/index.hbs index 1b255c4e1..5c297e624 100644 --- a/ui/core/app/templates/orgs/org/projects/project/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/project/index.hbs @@ -1,30 +1,35 @@ -
- + {{t 'actions.delete'}} + + -

{{t "resources.project"}}

- - - - {{t 'titles.settings'}} - - - - - - - {{t 'actions.delete'}} - -
+
diff --git a/ui/core/package.json b/ui/core/package.json index cd4e42ab9..a03037825 100644 --- a/ui/core/package.json +++ b/ui/core/package.json @@ -38,6 +38,7 @@ "doctoc": "^1.4.0", "ember-a11y-testing": "^3.0.0", "ember-auto-import": "^1.5.3", + "ember-breadcrumbs": "^0.2.3", "ember-cli": "~3.16.1", "ember-cli-app-version": "^3.2.0", "ember-cli-babel": "^7.17.2", diff --git a/ui/core/tests/integration/components/bread-crumbs-test.js b/ui/core/tests/integration/components/bread-crumbs-test.js new file mode 100644 index 000000000..47ba10bba --- /dev/null +++ b/ui/core/tests/integration/components/bread-crumbs-test.js @@ -0,0 +1,13 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +//import { render } from '@ember/test-helpers'; +//import { hbs } from 'ember-cli-htmlbars'; + +module('Integration | Component | bread-crumbs', function(hooks) { + setupRenderingTest(hooks); + + // TODO: need bread crumbs tests + test('it renders', async function(assert) { + assert.ok(true); + }); +}); diff --git a/ui/core/tests/unit/controllers/orgs/org/projects-test.js b/ui/core/tests/unit/controllers/orgs/org/projects-test.js new file mode 100644 index 000000000..6176a173c --- /dev/null +++ b/ui/core/tests/unit/controllers/orgs/org/projects-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Controller | orgs/org/projects', function(hooks) { + setupTest(hooks); + + // Replace this with your real tests. + test('it exists', function(assert) { + let controller = this.owner.lookup('controller:orgs/org/projects'); + assert.ok(controller); + }); +}); diff --git a/ui/core/tests/unit/controllers/orgs/org/projects/new-test.js b/ui/core/tests/unit/controllers/orgs/org/projects/new-test.js new file mode 100644 index 000000000..9e3731313 --- /dev/null +++ b/ui/core/tests/unit/controllers/orgs/org/projects/new-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Controller | orgs/org/projects/new', function(hooks) { + setupTest(hooks); + + // Replace this with your real tests. + test('it exists', function(assert) { + let controller = this.owner.lookup('controller:orgs/org/projects/new'); + assert.ok(controller); + }); +}); diff --git a/ui/core/tests/unit/controllers/orgs/org/projects/project-test.js b/ui/core/tests/unit/controllers/orgs/org/projects/project-test.js new file mode 100644 index 000000000..36a2c2482 --- /dev/null +++ b/ui/core/tests/unit/controllers/orgs/org/projects/project-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Controller | orgs/org/projects/project', function(hooks) { + setupTest(hooks); + + // Replace this with your real tests. + test('it exists', function(assert) { + let controller = this.owner.lookup('controller:orgs/org/projects/project'); + assert.ok(controller); + }); +}); diff --git a/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs-test.js b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs-test.js new file mode 100644 index 000000000..808f14138 --- /dev/null +++ b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Controller | orgs/org/projects/project/host-catalogs', function(hooks) { + setupTest(hooks); + + // Replace this with your real tests. + test('it exists', function(assert) { + let controller = this.owner.lookup('controller:orgs/org/projects/project/host-catalogs'); + assert.ok(controller); + }); +}); diff --git a/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/host-catalog-test.js b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/host-catalog-test.js new file mode 100644 index 000000000..4efc4b85c --- /dev/null +++ b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/host-catalog-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Controller | orgs/org/projects/project/host-catalogs/host-catalog', function(hooks) { + setupTest(hooks); + + // Replace this with your real tests. + test('it exists', function(assert) { + let controller = this.owner.lookup('controller:orgs/org/projects/project/host-catalogs/host-catalog'); + assert.ok(controller); + }); +}); diff --git a/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/new-test.js b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/new-test.js new file mode 100644 index 000000000..1981e1857 --- /dev/null +++ b/ui/core/tests/unit/controllers/orgs/org/projects/project/host-catalogs/new-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Controller | orgs/org/projects/project/host-catalogs/new', function(hooks) { + setupTest(hooks); + + // Replace this with your real tests. + test('it exists', function(assert) { + let controller = this.owner.lookup('controller:orgs/org/projects/project/host-catalogs/new'); + assert.ok(controller); + }); +}); diff --git a/yarn.lock b/yarn.lock index b5270240f..90f435da4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7058,6 +7058,13 @@ ember-auto-import@^1.2.15, ember-auto-import@^1.2.19, ember-auto-import@^1.5.3: walk-sync "^0.3.3" webpack "~4.28" +ember-breadcrumbs@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/ember-breadcrumbs/-/ember-breadcrumbs-0.2.3.tgz#a95e02b73fdc2150f3d552e84a479d6dc96a8b31" + integrity sha512-QUiPXwAlTeiXykF5RnyilEgcj9NSFGciAawktImv6V6Lq9sNfmJHZAYZXAg8U/wA1tw7CG0fQl991K+jtuBTKQ== + dependencies: + ember-cli-babel "^7.10.0" + ember-cli-addon-docs-yuidoc@^0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/ember-cli-addon-docs-yuidoc/-/ember-cli-addon-docs-yuidoc-0.2.4.tgz#dd8f5cf4982e8492b255fb677e9d771925e27dce" From 9a12ea51153eb27fbce5bbb148819603ecf26827 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 11 Jun 2020 14:41:57 -0400 Subject: [PATCH 2/7] =?UTF-8?q?test:=20=F0=9F=92=8D=20Add=20breadcrumbs=20?= =?UTF-8?q?ui/core=20component=20integration=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ember-breadcrumbs addon template is overwritten in ui/core. Added tests for template update. --- .../rose/components/nav/_breadcrumbs.scss | 1 + ui/core/app/controllers/.gitkeep | 0 .../tests/acceptance/host-catalogs-test.js | 21 ++++++++++- ui/core/tests/acceptance/projects-test.js | 7 +++- .../components/bread-crumbs-test.js | 37 +++++++++++++++++-- 5 files changed, 59 insertions(+), 7 deletions(-) delete mode 100644 ui/core/app/controllers/.gitkeep diff --git a/addons/rose/addon/styles/rose/components/nav/_breadcrumbs.scss b/addons/rose/addon/styles/rose/components/nav/_breadcrumbs.scss index c07156279..e7ac5572e 100644 --- a/addons/rose/addon/styles/rose/components/nav/_breadcrumbs.scss +++ b/addons/rose/addon/styles/rose/components/nav/_breadcrumbs.scss @@ -11,6 +11,7 @@ color: var(--color); text-decoration: none; cursor: pointer; + display: inline-flex; &:hover { --color: var(--action); diff --git a/ui/core/app/controllers/.gitkeep b/ui/core/app/controllers/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/ui/core/tests/acceptance/host-catalogs-test.js b/ui/core/tests/acceptance/host-catalogs-test.js index acdacafa7..e07e85046 100644 --- a/ui/core/tests/acceptance/host-catalogs-test.js +++ b/ui/core/tests/acceptance/host-catalogs-test.js @@ -1,5 +1,5 @@ import { module, test } from 'qunit'; -import { visit, currentURL, click, fillIn, find } from '@ember/test-helpers'; +import { visit, currentURL, click, fillIn, find, findAll } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; import a11yAudit from 'ember-a11y-testing/test-support/audit'; @@ -10,12 +10,29 @@ module('Acceptance | host catalogs', function(hooks) { setupMirage(hooks); test('visiting host catalogs', async function (assert) { - assert.expect(1); + assert.expect(5); this.server.createList('project', 1); this.server.createList('host-catalog', 1); await visit('/orgs/1/projects/1/host-catalogs'); await a11yAudit(); assert.equal(currentURL(), '/orgs/1/projects/1/host-catalogs'); + + assert.equal(findAll('.rose-layout-page-breadcrumbs a').length, 3); + assert.equal( + findAll('.rose-layout-page-breadcrumbs a')[0].textContent.trim(), + 'Projects', + 'Displays project breadcrumb' + ); + assert.equal( + findAll('.rose-layout-page-breadcrumbs a')[1].textContent.trim(), + this.server.db.projects[0].name, + 'Displays project name breadcrumb' + ); + assert.equal( + findAll('.rose-layout-page-breadcrumbs a')[2].textContent.trim(), + 'Host Catalogs', + 'Displays hostcatalog breadcrumb' + ); }); test('can navigate to host catalog form', async function(assert) { diff --git a/ui/core/tests/acceptance/projects-test.js b/ui/core/tests/acceptance/projects-test.js index 612da5ffb..832ce0529 100644 --- a/ui/core/tests/acceptance/projects-test.js +++ b/ui/core/tests/acceptance/projects-test.js @@ -10,11 +10,16 @@ module('Acceptance | projects', function (hooks) { setupMirage(hooks); test('visiting projects', async function (assert) { - assert.expect(1); + assert.expect(2); this.server.createList('project', 1); await visit('/orgs/1/projects'); await a11yAudit(); assert.equal(currentURL(), '/orgs/1/projects'); + assert.equal( + find('.rose-layout-page-breadcrumbs').textContent.trim(), + 'Projects', + 'Displays breadcrumbs' + ); }); test('saving a new project with invalid fields displays error messages', async function (assert) { diff --git a/ui/core/tests/integration/components/bread-crumbs-test.js b/ui/core/tests/integration/components/bread-crumbs-test.js index 47ba10bba..7ecb5ac86 100644 --- a/ui/core/tests/integration/components/bread-crumbs-test.js +++ b/ui/core/tests/integration/components/bread-crumbs-test.js @@ -1,13 +1,42 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; -//import { render } from '@ember/test-helpers'; -//import { hbs } from 'ember-cli-htmlbars'; +import { render, find, findAll } from '@ember/test-helpers'; +import { hbs } from 'ember-cli-htmlbars'; module('Integration | Component | bread-crumbs', function(hooks) { setupRenderingTest(hooks); - // TODO: need bread crumbs tests test('it renders', async function(assert) { - assert.ok(true); + this.set('breadCrumbs', [{label: 'Level 1'}]); + + await render(hbs``); + assert.equal(find('.rose-nav-breadcrumbs').textContent.trim(), 'Level 1'); + }); + + test('it renders with model', async function(assert) { + this.set('breadCrumbs', [{ + label: 'Level 2', + path: 'orgs.org.projects.project', + model: {project_id: 'project'}} + ]); + + await render(hbs``); + assert.equal(find('.rose-nav-breadcrumbs').textContent.trim(), 'Level 2'); + }); + + test('it renders multiple breadCrumbs', async function(assert) { + this.set('breadCrumbs', [{ + label: 'Level 1' + },{ + label: 'Level 2' + }, { + label: 'Level 3' + }]); + + await render(hbs``); + assert.equal(findAll('a').length, 3); + assert.equal(findAll('a')[0].textContent.trim(), 'Level 1'); + assert.equal(findAll('a')[1].textContent.trim(), 'Level 2'); + assert.equal(findAll('a')[2].textContent.trim(), 'Level 3'); }); }); From 376b00cca57455de47eadd983ff33eeeed35c9b9 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Fri, 12 Jun 2020 15:02:42 -0400 Subject: [PATCH 3/7] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Delete=20tests?= =?UTF-8?q?=20for=20breadcrumbs=20in=20core/pages=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove breadcrumb verification from core pages acceptance tests suite to be later added into it's own testfile --- .../tests/acceptance/host-catalogs-test.js | 21 ++----------------- ui/core/tests/acceptance/projects-test.js | 7 +------ 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/ui/core/tests/acceptance/host-catalogs-test.js b/ui/core/tests/acceptance/host-catalogs-test.js index e07e85046..acdacafa7 100644 --- a/ui/core/tests/acceptance/host-catalogs-test.js +++ b/ui/core/tests/acceptance/host-catalogs-test.js @@ -1,5 +1,5 @@ import { module, test } from 'qunit'; -import { visit, currentURL, click, fillIn, find, findAll } from '@ember/test-helpers'; +import { visit, currentURL, click, fillIn, find } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; import a11yAudit from 'ember-a11y-testing/test-support/audit'; @@ -10,29 +10,12 @@ module('Acceptance | host catalogs', function(hooks) { setupMirage(hooks); test('visiting host catalogs', async function (assert) { - assert.expect(5); + assert.expect(1); this.server.createList('project', 1); this.server.createList('host-catalog', 1); await visit('/orgs/1/projects/1/host-catalogs'); await a11yAudit(); assert.equal(currentURL(), '/orgs/1/projects/1/host-catalogs'); - - assert.equal(findAll('.rose-layout-page-breadcrumbs a').length, 3); - assert.equal( - findAll('.rose-layout-page-breadcrumbs a')[0].textContent.trim(), - 'Projects', - 'Displays project breadcrumb' - ); - assert.equal( - findAll('.rose-layout-page-breadcrumbs a')[1].textContent.trim(), - this.server.db.projects[0].name, - 'Displays project name breadcrumb' - ); - assert.equal( - findAll('.rose-layout-page-breadcrumbs a')[2].textContent.trim(), - 'Host Catalogs', - 'Displays hostcatalog breadcrumb' - ); }); test('can navigate to host catalog form', async function(assert) { diff --git a/ui/core/tests/acceptance/projects-test.js b/ui/core/tests/acceptance/projects-test.js index 832ce0529..612da5ffb 100644 --- a/ui/core/tests/acceptance/projects-test.js +++ b/ui/core/tests/acceptance/projects-test.js @@ -10,16 +10,11 @@ module('Acceptance | projects', function (hooks) { setupMirage(hooks); test('visiting projects', async function (assert) { - assert.expect(2); + assert.expect(1); this.server.createList('project', 1); await visit('/orgs/1/projects'); await a11yAudit(); assert.equal(currentURL(), '/orgs/1/projects'); - assert.equal( - find('.rose-layout-page-breadcrumbs').textContent.trim(), - 'Projects', - 'Displays breadcrumbs' - ); }); test('saving a new project with invalid fields displays error messages', async function (assert) { From 8f9f0179957727c0519e9c312dbd00dde2460ded Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Mon, 15 Jun 2020 14:34:37 -0400 Subject: [PATCH 4/7] =?UTF-8?q?test:=20=F0=9F=92=8D=20Add=20acceptance=20t?= =?UTF-8?q?est=20for=20breadcrumbs=20in=20ui/core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/tests/acceptance/bread-crumbs-test.js | 81 +++++++++++++++++++ .../components/bread-crumbs-test.js | 9 ++- 2 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 ui/core/tests/acceptance/bread-crumbs-test.js diff --git a/ui/core/tests/acceptance/bread-crumbs-test.js b/ui/core/tests/acceptance/bread-crumbs-test.js new file mode 100644 index 000000000..6e302588d --- /dev/null +++ b/ui/core/tests/acceptance/bread-crumbs-test.js @@ -0,0 +1,81 @@ +import { module, test } from 'qunit'; +import { visit, currentURL, click, findAll } from '@ember/test-helpers'; +import { setupApplicationTest } from 'ember-qunit'; +import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; + +module('Acceptance | breadcrumbs', function (hooks) { + setupApplicationTest(hooks); + setupMirage(hooks); + + test('visiting projects', async function (assert) { + assert.expect(2); + this.server.createList('project', 1); + await visit('/orgs/1/projects'); + assert.equal(findAll('.rose-nav-breadcrumbs a').length, 1); + await click('.rose-nav-breadcrumbs a'); + assert.equal(currentURL(), '/orgs/1/projects'); + }); + + test('visiting project', async function (assert) { + assert.expect(2); + this.server.createList('project', 1); + const projectURL = `/orgs/1/projects/${this.server.db.projects[0].id}`; + await visit(projectURL); + assert.equal(findAll('.rose-nav-breadcrumbs a').length, 2); + + await visit(projectURL); + await click(findAll('.rose-nav-breadcrumbs a')[1]); + assert.equal(currentURL(), projectURL); + }); + + test('visiting project creation', async function (assert) { + assert.expect(2); + this.server.createList('project', 1); + const projectURL = '/orgs/1/projects/new'; + await visit(projectURL); + assert.equal(findAll('.rose-nav-breadcrumbs a').length, 2); + + await visit(projectURL); + await click(findAll('.rose-nav-breadcrumbs a')[1]); + assert.equal(currentURL(), projectURL); + }); + + test('visiting host catalogs', async function (assert) { + assert.expect(2); + this.server.createList('project', 1); + this.server.createList('host-catalog', 1); + const hostcatalogsURL = `/orgs/1/projects/${this.server.db.projects[0].id}/host-catalogs`; + await visit(hostcatalogsURL); + assert.equal(findAll('.rose-nav-breadcrumbs a').length, 3); + + await visit(hostcatalogsURL); + await click(findAll('.rose-nav-breadcrumbs a')[2]); + assert.equal(currentURL(), hostcatalogsURL); + }); + + test('visiting host catalog', async function (assert) { + assert.expect(2); + this.server.createList('project', 1); + this.server.createList('host-catalog', 1); + const hostcatalogURL = `/orgs/1/projects/${this.server.db.projects[0].id}/host-catalogs/${this.server.db.hostCatalogs[0].id}`; + await visit(hostcatalogURL); + assert.equal(findAll('.rose-nav-breadcrumbs a').length, 4); + + await visit(hostcatalogURL); + await click(findAll('.rose-nav-breadcrumbs a')[3]); + assert.equal(currentURL(), hostcatalogURL); + }); + + test('visiting host catalog creation', async function (assert) { + assert.expect(2); + this.server.createList('project', 1); + this.server.createList('host-catalog', 1); + const hostcatalogURL = `/orgs/1/projects/${this.server.db.projects[0].id}/host-catalogs/new`; + await visit(hostcatalogURL); + assert.equal(findAll('.rose-nav-breadcrumbs a').length, 4); + + await visit(hostcatalogURL); + await click(findAll('.rose-nav-breadcrumbs a')[3]); + assert.equal(currentURL(), hostcatalogURL); + }); +}); diff --git a/ui/core/tests/integration/components/bread-crumbs-test.js b/ui/core/tests/integration/components/bread-crumbs-test.js index 7ecb5ac86..a6f3579c8 100644 --- a/ui/core/tests/integration/components/bread-crumbs-test.js +++ b/ui/core/tests/integration/components/bread-crumbs-test.js @@ -10,15 +10,20 @@ module('Integration | Component | bread-crumbs', function(hooks) { this.set('breadCrumbs', [{label: 'Level 1'}]); await render(hbs``); + // Default index route + assert.ok(find('.rose-nav-breadcrumbs a').href.match(/#$/)); assert.equal(find('.rose-nav-breadcrumbs').textContent.trim(), 'Level 1'); }); test('it renders with model', async function(assert) { + let store = this.owner.lookup('service:store'); + let project = store.createRecord('project', {id: '1234'}); + this.set('breadCrumbs', [{ label: 'Level 2', path: 'orgs.org.projects.project', - model: {project_id: 'project'}} - ]); + model: project + }]); await render(hbs``); assert.equal(find('.rose-nav-breadcrumbs').textContent.trim(), 'Level 2'); From f2f0144e5b7ccd07ad49841a272a41cb80aedc64 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 16 Jun 2020 09:40:03 -0400 Subject: [PATCH 5/7] =?UTF-8?q?test:=20=F0=9F=92=8D=20use=20breadcrumbs=20?= =?UTF-8?q?acceptance=20tests=20for=20navigation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/tests/acceptance/bread-crumbs-test.js | 98 ++++++++----------- 1 file changed, 41 insertions(+), 57 deletions(-) diff --git a/ui/core/tests/acceptance/bread-crumbs-test.js b/ui/core/tests/acceptance/bread-crumbs-test.js index 6e302588d..8515916d0 100644 --- a/ui/core/tests/acceptance/bread-crumbs-test.js +++ b/ui/core/tests/acceptance/bread-crumbs-test.js @@ -1,5 +1,5 @@ import { module, test } from 'qunit'; -import { visit, currentURL, click, findAll } from '@ember/test-helpers'; +import { visit, currentURL, click, find, findAll } from '@ember/test-helpers'; import { setupApplicationTest } from 'ember-qunit'; import setupMirage from 'ember-cli-mirage/test-support/setup-mirage'; @@ -7,75 +7,59 @@ module('Acceptance | breadcrumbs', function (hooks) { setupApplicationTest(hooks); setupMirage(hooks); - test('visiting projects', async function (assert) { + test('can navigate via breadcrumbs to projects from project', async function (assert) { assert.expect(2); - this.server.createList('project', 1); - await visit('/orgs/1/projects'); - assert.equal(findAll('.rose-nav-breadcrumbs a').length, 1); - await click('.rose-nav-breadcrumbs a'); - assert.equal(currentURL(), '/orgs/1/projects'); - }); - - test('visiting project', async function (assert) { - assert.expect(2); - this.server.createList('project', 1); - const projectURL = `/orgs/1/projects/${this.server.db.projects[0].id}`; + const project = this.server.create('project'); + const projectURL = `/orgs/1/projects/${project.id}`; await visit(projectURL); - assert.equal(findAll('.rose-nav-breadcrumbs a').length, 2); - - await visit(projectURL); - await click(findAll('.rose-nav-breadcrumbs a')[1]); - assert.equal(currentURL(), projectURL); + assert.equal(currentURL(), projectURL, 'We begin on th expected page.'); + await click(find('.rose-nav-breadcrumbs-link:first-child')); + assert.equal(currentURL(), '/orgs/1/projects', 'After navigating via breadcrumbs, we are one level up.'); }); - test('visiting project creation', async function (assert) { + test('can navigate via breadcrumbs to projects from new project', async function (assert) { assert.expect(2); - this.server.createList('project', 1); - const projectURL = '/orgs/1/projects/new'; - await visit(projectURL); - assert.equal(findAll('.rose-nav-breadcrumbs a').length, 2); - - await visit(projectURL); - await click(findAll('.rose-nav-breadcrumbs a')[1]); - assert.equal(currentURL(), projectURL); + const newProjectURL = `/orgs/1/projects/new`; + await visit(newProjectURL); + assert.equal(currentURL(), newProjectURL, 'We begin on th expected page.'); + await click(find('.rose-nav-breadcrumbs-link:first-child')); + assert.equal(currentURL(), '/orgs/1/projects', 'After navigating via breadcrumbs, we are one level up.'); }); - test('visiting host catalogs', async function (assert) { + test('can navigate via breadcrumbs to project from host catalogs', async function (assert) { assert.expect(2); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - const hostcatalogsURL = `/orgs/1/projects/${this.server.db.projects[0].id}/host-catalogs`; - await visit(hostcatalogsURL); - assert.equal(findAll('.rose-nav-breadcrumbs a').length, 3); - - await visit(hostcatalogsURL); - await click(findAll('.rose-nav-breadcrumbs a')[2]); - assert.equal(currentURL(), hostcatalogsURL); + const project = this.server.create('project'); + const projectURL = `/orgs/1/projects/${project.id}`; + const hostCatalogsURL = `${projectURL}/host-catalogs`; + await visit(hostCatalogsURL); + assert.equal(currentURL(), hostCatalogsURL, 'We begin on th expected page.'); + await click(findAll('.rose-nav-breadcrumbs-link')[1]); + assert.equal(currentURL(), projectURL, 'After navigating via breadcrumbs, we are one level up.'); }); - test('visiting host catalog', async function (assert) { + test('can navigate via breadcrumbs to host catalogs from host catalog', async function (assert) { assert.expect(2); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - const hostcatalogURL = `/orgs/1/projects/${this.server.db.projects[0].id}/host-catalogs/${this.server.db.hostCatalogs[0].id}`; - await visit(hostcatalogURL); - assert.equal(findAll('.rose-nav-breadcrumbs a').length, 4); - - await visit(hostcatalogURL); - await click(findAll('.rose-nav-breadcrumbs a')[3]); - assert.equal(currentURL(), hostcatalogURL); + const project = this.server.create('project'); + const hostCatalog = this.server.create('host-catalog'); + const projectURL = `/orgs/1/projects/${project.id}`; + const hostCatalogsURL = `${projectURL}/host-catalogs`; + const hostCatalogURL = `${hostCatalogsURL}/${hostCatalog.id}`; + await visit(hostCatalogURL); + assert.equal(currentURL(), hostCatalogURL, 'We begin on th expected page.'); + await click(findAll('.rose-nav-breadcrumbs-link')[2]); + assert.equal(currentURL(), hostCatalogsURL, 'After navigating via breadcrumbs, we are one level up.'); }); - test('visiting host catalog creation', async function (assert) { + test('can navigate via breadcrumbs to host catalogs from new host catalog', async function (assert) { assert.expect(2); - this.server.createList('project', 1); - this.server.createList('host-catalog', 1); - const hostcatalogURL = `/orgs/1/projects/${this.server.db.projects[0].id}/host-catalogs/new`; - await visit(hostcatalogURL); - assert.equal(findAll('.rose-nav-breadcrumbs a').length, 4); - - await visit(hostcatalogURL); - await click(findAll('.rose-nav-breadcrumbs a')[3]); - assert.equal(currentURL(), hostcatalogURL); + const project = this.server.create('project'); + const projectURL = `/orgs/1/projects/${project.id}`; + const hostCatalogsURL = `${projectURL}/host-catalogs`; + const newHostCatalogURL = `${hostCatalogsURL}/new`; + await visit(newHostCatalogURL); + assert.equal(currentURL(), newHostCatalogURL, 'We begin on th expected page.'); + await click(findAll('.rose-nav-breadcrumbs-link')[2]); + assert.equal(currentURL(), hostCatalogsURL, 'After navigating via breadcrumbs, we are one level up.'); }); + }); From e48af4bc9dd69c70af7d6933e02f262ffe656af1 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 16 Jun 2020 10:05:16 -0400 Subject: [PATCH 6/7] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20consolidate=20co?= =?UTF-8?q?mmon=20steps=20into=20before=20hook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/tests/acceptance/bread-crumbs-test.js | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/ui/core/tests/acceptance/bread-crumbs-test.js b/ui/core/tests/acceptance/bread-crumbs-test.js index 8515916d0..4cb61733e 100644 --- a/ui/core/tests/acceptance/bread-crumbs-test.js +++ b/ui/core/tests/acceptance/bread-crumbs-test.js @@ -7,10 +7,28 @@ module('Acceptance | breadcrumbs', function (hooks) { setupApplicationTest(hooks); setupMirage(hooks); + let project; + let hostCatalog; + let projectsURL; + let newProjectURL; + let projectURL; + let hostCatalogsURL; + let newHostCatalogURL; + let hostCatalogURL; + + hooks.beforeEach(function () { + project = this.server.create('project'); + hostCatalog = this.server.create('host-catalog'); + projectsURL = `/orgs/1/projects`; + newProjectURL = `${projectsURL}/new`; + projectURL = `${projectsURL}/${project.id}`; + hostCatalogsURL = `${projectURL}/host-catalogs`; + newHostCatalogURL = `${hostCatalogsURL}/new`; + hostCatalogURL = `${hostCatalogsURL}/${hostCatalog.id}`; + }); + test('can navigate via breadcrumbs to projects from project', async function (assert) { assert.expect(2); - const project = this.server.create('project'); - const projectURL = `/orgs/1/projects/${project.id}`; await visit(projectURL); assert.equal(currentURL(), projectURL, 'We begin on th expected page.'); await click(find('.rose-nav-breadcrumbs-link:first-child')); @@ -19,7 +37,6 @@ module('Acceptance | breadcrumbs', function (hooks) { test('can navigate via breadcrumbs to projects from new project', async function (assert) { assert.expect(2); - const newProjectURL = `/orgs/1/projects/new`; await visit(newProjectURL); assert.equal(currentURL(), newProjectURL, 'We begin on th expected page.'); await click(find('.rose-nav-breadcrumbs-link:first-child')); @@ -28,9 +45,6 @@ module('Acceptance | breadcrumbs', function (hooks) { test('can navigate via breadcrumbs to project from host catalogs', async function (assert) { assert.expect(2); - const project = this.server.create('project'); - const projectURL = `/orgs/1/projects/${project.id}`; - const hostCatalogsURL = `${projectURL}/host-catalogs`; await visit(hostCatalogsURL); assert.equal(currentURL(), hostCatalogsURL, 'We begin on th expected page.'); await click(findAll('.rose-nav-breadcrumbs-link')[1]); @@ -39,11 +53,6 @@ module('Acceptance | breadcrumbs', function (hooks) { test('can navigate via breadcrumbs to host catalogs from host catalog', async function (assert) { assert.expect(2); - const project = this.server.create('project'); - const hostCatalog = this.server.create('host-catalog'); - const projectURL = `/orgs/1/projects/${project.id}`; - const hostCatalogsURL = `${projectURL}/host-catalogs`; - const hostCatalogURL = `${hostCatalogsURL}/${hostCatalog.id}`; await visit(hostCatalogURL); assert.equal(currentURL(), hostCatalogURL, 'We begin on th expected page.'); await click(findAll('.rose-nav-breadcrumbs-link')[2]); @@ -52,10 +61,6 @@ module('Acceptance | breadcrumbs', function (hooks) { test('can navigate via breadcrumbs to host catalogs from new host catalog', async function (assert) { assert.expect(2); - const project = this.server.create('project'); - const projectURL = `/orgs/1/projects/${project.id}`; - const hostCatalogsURL = `${projectURL}/host-catalogs`; - const newHostCatalogURL = `${hostCatalogsURL}/new`; await visit(newHostCatalogURL); assert.equal(currentURL(), newHostCatalogURL, 'We begin on th expected page.'); await click(findAll('.rose-nav-breadcrumbs-link')[2]); From 8d66c178eb0eafaef556124240aa611d3e701685 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Tue, 16 Jun 2020 10:18:10 -0400 Subject: [PATCH 7/7] =?UTF-8?q?test:=20=F0=9F=92=8D=20add=20current=20crum?= =?UTF-8?q?b=20path=20checks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/tests/acceptance/bread-crumbs-test.js | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ui/core/tests/acceptance/bread-crumbs-test.js b/ui/core/tests/acceptance/bread-crumbs-test.js index 4cb61733e..acdd9e736 100644 --- a/ui/core/tests/acceptance/bread-crumbs-test.js +++ b/ui/core/tests/acceptance/bread-crumbs-test.js @@ -16,6 +16,8 @@ module('Acceptance | breadcrumbs', function (hooks) { let newHostCatalogURL; let hostCatalogURL; + let crumbPath; + hooks.beforeEach(function () { project = this.server.create('project'); hostCatalog = this.server.create('host-catalog'); @@ -28,41 +30,51 @@ module('Acceptance | breadcrumbs', function (hooks) { }); test('can navigate via breadcrumbs to projects from project', async function (assert) { - assert.expect(2); + assert.expect(3); await visit(projectURL); assert.equal(currentURL(), projectURL, 'We begin on th expected page.'); + crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname; + assert.equal(crumbPath, projectURL, 'Last crumb has expected URL.'); await click(find('.rose-nav-breadcrumbs-link:first-child')); assert.equal(currentURL(), '/orgs/1/projects', 'After navigating via breadcrumbs, we are one level up.'); }); test('can navigate via breadcrumbs to projects from new project', async function (assert) { - assert.expect(2); + assert.expect(3); await visit(newProjectURL); assert.equal(currentURL(), newProjectURL, 'We begin on th expected page.'); + crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname; + assert.equal(crumbPath, newProjectURL, 'Last crumb has expected URL.'); await click(find('.rose-nav-breadcrumbs-link:first-child')); assert.equal(currentURL(), '/orgs/1/projects', 'After navigating via breadcrumbs, we are one level up.'); }); test('can navigate via breadcrumbs to project from host catalogs', async function (assert) { - assert.expect(2); + assert.expect(3); await visit(hostCatalogsURL); assert.equal(currentURL(), hostCatalogsURL, 'We begin on th expected page.'); + crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname; + assert.equal(crumbPath, hostCatalogsURL, 'Last crumb has expected URL.'); await click(findAll('.rose-nav-breadcrumbs-link')[1]); assert.equal(currentURL(), projectURL, 'After navigating via breadcrumbs, we are one level up.'); }); test('can navigate via breadcrumbs to host catalogs from host catalog', async function (assert) { - assert.expect(2); + assert.expect(3); await visit(hostCatalogURL); assert.equal(currentURL(), hostCatalogURL, 'We begin on th expected page.'); + crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname; + assert.equal(crumbPath, hostCatalogURL, 'Last crumb has expected URL.'); await click(findAll('.rose-nav-breadcrumbs-link')[2]); assert.equal(currentURL(), hostCatalogsURL, 'After navigating via breadcrumbs, we are one level up.'); }); test('can navigate via breadcrumbs to host catalogs from new host catalog', async function (assert) { - assert.expect(2); + assert.expect(3); await visit(newHostCatalogURL); assert.equal(currentURL(), newHostCatalogURL, 'We begin on th expected page.'); + crumbPath = new URL(find('.rose-nav-breadcrumbs-link:last-child').href).pathname; + assert.equal(crumbPath, newHostCatalogURL, 'Last crumb has expected URL.'); await click(findAll('.rose-nav-breadcrumbs-link')[2]); assert.equal(currentURL(), hostCatalogsURL, 'After navigating via breadcrumbs, we are one level up.'); });