Skip to content

Commit

Permalink
Merge branch 'B-19894-TOO-queue-moves-MAIN' into B-19894-TOO-queue-mo…
Browse files Browse the repository at this point in the history
…ves-INT
  • Loading branch information
traskowskycaci committed Jun 11, 2024
2 parents 9bcfbe6 + 8cf50ed commit 587f1f7
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
3 changes: 2 additions & 1 deletion playwright/tests/office/txo/tooFlows.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,8 @@ test.describe('TOO user', () => {

await page.locator('input[name="locator"]').type(shipmentAddressUpdate.Shipment.MoveTaskOrder.locator);
await page.locator('input[name="locator"]').blur();
await expect(page.getByText('Move approved')).toBeVisible();
// once the move is in the Move approved status, it will no longer show up in the TOO queue
await expect(page.getByText('Move approved')).not.toBeVisible();
await expect(page.getByText('Approvals requested')).not.toBeVisible();
});
});
23 changes: 20 additions & 3 deletions playwright/tests/office/txo/tooFlowsNTS.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import { test, expect } from '../../utils/office/officeTest';

import { TooFlowPage } from './tooTestFixture';

const TOOTabsTitles = ['Move Queue', 'Search'];
const SearchRBSelection = ['Move Code', 'DOD ID', 'Customer Name'];

test.describe('TOO user', () => {
/** @type {TooFlowPage} */
let tooFlowPage;
Expand Down Expand Up @@ -170,19 +173,33 @@ test.describe('TOO user', () => {
});

test.describe('with approved HHG + NTS Move', () => {
let move;

test.beforeEach(async ({ officePage }) => {
const move = await officePage.testHarness.buildHHGMoveWithApprovedNTSShipmentsForTOO();
move = await officePage.testHarness.buildHHGMoveWithApprovedNTSShipmentsForTOO();
await officePage.signInAsNewTOOUser();
tooFlowPage = new TooFlowPage(officePage, move);
await officePage.tooNavigateToMove(move.locator);

const searchTab = officePage.page.getByTitle(TOOTabsTitles[1]);
await searchTab.click();
});

test('TOO can view and edit Domestic NTS Shipments handled by the Prime on the MTO page', async ({ page }) => {
// This test is almost exactly a duplicate of the test in
// tooFlowsNTSR.
const selectedRadio = page.getByRole('group').locator(`label:text("${SearchRBSelection[0]}")`);
await selectedRadio.click();
await page.getByTestId('searchText').type(move.locator);
await page.getByTestId('searchTextSubmit').click();

await expect(page.getByText('Results (1)')).toBeVisible();
await expect(page.getByTestId('locator-0')).toContainText(move.locator);

// await page.getByTestId('MoveTaskOrder-Tab').click();
await page.getByTestId('locator-0').click();

await page.getByTestId('MoveTaskOrder-Tab').click();
await tooFlowPage.waitForLoading();

await expect(
page.locator('[id="move-weights"] div').getByText('1 shipment not moved by GHC prime.'),
).not.toBeVisible();
Expand Down
23 changes: 21 additions & 2 deletions playwright/tests/office/txo/tooFlowsNTSR.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import { test, expect } from '../../utils/office/officeTest';

import { TooFlowPage } from './tooTestFixture';

const TOOTabsTitles = ['Move Queue', 'Search'];
const SearchRBSelection = ['Move Code', 'DOD ID', 'Customer Name'];

test.describe('TOO user', () => {
/** @type {TooFlowPage} */
let tooFlowPage;
Expand Down Expand Up @@ -190,16 +193,32 @@ test.describe('TOO user', () => {
});

test.describe('with approved HHG + NTSR Move', () => {
let move;

test.beforeEach(async ({ officePage }) => {
const move = await officePage.testHarness.buildHHGMoveWithApprovedNTSRShipmentsForTOO();
move = await officePage.testHarness.buildHHGMoveWithApprovedNTSRShipmentsForTOO();
await officePage.signInAsNewTOOUser();
tooFlowPage = new TooFlowPage(officePage, move);
await officePage.tooNavigateToMove(move.locator);

const searchTab = officePage.page.getByTitle(TOOTabsTitles[1]);
await searchTab.click();
});

test('TOO can view and edit Domestic NTS-R Shipments handled by the Prime on the MTO page', async ({ page }) => {
// This test is almost exactly a duplicate of the test in
// tooFlowsNTS.

const selectedRadio = page.getByRole('group').locator(`label:text("${SearchRBSelection[0]}")`);
await selectedRadio.click();
await page.getByTestId('searchText').type(move.locator);
await page.getByTestId('searchTextSubmit').click();

await expect(page.getByText('Results (1)')).toBeVisible();
await expect(page.getByTestId('locator-0')).toContainText(move.locator);

// await page.getByTestId('MoveTaskOrder-Tab').click();
await page.getByTestId('locator-0').click();

await page.getByTestId('MoveTaskOrder-Tab').click();
await tooFlowPage.waitForLoading();

Expand Down

0 comments on commit 587f1f7

Please sign in to comment.