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

Account update leaf 4559 - Test Scenario #1 #15

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
95 changes: 95 additions & 0 deletions end2end/tests/acctUpdate.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import { test, expect, Locator } from '@playwright/test';

test.use({
ignoreHTTPSErrors: true
});

test('noGroupsOrPositions', async ({ page }, testInfo) => {

await page.goto('https://host.docker.internal/Test_Request_Portal/admin/');
//Open the New Account Update Page
await page.getByRole('button', { name: ' New Account Updater' }).click();
//Sync the Service forst

await page.getByRole('link', { name: 'Sync Services' }).click();

//Wait for the new page to popup
const page1Promise = page.waitForEvent('popup');
const page1 = await page1Promise;

//Verify the Sync Service was completed
await expect(page1.getByText('Syncing has finished. You are')).toBeInViewport();

//Return the the Admin page
await page1.getByLabel('admin submenu').click();
await page1.getByLabel('admin submenu').click();
await page1.getByRole('link', { name: 'Admin Panel' }).click();

//Return to the New Account Update page
const acctUpdate:Locator = page1.getByRole('button', { name: ' New Account Updater' });
await acctUpdate.click();

//Identify the Old Account to be disabled
const OldRep:Locator = page1.locator('css=input.employeeSelectorInput').nth(0);
await OldRep.click();
await OldRep.fill("vtrmvtlynnette");
await page1.getByRole('cell', { name: 'Jacobs, Gilbert Wilderman.' }).click();


const oldAcct:Locator = page1.getByLabel('Jacobs, Gilbert Wilderman.');
oldAcct.click();


const screenshot = await page.screenshot()
await testInfo.attach('screenshot', { body: screenshot, contentType: 'image/png' });

// Enter New Account information
const newRep:Locator = page1.locator('css=input.employeeSelectorInput').nth(1);
await newRep.click();
await newRep.fill("vtrkmwroseann");


const newAcct:Locator = page1.getByLabel('Greenholt, Shirlene Parisian');
newAcct.click();

//await expect(page.getByRole('button', { name: 'Preview Changes' })).toBeInViewport();

await expect(page1.getByText('New Account Search results')).toBeVisible();


//Click to View Changes

const previewChange:Locator = page1.getByRole('button', {name: 'Preview Changes'});
await previewChange.hover();
await previewChange.click ();


await testInfo.attach('screenshot', { body: screenshot, contentType: 'image/png' });

//Wait for page to refresh (


//Veirfy Goups and Positions is empty.

await expect (page1.locator('#grid_groups_info')).toContainText('No groups found');

await expect (page1.locator('#grid_positions_info')).toContainText('No Positions found');

await testInfo.attach('screenshot', { body: screenshot, contentType: 'image/png' });

//Accept changes
await page1.getByRole('button', { name: 'Update Records' }).click();

await testInfo.attach('screenshot', { body: screenshot, contentType: 'image/png' });

//await expect(page1.getByText('Syncing has finished. You are')).toBeInViewport();
//Verify there are not any group/positions updates
await expect(page1.locator('#groups_no_updates')).toContainText('no updates');
await expect(page1.locator('#positions_no_updates')).toContainText('no updates');

//No processing errors
await expect(page.locator('#no_errors')).toContainText('no errors');
await testInfo.attach('screenshot', { body: screenshot, contentType: 'image/png' });


});
82 changes: 82 additions & 0 deletions end2end/tests/acctUpdateMultiple.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import { test, expect, Locator } from '@playwright/test';

test.use({
ignoreHTTPSErrors: true
});

test.only('oldAcctGroupsAndPosition', async ({ page }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is still failing on my local machine. Please also remove the .only for the final version, since this causes only this test to run.


await page.goto('https://host.docker.internal/Test_Request_Portal/admin/');
//Open the New Account Update Page
await page.getByRole('button', { name: ' New Account Updater' }).click();
//Sync the Service forst

await page.getByRole('link', { name: 'Sync Services' }).click();

//Wait for the new page to popup
const page1Promise = page.waitForEvent('popup');
const page1 = await page1Promise;

//Verify the Sync Service was completed
await expect(page1.getByText('Syncing has finished. You are')).toBeInViewport();

//Return the the Admin page
await page1.getByLabel('admin submenu').click();
await page1.getByLabel('admin submenu').click();
await page1.getByRole('link', { name: 'Admin Panel' }).click();

//Return to the New Account Update page
const acctUpdate:Locator = page1.getByRole('button', { name: ' New Account Updater' });
await acctUpdate.click();

//Identify the Old Account to be disabled
const OldRep:Locator = page1.locator('css=input.employeeSelectorInput').nth(0);
await OldRep.click();
await OldRep.fill("vtriujtalisha");
//await expect(page.getByText('Old Account Search results')).toBeInViewport();
//await expect(page.getByRole('cell', { name: 'Jacobs, Gilbert Wilderman.' })).toBeInViewport();
await page1.getByRole('cell', { name: 'Kozey, Kirstin Schimmel.' }).click();


const oldAcct:Locator = page1.getByLabel('Kozey, Kirstin Schimmel.');
oldAcct.click();



// Enter New Account information
const newRep:Locator = page1.locator('css=input.employeeSelectorInput').nth(1);
await newRep.click();
await newRep.fill("vtrvxhconception");


const newAcct:Locator = page1.getByLabel('Predovic, Augustine Hammes.');
newAcct.click();

await expect(page1.getByText('New Account Search results')).toBeVisible();

//Click to View Changes
const previewChange:Locator = page1.getByRole('button', {name: 'Preview Changes'});
await previewChange.hover();
await previewChange.click ();

//Old Account with Groups & Positions

//Veirfy Goups and Positions is empty have value

await expect (page1.locator('#grid_groups_info')).toContainText('No groups found');

await expect (page1.locator('#grid_positions_info')).toContainText('No Positions found');

//Accept changes
await page1.getByRole('button', { name: 'Update Records' }).click();

//await expect(page1.getByText('Syncing has finished. You are')).toBeInViewport();
//Verify there are not any group/positions updates
await expect(page1.locator('#groups_no_updates')).toContainText('no updates');
await expect(page1.locator('#positions_no_updates')).toContainText('no updates');

//No processing errors
await expect(page.locator('#no_errors')).toContainText('no errors');


});
Loading