Skip to content

Commit aa6987a

Browse files
Introduction tutorial
1 parent c0522de commit aa6987a

3 files changed

Lines changed: 86 additions & 51 deletions

File tree

playwright.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ export default defineConfig({
3030

3131
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
3232
trace: 'on-first-retry',
33+
34+
/* Record video for all tests (backup recording) */
35+
video: 'on',
36+
37+
/* Video settings optimized for YouTube - Full HD resolution */
38+
viewport: { width: 1920, height: 1080 },
3339
},
3440

3541
/* Configure projects for major browsers */

tests/TalentManagement.spec.ts

Lines changed: 80 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,84 +7,144 @@ const execAsync = promisify(exec);
77
// Helper function to speak text (blocking - waits for speech to complete)
88
async function speak(text: string) {
99
try {
10-
// Use PowerShell's speech synthesis on Windows
11-
await execAsync(`powershell -Command "Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('${text}')"`);
10+
// Use PowerShell's speech synthesis on Windows with maximum volume
11+
await execAsync(`powershell -Command "Add-Type -AssemblyName System.Speech; $synth = New-Object System.Speech.Synthesis.SpeechSynthesizer; $synth.Volume = 100; $synth.Speak('${text}')"`);
1212
} catch (error) {
1313
console.log(`Voice: ${text}`); // Fallback to console if speech fails
1414
}
1515
}
1616

1717
test('test', async ({ page }) => {
1818
// Increase timeout to allow for voice narration
19-
test.setTimeout(120000); // 2 minutes
19+
test.setTimeout(300000); // 5 minutes
20+
21+
// CRITICAL: Wait for recording software to fully start capturing
22+
await page.waitForTimeout(2000); // Initial delay
23+
24+
// Prime the audio system with a test sound
25+
await speak('Hello'); // This primes the audio capture
26+
await page.waitForTimeout(2000); // Wait after test sound
27+
28+
// Open GitHub repository page after introduction
29+
await page.goto('https://github.com/workcontrolgit/AngularNetTutorial');
30+
await page.waitForTimeout(2000); // Show GitHub main page briefly
31+
32+
33+
// INTRODUCTION - Now the real introduction begins
34+
await speak('Welcome to the Angular .NET Tutorial demonstration');
35+
await speak('This project is available on GitHub at github.com/workcontrolgit/AngularNetTutorial');
36+
await speak('Building Modern Web Applications with Angular, .NET, and OAuth 2.0');
37+
await speak('This is a complete tutorial series showing how to build secure, scalable enterprise applications');
38+
await speak('The stack includes Angular 20, .NET 10, and Duende IdentityServer');
39+
await speak('Learn the CAT Pattern: Client, API Resource, and Token Service architecture');
40+
await speak('This is a free tutorial with complete source code available on GitHub');
41+
await speak('For full stack developers looking to master modern web development');
42+
await speak('Now let us begin a quick walkthrough of the application user interface');
43+
44+
45+
// Navigate to the tutorial page with slow scrolling
46+
await page.goto('https://github.com/workcontrolgit/AngularNetTutorial/blob/master/docs/TUTORIAL.md');
47+
await page.waitForTimeout(1500);
48+
49+
// Scroll through tutorial page slowly
50+
await page.evaluate(() => window.scrollBy(0, 200));
51+
await page.waitForTimeout(1000);
52+
await page.evaluate(() => window.scrollBy(0, 200));
53+
await page.waitForTimeout(1000);
54+
await page.evaluate(() => window.scrollBy(0, 200));
55+
await page.waitForTimeout(1000);
56+
2057
await speak('Navigating to dashboard');
2158
await page.goto('http://localhost:4200/dashboard');
59+
await speak('Dashboard loaded. Main navigation menu visible with Employees, Departments, Positions, and Salary Ranges options');
2260

2361
await speak('Opening Employees menu');
2462
await page.getByRole('button', { name: 'Employees' }).click();
2563
await page.waitForTimeout(500); // Wait for menu to expand
26-
await speak('Viewing Employees List');
64+
await speak('Employee submenu expanded. Showing List and Create options');
65+
await speak('Clicking on List to view all employees');
2766
await page.getByRole('link', { name: 'L List' }).click();
67+
await speak('Employee list page displayed. Showing table with all employee records');
2868

2969
await speak('Opening Departments menu');
3070
await page.getByRole('button', { name: 'Departments' }).click();
3171
await page.waitForTimeout(500); // Wait for menu to expand
32-
await speak('Viewing Departments List');
72+
await speak('Departments submenu expanded. Showing List and Create options');
73+
await speak('Clicking on List to view all departments');
3374
await page.getByRole('link', { name: 'L List' }).click();
75+
await speak('Departments list page displayed. Showing all department records in a table');
3476

3577
await speak('Opening Positions menu');
3678
await page.getByRole('button', { name: 'Positions' }).click();
3779
await page.waitForTimeout(500); // Wait for menu to expand
38-
await speak('Viewing Positions List');
80+
await speak('Positions submenu expanded. Showing List and Create options');
81+
await speak('Clicking on List to view all positions');
3982
await page.getByRole('link', { name: 'L List' }).click();
83+
await speak('Positions list page displayed. Showing all available positions');
4084

4185
await speak('Opening Salary Ranges menu');
4286
await page.getByRole('button', { name: 'Salary Ranges' }).click();
4387
await page.waitForTimeout(500); // Wait for menu to expand
44-
await speak('Viewing Salary Ranges List');
88+
await speak('Salary Ranges submenu expanded. Showing List and Create options');
89+
await speak('Clicking on List to view all salary ranges');
4590
await page.getByRole('link', { name: 'L List' }).click();
91+
await speak('Salary ranges list page displayed. Showing all configured salary ranges');
4692

4793
await speak('Opening account menu');
4894
await page.getByRole('button').filter({ hasText: 'account_circle' }).click();
95+
await speak('Account menu opened. Showing login option');
4996
await speak('Clicking Login');
5097
await page.getByRole('menuitem', { name: 'Login' }).click();
51-
await speak('Entering username');
98+
await speak('Login page displayed. Form with username and password fields visible');
99+
await speak('Entering username ashtyn1');
52100
await page.getByRole('textbox', { name: 'Username' }).click();
53101
await page.getByRole('textbox', { name: 'Username' }).fill('ashtyn1');
54102
await speak('Entering password');
55103
await page.getByRole('textbox', { name: 'Password' }).click();
56104
await page.getByRole('textbox', { name: 'Password' }).fill('Pa$$word123');
57-
await speak('Logging in');
105+
await speak('Submitting login credentials');
58106
await page.getByRole('button', { name: 'Login' }).click();
107+
await speak('Login successful. Now authenticated with create permissions');
59108

60-
await speak('Opening Employees menu to create');
109+
await speak('Opening Employees menu to create a new employee');
61110
await page.getByRole('button', { name: 'Employees' }).click();
62111
await page.waitForTimeout(500); // Wait for menu to expand
63-
await speak('Creating new Employee');
112+
await speak('Employee submenu opened. Create option now available');
113+
await speak('Clicking Create to add a new employee');
64114
await page.getByRole('link', { name: 'C Create' }).click();
115+
await speak('Employee creation form displayed. Ready to enter new employee details');
65116

66-
await speak('Opening Departments menu to create');
117+
await speak('Opening Departments menu to create a new department');
67118
await page.getByRole('button', { name: 'Departments' }).click();
68119
await page.waitForTimeout(500); // Wait for menu to expand
69-
await speak('Creating new Department');
120+
await speak('Departments submenu opened. Create option visible');
121+
await speak('Clicking Create to add a new department');
70122
await page.getByRole('link', { name: 'C Create' }).click();
123+
await speak('Department creation form displayed. Ready to enter new department information');
71124

72-
await speak('Opening Positions menu to create');
125+
await speak('Opening Positions menu to create a new position');
73126
await page.getByRole('button', { name: 'Positions' }).click();
74127
await page.waitForTimeout(500); // Wait for menu to expand
75-
await speak('Creating new Position');
128+
await speak('Positions submenu opened. Create option available');
129+
await speak('Clicking Create to add a new position');
76130
await page.getByRole('link', { name: 'C Create' }).click();
131+
await speak('Position creation form displayed. Ready to define new position');
77132

78-
await speak('Opening Salary Ranges menu to create');
133+
await speak('Opening Salary Ranges menu to create a new range');
79134
await page.getByRole('button', { name: 'Salary Ranges' }).click();
80135
await page.waitForTimeout(500); // Wait for menu to expand
81-
await speak('Creating new Salary Range');
136+
await speak('Salary Ranges submenu opened. Create option visible');
137+
await speak('Clicking Create to add a new salary range');
82138
await page.getByRole('link', { name: 'C Create' }).click();
139+
await speak('Salary range creation form displayed. Ready to configure new salary range');
83140

84-
await speak('Opening account menu');
141+
await speak('Opening account menu to logout');
85142
await page.getByRole('button').filter({ hasText: 'account_circle' }).click();
86-
await speak('Logging out');
143+
await speak('Account menu opened. Logout option visible');
144+
await speak('Clicking logout to end session');
87145
await page.getByRole('menuitem', { name: 'logout' }).click();
88-
await speak('Test complete');
146+
await speak('Logged out successfully. Returned to public view');
147+
await speak('Clicking here link to return to home');
89148
await page.getByRole('link', { name: 'here' }).click();
149+
await speak('Walk Thru complete. All navigation and authentication flows verified successfully');
90150
});

tests/test-1.spec.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)