mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
fix: close direct link dialog when you click on save (#1412)
This commit is contained in:
@ -434,12 +434,14 @@ export const TemplateDirectLinkDialog = ({
|
|||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
loading={isTogglingTemplateAccess}
|
loading={isTogglingTemplateAccess}
|
||||||
onClick={async () =>
|
onClick={async () => {
|
||||||
toggleTemplateDirectLink({
|
await toggleTemplateDirectLink({
|
||||||
templateId: template.id,
|
templateId: template.id,
|
||||||
enabled: isEnabled,
|
enabled: isEnabled,
|
||||||
})
|
}).catch((e) => null);
|
||||||
}
|
|
||||||
|
onOpenChange(false);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Trans>Save</Trans>
|
<Trans>Save</Trans>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -112,7 +112,6 @@ test('[DIRECT_TEMPLATES]: toggle direct template link', async ({ page }) => {
|
|||||||
await page.getByRole('switch').click();
|
await page.getByRole('switch').click();
|
||||||
await page.getByRole('button', { name: 'Save' }).click();
|
await page.getByRole('button', { name: 'Save' }).click();
|
||||||
await expect(page.getByText('Direct link signing has been').first()).toBeVisible();
|
await expect(page.getByText('Direct link signing has been').first()).toBeVisible();
|
||||||
await page.getByLabel('Direct Link Signing', { exact: true }).press('Escape');
|
|
||||||
|
|
||||||
// Check that the direct template link is no longer accessible.
|
// Check that the direct template link is no longer accessible.
|
||||||
await page.goto(formatDirectTemplatePath(template.directLink?.token || ''));
|
await page.goto(formatDirectTemplatePath(template.directLink?.token || ''));
|
||||||
|
|||||||
Reference in New Issue
Block a user