mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-09 18:15:50 +00:00
style(web): format webhook parity regression
Preserve both accepted candidate changes while satisfying the repository's Prettier check on the newly added regression. Change-source: pulse-maintainer
This commit is contained in:
@@ -1590,17 +1590,29 @@ describe('webhook test/save parity', () => {
|
||||
const onTest = vi.fn();
|
||||
const onAdd = vi.fn();
|
||||
const state = useWebhookConfigState({
|
||||
webhooks: [], onTest, onAdd, onUpdate: vi.fn(), onDelete: vi.fn(),
|
||||
webhooks: [],
|
||||
onTest,
|
||||
onAdd,
|
||||
onUpdate: vi.fn(),
|
||||
onDelete: vi.fn(),
|
||||
});
|
||||
state.openAddForm();
|
||||
state.setFormData((data) => ({ ...data, name: 'Example', url: 'https://example.invalid', service: 'pushover' }));
|
||||
state.setFormData((data) => ({
|
||||
...data,
|
||||
name: 'Example',
|
||||
url: 'https://example.invalid',
|
||||
service: 'pushover',
|
||||
}));
|
||||
for (const [index, key] of ['app_token', 'user_token'].entries()) {
|
||||
state.addCustomFieldInput();
|
||||
state.updateCustomFieldInput(index, { key, value: `synthetic-${index}` });
|
||||
}
|
||||
state.testWebhookForm();
|
||||
state.saveWebhook();
|
||||
expect(onAdd.mock.calls[0][0].customFields).toEqual({ token: 'synthetic-0', user: 'synthetic-1' });
|
||||
expect(onAdd.mock.calls[0][0].customFields).toEqual({
|
||||
token: 'synthetic-0',
|
||||
user: 'synthetic-1',
|
||||
});
|
||||
expect(onTest.mock.calls[0][1].customFields).toEqual(onAdd.mock.calls[0][0].customFields);
|
||||
} finally {
|
||||
dispose();
|
||||
|
||||
Reference in New Issue
Block a user