Update alert messages

Signed-off-by: Marcus Eide <eide@spotify.com>
This commit is contained in:
Marcus Eide
2021-04-21 10:00:15 +02:00
parent 4215634408
commit e05f09698c
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ describe('AddShortcut', () => {
}),
);
fireEvent.click(screen.getByText('Paste Current Url'));
fireEvent.click(screen.getByText('Use current page'));
fireEvent.click(screen.getByText('Save'));
await waitFor(() => {
expect(spy).toBeCalledWith({
@@ -102,7 +102,7 @@ describe('AddShortcut', () => {
),
);
fireEvent.click(screen.getByText('Paste Current Url'));
fireEvent.click(screen.getByText('Use current page'));
fireEvent.click(screen.getByText('Save'));
await waitFor(() => {
expect(
+2 -2
View File
@@ -60,7 +60,7 @@ export const AddShortcut = ({ onClose, anchorEl, api }: Props) => {
try {
await api.add(shortcut);
alertApi.post({
message: 'Successfully added shortcut',
message: `Added shortcut '${title}' to your sidebar`,
severity: 'success',
});
} catch (error) {
@@ -106,7 +106,7 @@ export const AddShortcut = ({ onClose, anchorEl, api }: Props) => {
color="primary"
onClick={handlePaste}
>
Paste Current Url
Use current page
</Button>
}
/>
+2 -2
View File
@@ -63,7 +63,7 @@ export const EditShortcut = ({ shortcut, onClose, anchorEl, api }: Props) => {
try {
await api.update(newShortcut);
alertApi.post({
message: 'Successfully updated shortcut',
message: `Updated shortcut '${title}'`,
severity: 'success',
});
} catch (error) {
@@ -80,7 +80,7 @@ export const EditShortcut = ({ shortcut, onClose, anchorEl, api }: Props) => {
try {
await api.remove(shortcut);
alertApi.post({
message: 'Successfully deleted shortcut',
message: `Removed shortcut '${shortcut.title}' from your sidebar`,
severity: 'success',
});
} catch (error) {