Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapse deprecations by default #885

Merged
merged 4 commits into from
Dec 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/deprecation-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Component from '@ember/component';
import { notEmpty } from '@ember/object/computed';

export default Component.extend({
isExpanded: true,
isExpanded: false,

tagName: '',

Expand Down
9 changes: 9 additions & 0 deletions tests/acceptance/deprecation-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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');

Expand All @@ -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');
});
Expand Down