From 0522b0ca83c6bd1a7555507c16869598807af02b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86gir=20Giraldo=20=C3=9Eorsteinsson?= Date: Sat, 10 Nov 2018 12:42:28 +0000 Subject: [PATCH 1/2] Collapse deprecations by default, fixes #454 --- app/components/deprecation-item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/deprecation-item.js b/app/components/deprecation-item.js index ecd66a0be5..32742e22f7 100644 --- a/app/components/deprecation-item.js +++ b/app/components/deprecation-item.js @@ -2,7 +2,7 @@ import Component from '@ember/component'; import { notEmpty } from '@ember/object/computed'; export default Component.extend({ - isExpanded: true, + isExpanded: false, tagName: '', From 12ec34874281fd5924710e1bd0cfc795a4bb4e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86gir=20Giraldo=20=C3=9Eorsteinsson?= Date: Sat, 1 Dec 2018 20:40:54 +0000 Subject: [PATCH 2/2] Expand deprecations in test --- tests/acceptance/deprecation-test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/acceptance/deprecation-test.js b/tests/acceptance/deprecation-test.js index f57487bbb4..7c11f23c48 100644 --- a/tests/acceptance/deprecation-test.js +++ b/tests/acceptance/deprecation-test.js @@ -71,6 +71,8 @@ module('Deprecation Tab', function(hooks) { await visit('/deprecations'); + await click('.js-deprecation-item'); + assert.dom('.js-deprecation-source').doesNotExist('no sources'); assert.dom(findAll('.js-deprecation-message')[0]).hasText('Deprecation 1', 'message shown'); assert.dom(findAll('.js-deprecation-count')[0]).hasText('2', 'Count correct'); @@ -96,6 +98,8 @@ module('Deprecation Tab', function(hooks) { await visit('/deprecations'); + await click('.js-deprecation-item'); + assert.dom('.js-deprecation-message').hasText('Deprecation 1', 'message shown'); assert.dom('.js-deprecation-count').hasText('2', 'Count correct'); assert.dom('.js-deprecation-full-trace').doesNotExist('Full trace button not shown'); @@ -142,6 +146,8 @@ module('Deprecation Tab', function(hooks) { await visit('/deprecations'); + await click('.js-deprecation-item'); + assert.dom('.js-deprecation-message').hasText('Deprecation 1', 'message shown'); assert.dom('.js-deprecation-count').hasText('2', 'Count correct'); assert.dom('.js-deprecation-full-trace').doesNotExist('Full trace button not shown'); @@ -189,6 +195,8 @@ module('Deprecation Tab', function(hooks) { await visit('/deprecations'); + await click('.js-deprecation-item'); + let sources = findAll('.js-deprecation-source'); assert.equal(sources.length, 2, 'shows all sources'); @@ -197,6 +205,7 @@ module('Deprecation Tab', function(hooks) { assert.equal(sources.length, 0, 'sources filtered'); await click('.js-search-field-clear-button'); + await click('.js-deprecation-item'); sources = findAll('.js-deprecation-source'); assert.equal(sources.length, 2, 'show all sources'); });