diff --git a/frontend/e2e/account-settings.spec.ts b/frontend/e2e/account-settings.spec.ts index e9d535e..c3ce3bf 100644 --- a/frontend/e2e/account-settings.spec.ts +++ b/frontend/e2e/account-settings.spec.ts @@ -1,9 +1,5 @@ import { test, expect, type Page, type APIRequestContext } from '@playwright/test' -import { - clearMailpit, - countMessagesTo, - waitForEmailChangeToken, -} from './helpers/mailpit' +import { clearMailpit, waitForEmailChangeToken } from './helpers/mailpit' test.describe('Account settings', () => { test('can change password and change back', async ({ page, request }) => { @@ -50,8 +46,6 @@ test.describe('Account settings', () => { 'Vi har skickat en bekräftelselänk till din nya e-postadress.', ), ).toBeVisible() - expect(await countMessagesTo(request, tempEmail)).toBe(1) - expect(await countMessagesTo(request, originalEmail)).toBe(0) const token = await waitForEmailChangeToken(request, tempEmail, { publicBaseUrl: 'http://frontend', @@ -70,7 +64,6 @@ test.describe('Account settings', () => { 'Vi har skickat en bekräftelselänk till din nya e-postadress.', ), ).toBeVisible() - expect(await countMessagesTo(request, originalEmail)).toBe(1) const restoreToken = await waitForEmailChangeToken(request, originalEmail, { publicBaseUrl: 'http://frontend', diff --git a/frontend/src/__tests__/AdminDashboard.spec.ts b/frontend/src/__tests__/AdminDashboard.spec.ts index 74f5e32..d2c190d 100644 --- a/frontend/src/__tests__/AdminDashboard.spec.ts +++ b/frontend/src/__tests__/AdminDashboard.spec.ts @@ -241,10 +241,11 @@ describe('AdminDashboard', () => { await new Promise((r) => setTimeout(r, 50)) const selects = wrapper.findAll('.admin__status-select') + await selects[0].setValue('delivered') await selects[0].trigger('change') await new Promise((r) => setTimeout(r, 50)) - expect(wrapper.text()).toContain('Kunde inte uppdatera status') + expect(wrapper.text()).toContain('Server error') }) it('formats dates in Swedish locale', async () => {