* refactor: 💡 move model hook to groups/index ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * feat: 🎸 add pagination to groups list view ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * feat: 🎸 add searching to groups ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * fix: 🐛 update scopeId to scope_id ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * test: 💍 clean up test refactor ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * refactor: 💡 update how groupsExisit is set ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * refactor: 💡 update mirage config for groups ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * test: 💍 fix failing groups create tests ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * refactor: 💡 add groups mirage config back ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * refactor: 💡 use translation string for Groups ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * refactor: 💡 update how groups are queried ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 * Update ui/admin/tests/acceptance/groups/list-test.js Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> * refactor: 💡 update groups translation to title_plural ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-12591 --------- Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
28 lines
906 B
JavaScript
28 lines
906 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupTest } from 'ember-qunit';
|
|
import { waitUntil } from '@ember/test-helpers';
|
|
|
|
module('Unit | Controller | scopes/scope/groups/index', function (hooks) {
|
|
setupTest(hooks);
|
|
|
|
test('it exists', function (assert) {
|
|
let controller = this.owner.lookup('controller:scopes/scope/groups/index');
|
|
assert.ok(controller);
|
|
});
|
|
|
|
test('handleSearchInput action sets expected values correctly', async function (assert) {
|
|
let controller = this.owner.lookup('controller:scopes/scope/targets/index');
|
|
const searchValue = 'group';
|
|
controller.handleSearchInput({ target: { value: searchValue } });
|
|
await waitUntil(() => controller.search === searchValue);
|
|
|
|
assert.strictEqual(controller.page, 1);
|
|
assert.strictEqual(controller.search, searchValue);
|
|
});
|
|
});
|