Capturing more event clicks for scaffolder

Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
This commit is contained in:
bnechyporenko
2024-04-30 09:07:46 +02:00
parent eea850a3a3
commit 2444a50579
@@ -129,30 +129,19 @@ describe('TemplateWizardPage', () => {
fireEvent.click(await findByRole('button', { name: 'Create' }));
});
// The "Next Step" button should have fired few events
// The "Next Step" button should have fired an event
expect(analyticsMock.getEvents()[0]).toMatchObject({
action: 'click',
subject: 'Next Step (1)',
context: { entityRef: 'template:default/test' },
});
// And the "Create" button should have fired an event
expect(analyticsMock.getEvents()[1]).toMatchObject({
action: 'click',
subject: 'Next Step (1)',
context: { entityRef: 'template:default/test' },
});
// And the "Create" button should have fired few event
expect(analyticsMock.getEvents()[2]).toMatchObject({
action: 'create',
subject: 'expected-name',
context: { entityRef: 'template:default/test' },
});
expect(analyticsMock.getEvents()[3]).toMatchObject({
action: 'click',
subject: 'Create',
context: { entityRef: 'template:default/test' },
value: 120,
});
});
describe('scaffolder page context menu', () => {