2017-08-02 10:05:59 +03:00
|
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
|
|
import {describe, it} from 'mocha';
|
|
|
|
import {expect} from 'chai';
|
2019-01-02 12:58:55 +03:00
|
|
|
import {render} from '@ember/test-helpers';
|
|
|
|
import {setupRenderingTest} from 'ember-mocha';
|
2017-08-02 10:05:59 +03:00
|
|
|
|
2018-01-05 18:38:23 +03:00
|
|
|
describe('Integration: Component: gh-unsplash', function () {
|
2019-01-02 12:58:55 +03:00
|
|
|
setupRenderingTest();
|
2017-08-02 10:05:59 +03:00
|
|
|
|
2019-01-02 12:58:55 +03:00
|
|
|
it('renders', async function () {
|
2017-08-02 10:05:59 +03:00
|
|
|
// Set any properties with this.set('myProperty', 'value');
|
|
|
|
// Handle any actions with this.on('myAction', function(val) { ... });
|
|
|
|
// Template block usage:
|
2019-01-02 12:58:55 +03:00
|
|
|
// await render(hbs`
|
2017-08-02 10:05:59 +03:00
|
|
|
// {{#gh-unsplash}}
|
|
|
|
// template content
|
|
|
|
// {{/gh-unsplash}}
|
|
|
|
// `);
|
|
|
|
|
2019-01-02 12:58:55 +03:00
|
|
|
await render(hbs`{{gh-unsplash}}`);
|
2019-05-13 17:18:41 +03:00
|
|
|
expect(this.element).to.exist;
|
2017-08-02 10:05:59 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
it('loads new photos by default');
|
|
|
|
it('has responsive columns');
|
|
|
|
it('can zoom');
|
|
|
|
it('can close zoom by clicking on image');
|
|
|
|
it('can close zoom by clicking outside image');
|
|
|
|
it('triggers insert action');
|
|
|
|
it('handles errors');
|
|
|
|
|
|
|
|
describe('searching', function () {
|
|
|
|
it('works');
|
|
|
|
it('handles no results');
|
|
|
|
it('handles error');
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('closing', function () {
|
|
|
|
it('triggers close action');
|
|
|
|
it('can be triggerd by escape key');
|
|
|
|
it('cannot be triggered by escape key when zoomed');
|
|
|
|
});
|
|
|
|
});
|