Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(designer): Adding Switching Initialize Variable e2e test #4692

Merged
merged 4 commits into from Apr 24, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 45 additions & 0 deletions e2e/designer/ensureInitializeVariable.spec.ts
@@ -0,0 +1,45 @@
import { test, expect } from '@playwright/test';

test(
'Should be able to switch between Initialize Variable types',
{
tag: '@mock',
},
async ({ page }) => {
await page.goto('/');
await page.getByText('Select an option').click();
await page.getByRole('option', { name: 'Recurrence' }).click();
await page.getByRole('button', { name: 'Toolbox' }).click();
await page.getByLabel('Insert a new step after').click();
await page.getByText('Add an action').click();
await page.getByPlaceholder('Search').click();
await page.getByPlaceholder('Search').fill('initialize variable');
await page.getByLabel('Initialize variable').click();
await page.getByRole('paragraph').click();
await page.getByLabel('Name').fill('test');
await page.getByPlaceholder('Enter initial value').click();
await page.getByRole('option', { name: 'true' }).click();
await page.getByText('Boolean').click();
await page.getByRole('option', { name: 'Integer' }).click();
await page.getByLabel('Value').getByRole('paragraph').click();
await page.getByLabel('Value').fill('test');
await page
.locator('#msla-node-details-panel-Initialize_variable div')
.filter({ hasText: 'NametestAdd dynamic data or' })
.first()
.click();
await expect(page.getByRole('alert')).toContainText('Enter a valid integer.');
await page.getByLabel('Value').getByRole('paragraph').click();
await page.getByLabel('Value').fill('12');
await page
.locator('#msla-node-details-panel-Initialize_variable div')
.filter({ hasText: 'NametestAdd dynamic data or' })
.first()
.click();
await page.getByRole('button', { name: 'Code View' }).click();
await expect(page.getByRole('code')).toContainText('12');
await page.getByRole('option', { name: 'Boolean' }).click();
await page.getByPlaceholder('Enter initial value').click();
await page.getByRole('option', { name: 'true' }).click();
}
);