Skip to content

Commit 1e6d6ee

Browse files
Add files via upload
1 parent ab2ba48 commit 1e6d6ee

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import { test, expect } from '@playwright/test';
2+
import type { Page } from '@playwright/test';
3+
4+
import { login, host } from '../shared';
5+
6+
test.describe.configure({ mode: 'serial' });
7+
8+
test.describe('Variable Template Structure', () => {
9+
let page: Page;
10+
11+
test.beforeAll(async ({ browser }) => {
12+
page = await browser.newPage();
13+
await login(page);
14+
15+
});
16+
17+
test.afterAll(async () => {
18+
await page.close();
19+
});
20+
21+
test.describe('Create new Variable Template', () => {
22+
test('create form', async () => {
23+
24+
// Click on setting icon
25+
await page.click('.fa.fa-cog');
26+
27+
// Clicking on Variable template
28+
await page.click('text=Manage Variable Templates');
29+
30+
// Clicking on create button
31+
await page.click('#create');
32+
33+
// Click on name field and type test data
34+
await page.click('#name');
35+
await page.click('#create');
36+
await page.type('#name', 'ummaima');
37+
38+
39+
// Click on description field and type test data
40+
await page.click('#description');
41+
await page.type('#description', 'Test');
42+
43+
await page.fill('#unit', 'kg');
44+
page.waitForTimeout(10000); // Wait for 10 seconds
45+
46+
// Wait for the dropdown options to be visible.
47+
// await page.waitForSelector('.svelte-select-list svelte-82qwg8');
48+
49+
// Click on the option with the text 'kg/kg'.
50+
await page.click('text=kg/kg');
51+
52+
});
53+
});
54+
});
55+
56+
57+
58+
59+

0 commit comments

Comments
 (0)