Skip to content

Instantly share code, notes, and snippets.

@allthesignals
Created May 14, 2018 19:34
Show Gist options
  • Select an option

  • Save allthesignals/80039c13cf7b3101a1549ec46740ce84 to your computer and use it in GitHub Desktop.

Select an option

Save allthesignals/80039c13cf7b3101a1549ec46740ce84 to your computer and use it in GitHub Desktop.
import { module, test, skip } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, find, click } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | layer-menu-item', function(hooks) {
setupRenderingTest(hooks);
test('it opens and closes on click', async function(assert) {
await render(hbs`{{layer-menu-item title='Foo'}}`);
await click('.layer-menu-item-title');
const content = find('.layer-menu-item-content');
assert.equal(!!content, false);
await click('.layer-menu-item-title');
const content2 = find('.layer-menu-item-content');
assert.equal(!!content2, true);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment