Skip to content

Commit

Permalink
Add toast to account creation
Browse files Browse the repository at this point in the history
  • Loading branch information
sanders41 committed Aug 12, 2023
1 parent b7745ef commit 7646e25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/lib/components/AccountInfoForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import type { UserCreate, UserUpdateMe } from '$lib/generated';
import type { AccessToken, UserLogin } from '$lib/types';
import { LoginError } from '$lib/errors';
import { isLoading, isLoggedIn, accessToken } from '$lib/stores/stores';
import { accessToken, isLoading, isLoggedIn, setToast } from '$lib/stores/stores';
import Input from '$lib/components/Input.svelte';
import Message from '$lib/components/Message.svelte';
Expand Down Expand Up @@ -195,6 +195,7 @@
return;
}
}
setToast('Account successfully created.');
goto('/account-settings');
} else {
genericError = true;
Expand Down
1 change: 1 addition & 0 deletions frontend/tests/signup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ test('end to end signup', async ({ page }) => {
await page.locator('#password').fill(password);
await page.locator('#verify-password').fill(password);
await page.locator('#btn-sign-up').click();
await expect(page.locator('#toast-message')).toBeVisible();
await expect(page.locator('#btn-sign-up')).not.toBeVisible();
await expect(page.locator('#btn-log-out')).toBeVisible();
await expect(page.locator('#btn-delete')).toBeVisible();
Expand Down

0 comments on commit 7646e25

Please sign in to comment.