-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(orga): remove component unit tests for Campaign::Activity::Dash…
…board
- Loading branch information
1 parent
fc7c0a2
commit 4759bce
Showing
3 changed files
with
46 additions
and
62 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
orga/tests/integration/components/campaign/activity/dashboard-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { render } from '@1024pix/ember-testing-library'; | ||
import { hbs } from 'ember-cli-htmlbars'; | ||
import { module, test } from 'qunit'; | ||
import sinon from 'sinon'; | ||
|
||
import setupIntlRenderingTest from '../../../../helpers/setup-intl-rendering'; | ||
|
||
module('Integration | Component | Campaign::Activity::Dashboard', (hooks) => { | ||
setupIntlRenderingTest(hooks); | ||
|
||
hooks.beforeEach(function () { | ||
const store = this.owner.lookup('service:store'); | ||
const adapterStub = { | ||
getParticipationsByStatus: sinon | ||
.stub() | ||
.withArgs('1') | ||
.resolves({ | ||
data: { | ||
attributes: { | ||
started: 1, | ||
completed: 2, | ||
shared: 3, | ||
}, | ||
}, | ||
}), | ||
getParticipationsByDay: sinon.stub().resolves({ | ||
data: { | ||
attributes: { | ||
'started-participations': [], | ||
'shared-participations': [], | ||
}, | ||
}, | ||
}), | ||
}; | ||
sinon.stub(store, 'adapterFor'); | ||
store.adapterFor.withArgs('campaign-stats').returns(adapterStub); | ||
}); | ||
|
||
test('it displays right data', async function (assert) { | ||
this.set('campaign', { id: '1' }); | ||
|
||
const screen = await render(hbs`<Campaign::Activity::Dashboard @campaign={{this.campaign}} />`); | ||
|
||
assert.ok(screen.getByText('6')); | ||
}); | ||
}); |
43 changes: 0 additions & 43 deletions
43
orga/tests/unit/components/campaign/activity/dashboard-test.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters