I have been trying to deploy the following code to synthetics using the Synthetics project setup.
I can deploy with node.js (npx) for a lightweight monitor and it works fine.
This code is just ignored. It is in the journeys directory, and permissions are good.
What am I missing for creating a journey?
import { journey, step, monitor, expect } from '@elastic/synthetics';
journey('Linadm PHP Journey', async ({ page, browser, context }) => {
monitor.use({
id: 'Example PHP Monitor',
schedule: 1,
});
step('Go to http://www.example.com/index.php', async () => {
await page.goto('http://www.example.com/index.php');
});
step('Click on username input', async () => {
await page.locator('input[name="username"]').click();
});
step('Fill in username', async () => {
await page.locator('input[name="username"]').fill('testuser');
});
step('Press Tab after username', async () => {
await page.locator('input[name="username"]').press('Tab');
});
step('Fill in password', async () => {
await page.locator('input[name="password"]').fill('testuser1');
});
step('Press Enter after password', async () => {
await page.locator('input[name="password"]').press('Enter');
});
step('Click Logout button', async () => {
await page.getByRole('button', { name: 'Logout' }).click();
});
});