diff --git a/site/gatsby-site/playwright/e2e-full/cite.spec.ts b/site/gatsby-site/playwright/e2e-full/cite.spec.ts index 64072815a3..239b5f4f51 100644 --- a/site/gatsby-site/playwright/e2e-full/cite.spec.ts +++ b/site/gatsby-site/playwright/e2e-full/cite.spec.ts @@ -449,6 +449,16 @@ test.describe('Cite pages', () => { expect(data.subscriptions).toEqual([{ type: 'incident', incident_id: { incident_id: 3 } }]); }); + test('Should not show a spinner on notify button when not logged in', async ({ page, login }) => { + + const id = 'r1'; + + await page.goto('/cite/1#' + id); + + await expect(page.locator('[data-cy="notify-button"] [data-cy="spinner"]')).toHaveCount(0); + + }); + test('Should show proper entities card text', async ({ page }) => { await page.goto('/cite/3/'); await expect(page.locator('[data-cy="alleged-entities"]')).toHaveText( @@ -561,4 +571,4 @@ test.describe('Cite pages', () => { await expect(page.getByText('Incident 4 description')).toBeVisible(); await expect(page.getByText('Alleged: Entity 2 developed an AI system deployed by Entity 1, which harmed Entity 3.')).toBeVisible() }); -}); \ No newline at end of file +}); diff --git a/site/gatsby-site/src/components/cite/NotifyButton.js b/site/gatsby-site/src/components/cite/NotifyButton.js index 478d4efb6a..14ab252149 100644 --- a/site/gatsby-site/src/components/cite/NotifyButton.js +++ b/site/gatsby-site/src/components/cite/NotifyButton.js @@ -5,14 +5,14 @@ import { Button, Spinner } from 'flowbite-react'; const { useTranslation, Trans } = require('react-i18next'); -function NotifyButton({ subscribing, onClick, subscribed }) { +function NotifyButton({ subscribing, onClick, subscribed, userLoggedIn }) { const { t } = useTranslation(); return ( -