diff --git a/packages/ringcentral-widgets-test/__test__/integration-test/Meeting/ScheduleMeeting.spec.js b/packages/ringcentral-widgets-test/__test__/integration-test/Meeting/ScheduleMeeting.spec.js
deleted file mode 100644
index 3e050693d..000000000
--- a/packages/ringcentral-widgets-test/__test__/integration-test/Meeting/ScheduleMeeting.spec.js
+++ /dev/null
@@ -1,178 +0,0 @@
-import moment from 'moment';
-import { MeetingType } from '@ringcentral-integration/commons/helpers/meetingHelper';
-import MeetingSection from '@ringcentral-integration/widgets/components/MeetingSection';
-import NavigationBar from '@ringcentral-integration/widgets/components/NavigationBar';
-import { sleep } from '@ringcentral-integration/commons/utils';
-import { getWrapper } from '../shared';
-
-let app = null;
-beforeAll(async () => {
- jest.setTimeout(64000);
- app = await getWrapper();
- // Nav to Meeting page
- const navigationBar = app.find(NavigationBar).first();
- await navigationBar.props().goTo('/meeting');
- app.update();
-});
-
-// TODO: skip fix in next mr
-describe.skip('Schedule Meeting', () => {
- const EXPECT_HOUR = 5;
- const EXPECT_MINUTES = 15;
- test('', async () => {
- const topic = app.find(MeetingSection).first();
- const maxInput = '#'.repeat(128);
- const exceedInput = `${maxInput}#`;
- topic.find('input').simulate('change', { target: { value: maxInput } });
- // To fit the Debounce timeout on MeetingPanel
- await sleep(10);
- expect(app.props().phone.meeting.meeting.topic).toBe(maxInput);
- // Exceed 128 chars length should failed and keep the origin
- topic.find('input').simulate('change', { target: { value: exceedInput } });
- await sleep(10);
- expect(app.props().phone.meeting.meeting.topic).not.toBe(exceedInput);
- topic.find('input').simulate('change', { target: { value: 'aloha' } });
- await sleep(10);
- expect(app.props().phone.meeting.meeting.topic).toBe('aloha');
- });
- test('', async () => {
- let when = app.find(MeetingSection).at(1);
- // Tolerance one minute range
- const now = moment(Date.now());
- expect(
- moment(app.props().phone.meeting.meeting.schedule.startTime).diff(
- now,
- 'minutes',
- ),
- ).toBeLessThanOrEqual(60);
- // DATE
- const dateField = when.find('DateTimePicker').at(0);
- const expectedDate = now.add(1, 'days');
- dateField.props().onChange(expectedDate.toDate());
- app.update();
- // Time
- expectedDate.hours(EXPECT_HOUR).minutes(EXPECT_MINUTES);
- when = app.find(MeetingSection).at(1);
- const timeField = when.find('DateTimePicker').at(1);
- timeField.props().onChange(expectedDate.toDate());
- app.update();
-
- await sleep(100);
- const actualDate = moment(
- app.props().phone.meeting.meeting.schedule.startTime,
- );
- expect(actualDate.diff(expectedDate, 'minutes')).toBeLessThan(1);
- });
- test('', async () => {
- const duration = app.find(MeetingSection).at(2);
- expect(app.props().phone.meeting.meeting.schedule.durationInMinutes).toBe(
- 60,
- );
- const hourField = duration.find('DropdownList').first();
- hourField.props().onChange({ value: EXPECT_HOUR });
- expect(app.props().phone.meeting.meeting.schedule.durationInMinutes).toBe(
- EXPECT_HOUR * 60,
- );
- const minuteField = duration.find('DropdownList').at(1);
- minuteField.props().onChange({ value: EXPECT_MINUTES });
- expect(app.props().phone.meeting.meeting.schedule.durationInMinutes).toBe(
- EXPECT_HOUR * 60 + EXPECT_MINUTES,
- );
- });
- test('', async () => {
- const recurring = app.find(MeetingSection).at(3);
- expect(app.props().phone.meeting.meeting.meetingType).toBe('Scheduled');
- const typeField = recurring.find('Switch').first();
- typeField.props().onChange(false);
- expect(app.props().phone.meeting.meeting.meetingType).toBe(
- MeetingType.SCHEDULED,
- );
- typeField.props().onChange(true);
- const meetingType = app.props().phone.meeting.meeting.meetingType;
- expect(
- meetingType === MeetingType.RECURRING ||
- meetingType === MeetingType.SCHEDULED_RECURRING,
- ).toBe(true);
- });
- test('', async () => {
- const video = app.find(MeetingSection).at(4);
- expect(app.props().phone.meeting.meeting.startHostVideo).toBe(false);
- expect(app.props().phone.meeting.meeting.startParticipantsVideo).toBe(
- false,
- );
- const hostField = video.find('Switch').first();
- hostField.props().onChange(false);
- expect(app.props().phone.meeting.meeting.startHostVideo).toBe(false);
- hostField.props().onChange(true);
- expect(app.props().phone.meeting.meeting.startHostVideo).toBe(true);
- const participantField = video.find('Switch').at(1);
- participantField.props().onChange(false);
- expect(app.props().phone.meeting.meeting.startParticipantsVideo).toBe(
- false,
- );
- participantField.props().onChange(true);
- expect(app.props().phone.meeting.meeting.startParticipantsVideo).toBe(true);
- });
- test('', async () => {
- const audio = app.find(MeetingSection).at(5);
- expect(app.props().phone.meeting.meeting.audioOptions).toEqual([
- 'Phone',
- 'ComputerAudio',
- ]);
- const audioField = audio.find('CheckBox');
- audioField.find('.item').first().simulate('click');
- expect(app.props().phone.meeting.meeting.audioOptions).toEqual(['Phone']);
- audioField.find('.item').at(1).simulate('click');
- expect(app.props().phone.meeting.meeting.audioOptions).toEqual([
- 'ComputerAudio',
- ]);
- audioField.find('.item').at(2).simulate('click');
- expect(app.props().phone.meeting.meeting.audioOptions).toEqual([
- 'Phone',
- 'ComputerAudio',
- ]);
- });
- test('', async () => {
- let options = app.find(MeetingSection).at(6);
- expect(app.props().phone.meeting.meeting._requireMeetingPassword).toBe(
- false,
- );
- expect(app.props().phone.meeting.meeting.allowJoinBeforeHost).toBe(false);
- // Expand Section
- options.find('.arrow').simulate('click');
- // Get reference after update
- options = app.find(MeetingSection).at(6);
- const requirePwdField = options.find('Switch').first();
- requirePwdField.props().onChange(false);
- expect(app.props().phone.meeting.meeting._requireMeetingPassword).toBe(
- false,
- );
- requirePwdField.props().onChange(true);
- app.update();
- expect(app.props().phone.meeting.meeting._requireMeetingPassword).toBe(
- true,
- );
- options = app.find(MeetingSection).at(6);
- const passwordField = options.find('input.password');
- passwordField.props().onChange({ target: { value: 'papapa' } });
- expect(app.props().phone.meeting.meeting.password).toBe('papapa');
- // Exceed 10 chars length should failed and keep the origin
- passwordField.simulate('change', { target: { value: '12345678901' } });
- expect(app.props().phone.meeting.meeting.password).toBe('papapa');
- const joinBeforeField = options.find('Switch').at(1);
- joinBeforeField.props().onChange(false);
- expect(app.props().phone.meeting.meeting.allowJoinBeforeHost).toBe(false);
- joinBeforeField.props().onChange(true);
- expect(app.props().phone.meeting.meeting.allowJoinBeforeHost).toBe(true);
- });
-
- test.skip('', async () => {
- const buttons = app.find('MeetingScheduleButton');
- expect(buttons.find('[data-sign="meetingScheduleButton"]').exists()).toBe(
- true,
- );
- expect(buttons.find('[data-sign="meetingScheduleButton"]').text()).toBe(
- 'Schedule Meeting',
- );
- });
-});
diff --git a/packages/ringcentral-widgets-test/package.json b/packages/ringcentral-widgets-test/package.json
index ed685e239..0130c50d2 100644
--- a/packages/ringcentral-widgets-test/package.json
+++ b/packages/ringcentral-widgets-test/package.json
@@ -44,7 +44,6 @@
"fs-extra": "^10.1.0",
"jest-html-reporters": "^3.1.7",
"mock-socket": "^9.3.1",
- "moment": "^2.29.4",
"pubnub": "^4.29.11",
"ramda": "^0.28.0",
"rc-tooltip": "^3.7.2",
diff --git a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4048.test.tsx b/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4048.test.tsx
deleted file mode 100644
index 2c6b8a4f3..000000000
--- a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4048.test.tsx
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * RCI-4048: Could not click to dial/SMS
- * https://test_it_domain/test-cases/RCI-4048
- * Preconditions:
- * The user has logged into 3rd party.
- * The user has logged into RC CTI App
- * Entry point(/s):
- *
- | Click to Dial/SMS |Phone number |
- | On |1 |
- | On |123 |
- | On |098765 |
- | Off |+16501234567 |
-
- * > Go to Settings
- * > Make the status of Click to Dial/SMS to be {Click to Dial/SMS}
- */
-import {
- p2,
- it,
- Given,
- autorun,
- examples,
- StepProp,
- Scenario,
- Step,
- title,
- common,
- When,
- WaitForRenderReady,
-} from '@ringcentral-integration/test-utils';
-
-import { CommonLogin } from '../../../../../steps/CommonLogin';
-import { CreateInstance } from '../../../../../steps/CreateInstance';
-import { SwitchToggleTo } from '../../../../../steps/Meeting';
-import { CreateMock, MockGetPhoneNumber } from '../../../../../steps/Mock';
-import { NavigateToSettings } from '../../../../../steps/Navigate';
-
-jest.mock(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- () => {
- const { HoverRangeMatch: BaseHoverRangeMatch } = jest.requireActual(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- );
- class HoverRangeMatch extends BaseHoverRangeMatch {
- // mock mouse is hover on rect
- isMatch() {
- return true;
- }
- }
- return {
- __esModule: true,
- ...jest.requireActual(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- ),
- HoverRangeMatch,
- };
- },
-);
-
-window.Range.prototype.getBoundingClientRect = jest.fn(
- () =>
- ({
- bottom: 196,
- height: 23,
- left: 139.1328125,
- right: 283.15625,
- top: 173,
- width: 144.0234375,
- x: 139.1328125,
- y: 173,
- } as DOMRect),
-);
-
-// not enabled c2d feature for common
-@autorun(test.skip)
-@it
-@p2
-@common
-@title('Could not click to dial/SMS')
-export class UnableClickToDial extends Step {
- Login: StepProp = (props) => (
-
- );
- CreateMock: StepProp = CreateMock;
- HandleC2D: StepProp = () => ({});
- @examples(`
- | phoneNumber | c2dEnable | c2dIsDisplayed |
- | '1' | true | false |
- | '123' | true | false |
- | '098765' | true | false |
- | '+16501234567' | false | false |
- `)
- run() {
- const { CreateMock, Login, HandleC2D } = this;
- return (
-
- ,
- WaitForRenderReady,
- ]}
- />
-
-
- );
- }
-}
diff --git a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4049.test.tsx b/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4049.test.tsx
deleted file mode 100644
index 3bbef8af3..000000000
--- a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4049.test.tsx
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- * RCI-4049: Should show tooltip for Click to Dial/SMS
- * https://test_it_domain/test-cases/RCI-4049
- * Preconditions:
- * The user has logged into 3rd party.
- * The user has logged into {Brand} CTI App
- * Settings > Turn on the'Click to Dial/SMS'
- * There is {Phone number}with {Hyperlink} on the website
- *
- | Phone number |Hyperlink |
- | 1234567 | |
- | 7654321 |https://test_it_domain |
-
- * Entry point(/s):
- *
- | Brand |Brand name |
- | RC |RingCentral |
- | BT |BT Cloud Work |
- | Telus |TELUS Business Connect |
-
- */
-import {
- p2,
- it,
- Given,
- autorun,
- examples,
- StepProp,
- Scenario,
- Step,
- title,
- Then,
- common,
- When,
- WaitForRenderReady,
-} from '@ringcentral-integration/test-utils';
-
-import { TurnOnToggle } from '../../../../../steps/Common';
-import { CommonLogin } from '../../../../../steps/CommonLogin';
-import { CreateInstance } from '../../../../../steps/CreateInstance';
-import {
- CreateMock,
- MockAccountInfo,
- MockGetPhoneNumber,
-} from '../../../../../steps/Mock';
-import { NavigateToSettings } from '../../../../../steps/Navigate';
-
-jest.mock(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- () => {
- const { HoverRangeMatch: BaseHoverRangeMatch } = jest.requireActual(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- );
- class HoverRangeMatch extends BaseHoverRangeMatch {
- // mock mouse is hover on rect
- isMatch() {
- return true;
- }
- }
- return {
- __esModule: true,
- ...jest.requireActual(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- ),
- HoverRangeMatch,
- };
- },
-);
-
-window.Range.prototype.getBoundingClientRect = jest.fn(
- () =>
- ({
- bottom: 196,
- height: 23,
- left: 139.1328125,
- right: 283.15625,
- top: 173,
- width: 144.0234375,
- x: 139.1328125,
- y: 173,
- } as DOMRect),
-);
-
-@autorun(test.skip)
-@it
-@p2
-@title('Should show tooltip for Click to Dial/SMS')
-@common
-export class TooltipForC2DOrC2Sms extends Step {
- Login: StepProp = (props) => (
-
- );
- CreateMock: StepProp = CreateMock;
- CheckC2DTooltip: StepProp = () => ({});
- @examples(`
- | phoneNumber | brandId | brandName | brand |
- | '+15067654321' | '1210' | 'RingCentral' | 'rc' |
- | '+12091234567' | '7710' | 'BT Cloud Work' | 'bt' |
- | '+15067654321' | '7310' | 'TELUS Business Connect' | 'telus' |
- `)
- run() {
- const { CreateMock, Login, CheckC2DTooltip } = this;
- return (
- {
- mockData.serviceInfo.brand.id = this.example.brandId;
- return mockData;
- }}
- />,
- MockGetPhoneNumber,
- ]}
- >
- ,
- WaitForRenderReady,
- ]}
- />
-
- {/* Following steps checked in CheckC2DTooltip */}
-
-
-
-
-
-
-
- );
- }
-}
diff --git a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4053.test.tsx b/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4053.test.tsx
deleted file mode 100644
index 5a7785950..000000000
--- a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4053.test.tsx
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * RCI-4053: Should not recognize the meeting id as a phone number
- * https://test_it_domain/test-cases/RCI-4053
- * Preconditions:
- * The user has logged into 3rd party.
- * The user has logged into RC CTI App
- * Settings > Turnonthe'Click to Dial/SMS'
- * Entry point(/s):
- *
- | Meeting link |
- | meetings.ringcentral.com/j/1481234567 |
- | http://meetings.ringcentral.com/j/1481234567 |
- | https://meetings.ringcentral.com/j/1481234567 |
- | zoom.us/j/1491234567 |
- | https://meetings-officeathand.att.com/j/1491234567 |
- | https://meetings.btcloudphone.bt.com/j/1491234567 |
- | meetings.businessconnect.telus.com/j/1491234567 |
- | meetings.ringcentral.com/join?mid=1491234567 |
- | \\https://meetings.businessconnect.telus.com/join?mid=1491234567\\ |
- | http://v.ringcentral.com/join/148123456 |
- | http://meetings.officeathand.att.com/join/148123456 |
- | http://xmnup-rxe-1-v.lab.nordigy.ru/join/347121338 |
-
- */
-import {
- p2,
- it,
- Given,
- autorun,
- examples,
- StepProp,
- Scenario,
- Step,
- title,
- common,
- When,
- WaitForRenderReady,
-} from '@ringcentral-integration/test-utils';
-
-import { TurnOnToggle } from '../../../../../steps/Common';
-import { CommonLogin } from '../../../../../steps/CommonLogin';
-import { CreateInstance } from '../../../../../steps/CreateInstance';
-import { CreateMock, MockGetPhoneNumber } from '../../../../../steps/Mock';
-import { NavigateToSettings } from '../../../../../steps/Navigate';
-
-jest.mock(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- () => {
- const { HoverRangeMatch: BaseHoverRangeMatch } = jest.requireActual(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- );
- class HoverRangeMatch extends BaseHoverRangeMatch {
- // mock mouse is hover on rect
- isMatch() {
- return true;
- }
- }
- return {
- __esModule: true,
- ...jest.requireActual(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- ),
- HoverRangeMatch,
- };
- },
-);
-
-window.Range.prototype.getBoundingClientRect = jest.fn(
- () =>
- ({
- bottom: 196,
- height: 23,
- left: 139.1328125,
- right: 283.15625,
- top: 173,
- width: 144.0234375,
- x: 139.1328125,
- y: 173,
- } as DOMRect),
-);
-
-@autorun(test.skip)
-@it
-@p2
-@title('Should not recognize the meeting id as a phone number')
-@common
-export class NotEnableC2DForMeetingId extends Step {
- Login: StepProp = (props) => (
-
- );
- CreateMock: StepProp = CreateMock;
- CheckC2DHiddenInMeetingLink: StepProp = () => ({});
- @examples([
- {
- meetingLink: 'meetings.ringcentral.com/j/1481234567',
- },
- {
- meetingLink: 'http://meetings.ringcentral.com/j/1481234567',
- },
- {
- meetingLink: 'https://meetings.ringcentral.com/j/1481234567',
- },
- {
- meetingLink: 'zoom.us/j/1491234567',
- },
- {
- meetingLink: 'https://meetings-officeathand.att.com/j/1491234567',
- },
- {
- meetingLink: 'https://meetings.btcloudphone.bt.com/j/1491234567',
- },
- {
- meetingLink: 'meetings.businessconnect.telus.com/j/1491234567',
- },
- {
- meetingLink: 'meetings.ringcentral.com/join?mid=1491234567',
- },
- {
- meetingLink:
- 'https://meetings.businessconnect.telus.com/join?mid=1491234567',
- prefix: '\n\n',
- suffix: '\n\n',
- },
- {
- meetingLink: 'http://v.ringcentral.com/join/148123456',
- },
- {
- meetingLink: 'http://meetings.officeathand.att.com/join/148123456',
- },
- {
- meetingLink: 'http://xmnup-rxe-1-v.lab.nordigy.ru/join/347121338',
- },
- ])
- run() {
- const { CreateMock, Login, CheckC2DHiddenInMeetingLink } = this;
- return (
-
- ,
- WaitForRenderReady,
- ]}
- />
-
-
- );
- }
-}
diff --git a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4070.test.tsx b/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4070.test.tsx
deleted file mode 100644
index 061d3e53b..000000000
--- a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4070.test.tsx
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * RCI-4070: Auto-fill new phone number into "To" field when click to SMS
- * https://test_it_domain/test-cases/RCI-4070
- * Preconditions:
- * User has logged into 3rd party.
- * User has logged into RC CTI App
- * Settings > Turn on 'Click to Dial/SMS'
- * There is a phone number 1(+12057101188)filled in the Send SMS To field
- * Entry point(/s):
- * > Open Google
- * > Search an valid phone number 2(+16503860025)
- * > Hover on the phone number 2
- */
-import { formatNumber } from '@ringcentral-integration/commons/lib/formatNumber';
-import {
- p2,
- it,
- autorun,
- examples,
- Given,
- Scenario,
- Step,
- Then,
- title,
- When,
- And,
- common,
-} from '@ringcentral-integration/test-utils';
-import { fireEvent, screen } from '@testing-library/react';
-
-import type { StepProp } from '../../../../../lib/step';
-import { TurnOnToggle } from '../../../../../steps/Common';
-import { CommonLogin } from '../../../../../steps/CommonLogin';
-import { CreateInstance } from '../../../../../steps/CreateInstance';
-import {
- CheckInputToRecipients,
- CheckMessageToFieldValue,
- InputRecipients,
- InputSMS,
-} from '../../../../../steps/Messages';
-import { CreateMock } from '../../../../../steps/Mock';
-import {
- NavigateToComposeText,
- NavigateToSettings,
-} from '../../../../../steps/Navigate';
-
-export interface ExampleProps {
- firstNumber: string;
- c2textNumber: string;
-}
-
-@autorun(test.skip)
-@it
-@p2
-@common
-@title('Auto-fill new phone number into "To" field when click to SMS')
-export class RCI4070 extends Step {
- Login: StepProp = (props) => (
-
- );
- CreateMock: StepProp = CreateMock;
- TriggerClickToSms: StepProp = () => {};
-
- @examples(`
- | firstNumber | c2textNumber |
- | '+12057101188' | '+16503860025' |
- `)
- run() {
- const { CreateMock, Login, TriggerClickToSms } = this;
- return (
-
-
- ,
- ]}
- />
- [
- NavigateToComposeText,
- ,
- () => {
- // click anywhere to trigger RecipientsInput.clickHandler
- fireEvent.click(screen.getByTestId('messageInput'));
- },
- ]}
- />
-
- {
- const formattedNumber = phone.appFeatures.isEDPEnabled
- ? formatNumber({
- phoneNumber: c2textNumber,
- countryCode: phone.regionSettings.countryCode,
- areaCode: phone.regionSettings.areaCode,
- })
- : c2textNumber;
- return [
- ,
- ,
- ];
- }}
- />
-
- );
- }
-}
diff --git a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4641.test.tsx b/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4641.test.tsx
deleted file mode 100644
index ef3d5eb17..000000000
--- a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4641.test.tsx
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * RCI-4641: 7 digit numbers for RC-US and PR could not click to dial/SMS
- * https://test_it_domain/test-cases/RCI-4641
- * Preconditions:
- * The user has logged into 3rd party.
- * The user has logged into RC CTI App
- * The status of Click to Dial/SMS is ON
- * Entry point(/s):
- *
- | Phone number |Icons display |
- | 1234567 |False |
- | +16501234567 |True |
- | 6501234567 |True |
-
- */
-import {
- p2,
- it,
- Given,
- And,
- autorun,
- examples,
- StepProp,
- Scenario,
- Step,
- title,
- common,
- When,
-} from '@ringcentral-integration/test-utils';
-
-import { generateDialPlanData } from '../../../../../__mock__/generateDialPlanData';
-import { TurnOnToggle } from '../../../../../steps/Common';
-import { CommonLogin } from '../../../../../steps/CommonLogin';
-import { CreateInstance } from '../../../../../steps/CreateInstance';
-import {
- CreateMock,
- MockAccountInfo,
- MockDialingPlan,
- MockGetPhoneNumber,
-} from '../../../../../steps/Mock';
-import { NavigateToSettings } from '../../../../../steps/Navigate';
-import { NavigateTo } from '../../../../../steps/Router';
-import { SetCountryCode } from '../../../../../steps/Settings';
-
-jest.mock(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- () => {
- const { HoverRangeMatch: BaseHoverRangeMatch } = jest.requireActual(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- );
- class HoverRangeMatch extends BaseHoverRangeMatch {
- // mock mouse is hover on rect
- isMatch() {
- return true;
- }
- }
- return {
- __esModule: true,
- ...jest.requireActual(
- 'ringcentral-c2d/src/lib/NodeObserver/RangeMatch/HoverRangeMatch',
- ),
- HoverRangeMatch,
- };
- },
-);
-
-window.Range.prototype.getBoundingClientRect = jest.fn(
- () =>
- ({
- bottom: 196,
- height: 23,
- left: 139.1328125,
- right: 283.15625,
- top: 173,
- width: 144.0234375,
- x: 139.1328125,
- y: 173,
- } as DOMRect),
-);
-// not enable c2d for common
-@autorun(test.skip)
-@it
-@p2
-@title('7 digit numbers for RC-US and PR could not click to dial/SMS')
-@common
-export class C2DDisabledForUSAndPR extends Step {
- Login: StepProp = (props) => (
-
- );
- CreateMock: StepProp = CreateMock;
- HandleC2D: StepProp = () => {};
- @examples(`
- | phoneNumber | c2dIsDisplayed | isoCode | countryName | countryCallingCode |
- | '+16503051287' | true | 'US' | 'United States' | '1' |
- | '6503051287' | true | 'US' | 'United States' | '1' |
- | '3051287' | false | 'US' | 'United States' | '1' |
- | '+16503051288' | true | 'PR' | 'Puerto Rico' | '1' |
- | '6503051288' | true | 'PR' | 'Puerto Rico' | '1' |
- | '3051288' | false | 'PR' | 'Puerto Rico' | '1' |
- | '+16503051289' | true | 'CA' | 'Canada' | '1' |
- | '6503051289' | true | 'CA' | 'Canada' | '1' |
- | '3051289' | false | 'CA' | 'Canada' | '1' |
- `)
- run() {
- const { CreateMock, Login, HandleC2D } = this;
- return (
- [
- CreateMock,
- {
- mockData.serviceInfo.brand.homeCountry.isoCode = isoCode;
- return mockData;
- }}
- />,
- MockGetPhoneNumber,
- {
- return [
- generateDialPlanData('1', '1', 'United States', 'US'),
- generateDialPlanData('1', '179', 'Puerto Rico', 'PR'),
- generateDialPlanData('1', '39', 'Canada', 'CA'),
- ];
- }}
- />,
- ]}
- >
-
- ,
- ]}
- />
- , SetCountryCode]}
- />
-
-
- );
- }
-}
diff --git a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4779.test.tsx b/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4779.test.tsx
deleted file mode 100644
index 322c26f4e..000000000
--- a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-4779.test.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * RCI-4779: Check C2D for account permission
- * https://test_it_domain/test-cases/RCI-4779
- * Preconditions:
- * The user has logged into 3rd party.
- * The status of Click to Dial/SMS isON
- * The user has logged into RC CTI App with below accountAccountHasRingOutPermissionHasWebPhonePermissionCallingWithShowC2DATrueTrueBrowserTrueBTrueTrueJupiterTrueCTrueTrueSoftPhoneTrueDTrueTrueRingOutTrueETrueFalseJupiterTrueFTrueFalseSoftPhoneTrueGTrueFalseRingOutTrueHFalseTrueBrowserTrueIFalseTrueJupiterTrueJFalseTrueSoftPhoneTrueKFalseFalseFalse
- *
- | Account |HasRingOutPermission |HasWebPhonePermission |CallingWith |ShowC2D |
- | A |True |True |Browser |True |
- | B |True |True |Jupiter |True |
- | C |True |True |SoftPhone |True |
- | D |True |True |RingOut |True |
- | E |True |False |Jupiter |True |
- | F |True |False |SoftPhone |True |
- | G |True |False |RingOut |True |
- | H |False |True |Browser |True |
- | I |False |True |Jupiter |True |
- | J |False |True |SoftPhone |True |
- | K |False |False | |False |
-
- * Entry point(/s):
- * Login CTI with{Account} > Set calling setting as {CallingWith} > Go to any website (not in blocklists) with phone number(eg: +125048373812)
- */
-import {
- p2,
- it,
- autorun,
- title,
- common,
-} from '@ringcentral-integration/test-utils';
-
-import { ClickToCallPermissionBasic } from '../../../../../../../../ringcentral-js-widgets/ringcentral-integration/test/spec-lib/permissionsHelper.test';
-
-@autorun(test)
-@it
-@p2
-@common
-@title('common Check C2D for account permission')
-export class RCI4779 extends ClickToCallPermissionBasic {}
diff --git a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-5598.spec.tsx b/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-5598.spec.tsx
deleted file mode 100644
index 98ad47ff5..000000000
--- a/packages/ringcentral-widgets-test/test/features/CommonWidgets/CrossModule/ClickToDialSms/Checkpoint/RCI-5598.spec.tsx
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * RCI-5598: Should not keep area code value when area code field is hidden
- * https://test_it_domain/test-cases/RCI-5598
- * Preconditions:
- * The user has logged into 3rd party.
- * The user has logged into RC CTI App
- * The status of Click to Dial/SMS isON
- * The userregionisCA
- * Entry point(/s):
- * 1.User is on a old version
- * 2. User change area code to '280' in area code field
- */
-import {
- p2,
- it,
- Given,
- And,
- autorun,
- examples,
- StepProp,
- Scenario,
- Step,
- title,
- common,
- When,
- Then,
-} from '@ringcentral-integration/test-utils';
-
-import { generateDialPlanData } from '../../../../../__mock__/generateDialPlanData';
-import { CommonLogin } from '../../../../../steps/CommonLogin';
-import { CreateInstance } from '../../../../../steps/CreateInstance';
-import {
- CreateMock,
- MockDialingPlan,
- MockExtensionInfo,
-} from '../../../../../steps/Mock';
-import { NavigateToSettings } from '../../../../../steps/Navigate';
-import { ClickLogoutButton } from '../../../../../steps/Settings';
-
-@autorun(test.skip)
-@p2
-@title('Should not keep area code value when area code field is hidden')
-export class RCI5598 extends Step {
- Login: StepProp = (props) => (
-
- );
- CreateMock: StepProp = CreateMock;
- Logout: StepProp = ClickLogoutButton;
- run() {
- const { CreateMock, Login, Entry, Logout } = this;
- return (
-
- {
- mockData.regionalSettings.homeCountry.isoCode = 'CA';
- return mockData;
- }}
- />,
- {
- return [generateDialPlanData('1', '39', 'Canada', 'CA')];
- }}
- />,
- Login,
- () => {
- this.context.phone.regionSettings._setData({
- areaCode: '841',
- });
- expect(this.context.phone.regionSettings.areaCode).toBe('841');
- },
- NavigateToSettings,
- Logout,
- ,
- {
- mockData.regionalSettings.homeCountry.isoCode = 'CA';
- return mockData;
- }}
- />,
- {
- return [generateDialPlanData('1', '39', 'Canada', 'CA')];
- }}
- />,
- ]}
- />
-
- {
- expect(this.context.phone.regionSettings.areaCode).toBe('');
- }}
- />
-
- );
- }
-}
diff --git a/yarn.lock b/yarn.lock
index 52ffa5bd3..fe705635d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -11874,11 +11874,6 @@ module-deps@^4.0.8:
through2 "^2.0.0"
xtend "^4.0.0"
-moment@^2.29.4:
- version "2.30.1"
- resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
- integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==
-
moo@^0.5.0:
version "0.5.1"
resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.1.tgz#7aae7f384b9b09f620b6abf6f74ebbcd1b65dbc4"