Fix e2e tests after apprise message updates

This commit is contained in:
Jack Kingsman
2026-04-22 18:12:01 -07:00
parent a8e346d0c5
commit cafd9678ee
+12 -10
View File
@@ -63,9 +63,10 @@ test.describe('Apprise integration settings', () => {
const preserveIdentity = page.getByText('Preserve identity on Discord'); const preserveIdentity = page.getByText('Preserve identity on Discord');
await expect(preserveIdentity).toBeVisible(); await expect(preserveIdentity).toBeVisible();
// Verify include routing path checkbox is checked by default // Verify format textareas are present under Message Format heading
const includePath = page.getByText('Include routing path in notifications'); await expect(page.getByText('Message Format')).toBeVisible();
await expect(includePath).toBeVisible(); await expect(page.locator('#fanout-apprise-fmt-dm')).toBeVisible();
await expect(page.locator('#fanout-apprise-fmt-chan')).toBeVisible();
// Rename it // Rename it
const nameInput = page.locator('#fanout-edit-name'); const nameInput = page.locator('#fanout-edit-name');
@@ -94,7 +95,8 @@ test.describe('Apprise integration settings', () => {
config: { config: {
urls: `${appriseUrl}\nslack://token_a/token_b/token_c`, urls: `${appriseUrl}\nslack://token_a/token_b/token_c`,
preserve_identity: false, preserve_identity: false,
include_path: false, body_format_dm: '{sender_name}: {text}',
body_format_channel: '{channel_name} | {sender_name}: {text}',
}, },
enabled: true, enabled: true,
}); });
@@ -113,18 +115,18 @@ test.describe('Apprise integration settings', () => {
await expect(urlsTextarea).toHaveValue(new RegExp(appriseUrl.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))); await expect(urlsTextarea).toHaveValue(new RegExp(appriseUrl.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
await expect(urlsTextarea).toHaveValue(/slack:\/\/token_a/); await expect(urlsTextarea).toHaveValue(/slack:\/\/token_a/);
// Verify checkboxes reflect our config (both unchecked) // Verify preserve identity checkbox reflects our config (unchecked)
const preserveCheckbox = page const preserveCheckbox = page
.getByText('Preserve identity on Discord') .getByText('Preserve identity on Discord')
.locator('xpath=ancestor::label[1]') .locator('xpath=ancestor::label[1]')
.locator('input[type="checkbox"]'); .locator('input[type="checkbox"]');
await expect(preserveCheckbox).not.toBeChecked(); await expect(preserveCheckbox).not.toBeChecked();
const pathCheckbox = page // Verify format textareas reflect our custom formats
.getByText('Include routing path in notifications') const dmFormat = page.locator('#fanout-apprise-fmt-dm');
.locator('xpath=ancestor::label[1]') await expect(dmFormat).toHaveValue('{sender_name}: {text}');
.locator('input[type="checkbox"]'); const chanFormat = page.locator('#fanout-apprise-fmt-chan');
await expect(pathCheckbox).not.toBeChecked(); await expect(chanFormat).toHaveValue('{channel_name} | {sender_name}: {text}');
// Go back // Go back
page.once('dialog', (dialog) => dialog.accept()); page.once('dialog', (dialog) => dialog.accept());