diff --git a/tests/integration/components/contributions-timeline-test.gjs b/tests/integration/components/contributions-timeline-test.gjs
index 682025d..e639508 100644
--- a/tests/integration/components/contributions-timeline-test.gjs
+++ b/tests/integration/components/contributions-timeline-test.gjs
@@ -1,14 +1,23 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'marco/tests/helpers';
import { render, click } from '@ember/test-helpers';
+import Service from '@ember/service';
import ContributionsTimeline from 'marco/components/contributions-timeline';
+import { setupNostrMocks } from 'marco/tests/helpers/mock-nostr';
function noop() {}
+class MockToastService extends Service {
+ show() {}
+}
+
module('Integration | Component | contributions-timeline', function (hooks) {
setupRenderingTest(hooks);
+ setupNostrMocks(hooks);
hooks.beforeEach(function () {
+ this.owner.register('service:toast', MockToastService);
+
this.noop = noop;
this.emptyItems = [];
});
@@ -48,6 +57,28 @@ module('Integration | Component | contributions-timeline', function (hooks) {
assert.dom('.empty-state').includesText('Connect your Nostr account');
});
+ test('clicking "Connect your Nostr account" opens the Nostr connect modal', async function (assert) {
+ await render(
+
+
+
+
+ );
+
+ assert.dom('.nostr-connect-modal').doesNotExist();
+
+ await click('.empty-state a');
+
+ assert.dom('.nostr-connect-modal').exists();
+ });
+
test('it renders an empty state when connected but no contributions', async function (assert) {
await render(