zone updation
This commit is contained in:
@@ -28,99 +28,91 @@ async function takeScreenshotsAtViewports(page, folderName, screenshotPrefix) {
|
||||
}
|
||||
}
|
||||
|
||||
// test('Login Page Screenshots', async ({ page }) => {
|
||||
// test.setTimeout(60000); // Increase timeout to 60 seconds
|
||||
// const url = 'http://185.100.212.76:8200';
|
||||
// const folderName = 'login-screenshots';
|
||||
test('Login Page Screenshots', async ({ page }) => {
|
||||
test.setTimeout(60000); // Increase timeout to 60 seconds
|
||||
const url = 'http://185.100.212.76:8200';
|
||||
const folderName = 'login-screenshots';
|
||||
|
||||
// try {
|
||||
// console.log('Navigating to the login page...');
|
||||
// await page.goto(url, { waitUntil: 'networkidle' });
|
||||
// await page.waitForSelector('[placeholder="Email"]', { timeout: 10000 });
|
||||
// await takeScreenshotsAtViewports(page, `${folderName}/login-page-loaded`, 'login-page-loaded');
|
||||
try {
|
||||
console.log('Navigating to the login page...');
|
||||
await page.goto(url, { waitUntil: 'networkidle' });
|
||||
await page.waitForSelector('[placeholder="Email"]', { timeout: 10000 });
|
||||
await takeScreenshotsAtViewports(page, `${folderName}/login-page-loaded`, 'login-page-loaded');
|
||||
|
||||
// console.log('Filling Email and Password fields...');
|
||||
// await page.getByPlaceholder('Email').click();
|
||||
// await page.getByPlaceholder('Email').fill('nalvazhuthi@hexrfactory.com');
|
||||
// await page.getByPlaceholder('Password').click();
|
||||
// await page.getByPlaceholder('Password').fill('123456');
|
||||
// await takeScreenshotsAtViewports(page, `${folderName}/fields-filled`, 'fields-filled');
|
||||
console.log('Filling Email and Password fields...');
|
||||
await page.getByPlaceholder('Email').click();
|
||||
await page.getByPlaceholder('Email').fill('ramkumar@tester.local');
|
||||
await page.getByPlaceholder('Password').click();
|
||||
await page.getByPlaceholder('Password').fill('123456');
|
||||
await takeScreenshotsAtViewports(page, `${folderName}/fields-filled`, 'fields-filled');
|
||||
|
||||
// console.log('Clicking the Continue button...');
|
||||
// await page.waitForSelector('button:has-text("Continue")', { timeout: 10000 });
|
||||
// await page.getByRole('button', { name: 'Continue', exact: true }).click();
|
||||
// await page.waitForLoadState('networkidle'); // Wait for navigation or animations to complete
|
||||
// await takeScreenshotsAtViewports(page, `${folderName}/after-login`, 'after-login');
|
||||
// } catch (error) {
|
||||
// console.error('An error occurred during the test:', error.message);
|
||||
// throw error; // Re-throw the error to fail the test
|
||||
// }
|
||||
// });
|
||||
console.log('Clicking the Continue button...');
|
||||
await page.waitForSelector('button:has-text("Continue")', { timeout: 10000 });
|
||||
await page.getByRole('button', { name: 'Continue', exact: true }).click();
|
||||
await page.waitForLoadState('networkidle'); // Wait for navigation or animations to complete
|
||||
await takeScreenshotsAtViewports(page, `${folderName}/after-login`, 'after-login');
|
||||
} catch (error) {
|
||||
console.error('An error occurred during the test:', error.message);
|
||||
throw error; // Re-throw the error to fail the test
|
||||
}
|
||||
});
|
||||
|
||||
// test('simulation Page Screenshots', async ({ page }) => {{
|
||||
test('simulation Page Screenshots', async ({ page }) => {{
|
||||
|
||||
// const folderName = 'simulation-screenshots';
|
||||
const folderName = 'simulation-screenshots';
|
||||
|
||||
// await page.goto('http://185.100.212.76:8200');
|
||||
// await page.getByPlaceholder('Email').fill('nalvazhuthi@hexrfactory.com');
|
||||
// await page.getByPlaceholder('Password').fill('123456');
|
||||
// await page.waitForSelector('button:has-text("Continue")', { timeout: 10000 });
|
||||
// await page.getByRole('button', { name: 'Continue', exact: true }).click();
|
||||
// await page.getByText('Simulation').click();
|
||||
// await page.waitForTimeout(4000);
|
||||
// await takeScreenshotsAtViewports(page, `${folderName}/simulation-page-loaded`, 'simulation-page-loaded');
|
||||
await page.goto('http://185.100.212.76:8200');
|
||||
await page.getByPlaceholder('Email').fill('ramkumar@tester.local');
|
||||
await page.getByPlaceholder('Password').fill('123456');
|
||||
await page.waitForSelector('button:has-text("Continue")', { timeout: 10000 });
|
||||
await page.getByRole('button', { name: 'Continue', exact: true }).click();
|
||||
await page.waitForTimeout(10000); // Wait for the page to load
|
||||
await page.getByText('Simulation').click();
|
||||
await page.waitForTimeout(4000);
|
||||
await takeScreenshotsAtViewports(page, `${folderName}/simulation-page-loaded`, 'simulation-page-loaded');
|
||||
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
|
||||
// test('Visualization Page Screenshots', async ({ page }) => {
|
||||
// const folderName = 'Visualization-screenshots';
|
||||
|
||||
// // Navigate to the login page and log in
|
||||
// await page.goto('http://185.100.212.76:8200');
|
||||
// await page.getByPlaceholder('Email').fill('nalvazhuthi@hexrfactory.com');
|
||||
// await page.getByPlaceholder('Password').fill('123456');
|
||||
// await page.waitForSelector('button:has-text("Continue")', { timeout: 10000 });
|
||||
// await page.getByRole('button', { name: 'Continue', exact: true }).click();
|
||||
|
||||
// // Navigate to the Visualization page
|
||||
// await page.getByText('Visualization').click();
|
||||
// await page.waitForTimeout(4000); // Wait for the page to load
|
||||
// await takeScreenshotsAtViewports(page, `${folderName}/Visualization-page1-loaded`, 'Visualization1-page-loaded');
|
||||
|
||||
// // Navigate to Templates and Design pages
|
||||
// await page.locator('.toggle-header-item:has-text("Templates")').click(); // Use a more specific selector
|
||||
// await page.getByText('Design').click(); // Ensure this is unique
|
||||
// await takeScreenshotsAtViewports(page, `${folderName}/Visualization-page2-loaded`, 'Visualization2-page-loaded');
|
||||
// });
|
||||
|
||||
// test('Market-Place Page Screenshots', async ({ page }) => {{
|
||||
|
||||
// const folderName = 'simulation-screenshots';
|
||||
|
||||
// await page.goto('http://185.100.212.76:8200');
|
||||
// await page.getByPlaceholder('Email').fill('nalvazhuthi@hexrfactory.com');
|
||||
// await page.getByPlaceholder('Password').fill('123456');
|
||||
// await page.waitForSelector('button:has-text("Continue")', { timeout: 10000 });
|
||||
// await page.getByRole('button', { name: 'Continue', exact: true }).click();
|
||||
// await page.getByText('Market Place').click();
|
||||
// await page.waitForTimeout(4000);
|
||||
// await takeScreenshotsAtViewports(page, `${folderName}/Market-Place-page-loaded`, 'Market-Place-page-loaded');
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
test('Visualization-Drag&Drop Page Screenshots', async ({ page }) => {
|
||||
test('Visualization Page Screenshots', async ({ page }) => {
|
||||
const folderName = 'Visualization-screenshots';
|
||||
|
||||
// Navigate to the login page and log in
|
||||
await page.goto('http://185.100.212.76:8200');
|
||||
await page.getByPlaceholder('Email').fill('nalvazhuthi@hexrfactory.com');
|
||||
await page.getByPlaceholder('Email').fill('ramkumar@tester.local');
|
||||
await page.getByPlaceholder('Password').fill('123456');
|
||||
await page.waitForSelector('button:has-text("Continue")', { timeout: 10000 });
|
||||
await page.getByRole('button', { name: 'Continue', exact: true }).click();
|
||||
|
||||
// Navigate to the Visualization page
|
||||
await page.waitForTimeout(10000); // Wait for the page to load
|
||||
await page.getByText('Visualization').click();
|
||||
// await page.waitForTimeout(4000);
|
||||
await page.getByTitle('Activate left panel').click();
|
||||
await page.waitForTimeout(4000);
|
||||
await page.waitForTimeout(4000); // Wait for the page to load
|
||||
await takeScreenshotsAtViewports(page, `${folderName}/Visualization-page1-loaded`, 'Visualization1-page-loaded');
|
||||
|
||||
await page.locator('.toggle-header-item:has-text("3D")').click(); // Use a more specific selector
|
||||
await takeScreenshotsAtViewports(page, `${folderName}/Visualization-page1-loaded`, 'Visualization1-page-loaded-3D');
|
||||
|
||||
await page.locator('.toggle-header-item:has-text("Floating")').click(); // Use a more specific selector
|
||||
await takeScreenshotsAtViewports(page, `${folderName}/Visualization-page1-loaded`, 'Visualization1-page-loaded-Floating');
|
||||
// Navigate to Templates and Design pages
|
||||
await page.locator('.toggle-header-item:has-text("Templates")').click(); // Use a more specific selector
|
||||
await takeScreenshotsAtViewports(page, `${folderName}/Visualization-page2-loaded`, 'Visualization2-page-loaded');
|
||||
});
|
||||
|
||||
test('Market-Place Page Screenshots', async ({ page }) => {{
|
||||
|
||||
const folderName = 'simulation-screenshots';
|
||||
|
||||
await page.goto('http://185.100.212.76:8200');
|
||||
await page.getByPlaceholder('Email').fill('ramkumar@tester.local');
|
||||
await page.getByPlaceholder('Password').fill('123456');
|
||||
await page.waitForSelector('button:has-text("Continue")', { timeout: 10000 });
|
||||
await page.getByRole('button', { name: 'Continue', exact: true }).click();
|
||||
await page.waitForTimeout(10000); // Wait for the page to load
|
||||
await page.getByText('Market Place').click();
|
||||
await page.waitForTimeout(4000);
|
||||
await takeScreenshotsAtViewports(page, `${folderName}/Market-Place-page-loaded`, 'Market-Place-page-loaded');
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user