Skip to content

Conversation

@rsarika
Copy link
Contributor

@rsarika rsarika commented Dec 18, 2025

COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7496

This pull request addresses

Fixing the e2e tests.
Added logging for better debug.

by making the following changes

move all the dial numbers tests into one suite.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • The testing is done with the amplify link
    < ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • I have tested the functionality with amplify link

Make sure to have followed the contributing guidelines before submitting.

@rsarika rsarika added validated Indicates that the PR is ready for actions run_e2e Add this label to run E2E test for meeting and CC widgets labels Dec 18, 2025
@aws-amplify-us-east-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-588.d1b38q61t1z947.amplifyapp.com

Copy link
Contributor

@adhmenon adhmenon left a comment

Choose a reason for hiding this comment

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

Mostly looks good.
Few doubts around timeout duration and some utils.

const incomingTaskDiv = testManager.agent1Page.getByTestId('samples:incoming-task-telephony').first();
await incomingTaskDiv.waitFor({state: 'visible', timeout: 80000});

await waitForIncomingTask(testManager.agent1Page, TASK_TYPES.CALL, 80000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Question - do we need such a large timeout?

);

// Agent 2 should receive the transfer and accept it
await acceptIncomingTask(testManager.agent2Page, TASK_TYPES.CALL, 60000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Notice this timeout is different, have we added optimised values - is this why each are different?

await incomingChatTaskDiv.waitFor({state: 'visible', timeout: 40000});
await acceptIncomingTask(testManager.agent1Page, TASK_TYPES.CHAT);
await incomingEmailTaskDiv.waitFor({state: 'visible', timeout: 3000});
await incomingEmailTaskDiv.waitFor({state: 'visible', timeout: 40000});
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need such large timeouts?

await hideDesktopCheckbox.click();
await testManager.agent1Page.waitForTimeout(500);
await verifyDesktopOptionVisibility(testManager.agent1Page, true);
await verifyDesktopOptionVisibility(testManager.agent1Page, false);
Copy link
Contributor

Choose a reason for hiding this comment

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

WHy is this change needed?

test.afterAll(async () => {
await testManager.cleanup();
});
// No afterAll here - suite handles cleanup
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: can remove this.

import {loginExtension} from './incomingTaskUtils';
import {dismissOverlays} from './helperUtils';
import {AWAIT_TIMEOUT, FORM_FIELD_TIMEOUT} from '../constants';
import {AWAIT_TIMEOUT, FORM_FIELD_TIMEOUT, LONG_WAIT} from '../constants';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Maybe rename the LONG_WAIT to something else?

const endButton = page.getByTestId('call-control:end-call').first();
const endButtonVisible = await endButton.isVisible().catch(() => false);

if (endButtonVisible) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering why we had to do these end button checks for cleaning up stray tasks? Would they not be handled by the test itself?

Comment on lines +468 to +472
const endBtnAfterAccept = page.getByTestId('call-control:end-call').first();
const endVisibleAfterAccept = await endBtnAfterAccept.isVisible().catch(() => false);
if (endVisibleAfterAccept) {
const endEnabledAfterAccept = await endBtnAfterAccept.isEnabled().catch(() => false);
if (endEnabledAfterAccept) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we accepting tasks in the stray task cleanup?
I feel this should be handled in tests...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run_e2e Add this label to run E2E test for meeting and CC widgets validated Indicates that the PR is ready for actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants