-
Notifications
You must be signed in to change notification settings - Fork 13.1k
test: Display upsell modal for voice calls on community edition. #37230
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
0c587cf
voice call upsell modal for CE
Harmeet221 aca44f8
update locator
Harmeet221 fc3a45e
add modal for team voice calls
Harmeet221 c7c1019
updated import
Harmeet221 de72537
remove not visible step
Harmeet221 d805466
just for CE
Harmeet221 83def5a
fix: review
dougfabris bb7cbdb
Merge branch 'develop' into voice-calls
Harmeet221 82ad837
Merge branch 'develop' into voice-calls
Harmeet221 ba4fcfd
Refactor btnContactInformation locator method
Harmeet221 7a7935c
Change contact information button name to 'User Info'
Harmeet221 b343ebb
Merge branch 'develop' into voice-calls
Harmeet221 c1329c6
Fix lint issue
Harmeet221 51dc742
Resolve lint issues
Harmeet221 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import type { Page } from '@playwright/test'; | ||
|
|
||
| import { Modal } from './modal'; | ||
|
|
||
| export class VoiceCallsUpsellModal extends Modal { | ||
| constructor(page: Page) { | ||
| super(page.getByRole('dialog', { name: 'Team voice calls' })); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import { IS_EE } from './config/constants'; | ||
| import { Users } from './fixtures/userStates'; | ||
| import { HomeChannel } from './page-objects'; | ||
| import { VoiceCallsUpsellModal } from './page-objects/fragments/upsell-modal'; | ||
| import { expect, test } from './utils/test'; | ||
|
|
||
| test.use({ storageState: Users.user1.state }); | ||
|
|
||
| test.describe('Voice Calls - Community Edition', () => { | ||
| test.skip(IS_EE, 'Community Edition Only'); | ||
| let poHomeChannel: HomeChannel; | ||
| let upsellVoiceCallsModal: VoiceCallsUpsellModal; | ||
|
|
||
| test.beforeEach(async ({ page }) => { | ||
| poHomeChannel = new HomeChannel(page); | ||
| upsellVoiceCallsModal = new VoiceCallsUpsellModal(page); | ||
| await page.goto('/home'); | ||
| }); | ||
|
|
||
| test('should see upsell modal when clicked on DM > voice call button', async () => { | ||
| await test.step('should open direct message with user2', async () => { | ||
| await poHomeChannel.sidenav.openChat('user2'); | ||
| await expect(poHomeChannel.content.inputMessage).toBeVisible(); | ||
| }); | ||
|
|
||
| await test.step('should click voice call from room toolbar and see upsell modal', async () => { | ||
| await poHomeChannel.content.btnVoiceCall.click(); | ||
| await upsellVoiceCallsModal.waitForDisplay(); | ||
| }); | ||
| }); | ||
|
|
||
| test('should see upsell modal when clicked on user info > voice call button', async () => { | ||
| await test.step('should open direct message with user2', async () => { | ||
| await poHomeChannel.sidenav.openChat('user2'); | ||
| await expect(poHomeChannel.content.inputMessage).toBeVisible(); | ||
| }); | ||
|
|
||
| await test.step('should click voice call from contact information and see upsell modal', async () => { | ||
| await poHomeChannel.content.btnContactInformation.click(); | ||
| await poHomeChannel.content.btnContactInfoVoiceCall.click(); | ||
| await upsellVoiceCallsModal.waitForDisplay(); | ||
| }); | ||
| }); | ||
|
|
||
| test('should see upsell modal when clicked on User menu > New voice call', async () => { | ||
| await test.step('should open user menu', async () => { | ||
| await poHomeChannel.sidenav.btnUserProfileMenu.click(); | ||
| await poHomeChannel.sidenav.getUserProfileMenuOption('New voice call').click(); | ||
| }); | ||
|
|
||
| await test.step('should see upsell modal', async () => { | ||
| await upsellVoiceCallsModal.waitForDisplay(); | ||
| }); | ||
|
|
||
| await test.step('should close upsell modal', async () => { | ||
| await upsellVoiceCallsModal.close(); | ||
| }); | ||
| }); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.