-
Notifications
You must be signed in to change notification settings - Fork 62
fix(cc-widgets): e2e tests #588
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
base: next
Are you sure you want to change the base?
Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
adhmenon
left a comment
There was a problem hiding this 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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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}); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
| 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) { |
There was a problem hiding this comment.
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...
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
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.