Skip to content

Commit 361fdf6

Browse files
committed
fixup! refactor: 💡 Refactor select query generation
1 parent 6a6d53b commit 361fdf6

File tree

3 files changed

+9
-20
lines changed

3 files changed

+9
-20
lines changed

‎addons/core/tests/integration/components/dropdown/index-test.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ module('Integration | Component | dropdown/index', function (hooks) {
127127
assert.true(result);
128128
});
129129

130-
test('it only renders a max of 500 items but allows searching on all items', async function (assert) {
130+
test('it only renders a max of 250 items but allows searching on all items', async function (assert) {
131131
this.set('checkedItems', []);
132132
this.set(
133133
'itemOptions',
@@ -145,7 +145,7 @@ module('Integration | Component | dropdown/index', function (hooks) {
145145

146146
await click(TOGGLE_DROPDOWN_SELECTOR);
147147

148-
assert.dom(ITEM_SELECTOR).exists({ count: 500 });
148+
assert.dom(ITEM_SELECTOR).exists({ count: 250 });
149149

150150
// Random number between 500 and 599 to search
151151
await fillIn(SEARCH_INPUT_SELECTOR, '591');

‎ui/admin/tests/acceptance/session-recordings/list-test.js‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,14 @@ module('Acceptance | session-recordings | list', function (hooks) {
232232
assert.dom(commonSelectors.TABLE_ROWS).isVisible({ count: 2 });
233233

234234
await click(commonSelectors.FILTER_DROPDOWN('user'));
235+
await waitFor(commonSelectors.FILTER_DROPDOWN_ITEM(instances.user.id));
235236
await click(commonSelectors.FILTER_DROPDOWN_ITEM(instances.user.id));
236237
await click(commonSelectors.FILTER_DROPDOWN_ITEM_APPLY_BTN('user'));
237238

238239
assert.dom(commonSelectors.TABLE_ROWS).isVisible({ count: 1 });
239240
});
240241

241-
test('user can filter session recordings by scope', async function (assert) {
242+
test('user can filter session recordings by target', async function (assert) {
242243
setRunOptions({
243244
rules: {
244245
'color-contrast': {
@@ -255,13 +256,14 @@ module('Acceptance | session-recordings | list', function (hooks) {
255256
assert.dom(commonSelectors.TABLE_ROWS).isVisible({ count: 2 });
256257

257258
await click(commonSelectors.FILTER_DROPDOWN('target'));
259+
await waitFor(commonSelectors.FILTER_DROPDOWN_ITEM(instances.target.id));
258260
await click(commonSelectors.FILTER_DROPDOWN_ITEM(instances.target.id));
259261
await click(commonSelectors.FILTER_DROPDOWN_ITEM_APPLY_BTN('target'));
260262

261263
assert.dom(commonSelectors.TABLE_ROWS).isVisible({ count: 1 });
262264
});
263265

264-
test('user can filter session recordings by target', async function (assert) {
266+
test('user can filter session recordings by scope', async function (assert) {
265267
setRunOptions({
266268
rules: {
267269
'color-contrast': {
@@ -278,6 +280,9 @@ module('Acceptance | session-recordings | list', function (hooks) {
278280
assert.dom(commonSelectors.TABLE_ROWS).isVisible({ count: 2 });
279281

280282
await click(commonSelectors.FILTER_DROPDOWN('scope'));
283+
await waitFor(
284+
commonSelectors.FILTER_DROPDOWN_ITEM(instances.target.scope.id),
285+
);
281286
await click(
282287
commonSelectors.FILTER_DROPDOWN_ITEM(instances.target.scope.id),
283288
);

‎ui/admin/tests/unit/controllers/scopes/scope/session-recordings/index-test.js‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -138,21 +138,5 @@ module(
138138
assert.strictEqual(controller.page, 1);
139139
assert.deepEqual(controller.time, last24Hours.toISOString());
140140
});
141-
142-
test('refresh action calls refreshAll', async function (assert) {
143-
assert.expect(2);
144-
controller.set('target', {
145-
send(actionName, ...args) {
146-
assert.strictEqual(actionName, 'refreshAll');
147-
assert.deepEqual(
148-
args,
149-
[],
150-
'refreshAll was called with the correct arguments',
151-
);
152-
},
153-
});
154-
155-
await controller.refresh();
156-
});
157141
},
158142
);

0 commit comments

Comments
 (0)