Merge pull request #110 from hashicorp/feat-ICU-8145-component-sidebar

feat: 🎸 Add component sidebar in Admin UI
This commit is contained in:
Carlos Alcaide Corvo authored and GitHub committed 2023-03-09 11:30:06 -08:00
commit d2fd92affe
8 files changed
+121 -10

No files matched your search

@@ -0,0 +1,23 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'admin/tests/helpers';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
module('Integration | Component | layout/sidebar', function (hooks) {
setupRenderingTest(hooks);
test('it renders', async function (assert) {
await render(hbs`
<Layout::Sidebar as |sb|>
<sb.Body>Body content</sb.Body>
<sb.Sidebar>Sidebar content</sb.Sidebar>
</Layout::Sidebar>
`);
assert.dom('.layout-sidebar').isVisible();
assert.dom('.layout-sidebar-body').isVisible();
assert.dom('.layout-sidebar-body').hasText('Body content');
assert.dom('.layout-sidebar-sidebar').isVisible();
assert.dom('.layout-sidebar-sidebar').hasText('Sidebar content');
});
});
@@ -0,0 +1,18 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'admin/tests/helpers';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
module('Integration | Component | layout/sidebar/body', function (hooks) {
setupRenderingTest(hooks);
test('it renders', async function (assert) {
await render(hbs`
<Layout::Sidebar::Body>
template block text
</Layout::Sidebar::Body>
`);
assert.dom(this.element).hasText('template block text');
});
});
@@ -0,0 +1,18 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'admin/tests/helpers';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
module('Integration | Component | layout/sidebar/sidebar', function (hooks) {
setupRenderingTest(hooks);
test('it renders', async function (assert) {
await render(hbs`
<Layout::Sidebar::Sidebar>
template block text
</Layout::Sidebar::Sidebar>
`);
assert.dom(this.element).hasText('template block text');
});
});