@@ -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(
|
||||
|
||||
@@ -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>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user