Skip to content

Commit fb13592

Browse files
committed
feat(*): migrate telecom to ovhcloud.com domain
Update login and logout functions to navigate to common auth Update applications bff mock response Update hard-coded manager telecom URLs ref: #MANAGER-18470 Signed-off-by: Anoop N <[email protected]>
1 parent a058303 commit fb13592

File tree

8 files changed

+65
-102
lines changed

8 files changed

+65
-102
lines changed

packages/manager-tools/manager-legacy-tools/test-utils/src/auth/applications.mock.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ export const applications = {
2929
},
3030
telecom: {
3131
universe: 'telecom',
32-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
32+
url: 'https://manager.eu.ovhcloud.com/telecom/',
3333
container: { isDefault: false, enabled: true, path: 'telecom' },
34-
publicURL: 'https://www.ovhtelecom.fr/manager/#/telecom',
34+
publicURL: 'https://manager.eu.ovhcloud.com/#/telecom',
3535
},
3636
web: {
3737
universe: 'web',
@@ -76,33 +76,33 @@ export const applications = {
7676
},
7777
telephony: {
7878
universe: 'telecom',
79-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
79+
url: 'https://manager.eu.ovhcloud.com/telecom/',
8080
container: { isDefault: false },
81-
publicURL: 'https://www.ovhtelecom.fr/manager/telecom/',
81+
publicURL: 'https://manager.eu.ovhcloud.com/telecom/',
8282
},
8383
'pack-xdsl': {
8484
universe: 'telecom',
85-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
85+
url: 'https://manager.eu.ovhcloud.com/telecom/',
8686
container: { isDefault: false },
87-
publicURL: 'https://www.ovhtelecom.fr/manager/telecom/',
87+
publicURL: 'https://manager.eu.ovhcloud.com/telecom/',
8888
},
8989
overthebox: {
9090
universe: 'telecom',
91-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
91+
url: 'https://manager.eu.ovhcloud.com/telecom/',
9292
container: { isDefault: false },
93-
publicURL: 'https://www.ovhtelecom.fr/manager/telecom/',
93+
publicURL: 'https://manager.eu.ovhcloud.com/telecom/',
9494
},
9595
freefax: {
9696
universe: 'telecom',
97-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
97+
url: 'https://manager.eu.ovhcloud.com/telecom/',
9898
container: { isDefault: false },
99-
publicURL: 'https://www.ovhtelecom.fr/manager/telecom/',
99+
publicURL: 'https://manager.eu.ovhcloud.com/telecom/',
100100
},
101101
sms: {
102102
universe: 'telecom',
103-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
103+
url: 'https://manager.eu.ovhcloud.com/telecom/',
104104
container: { isDefault: false },
105-
publicURL: 'https://www.ovhtelecom.fr/manager/telecom/',
105+
publicURL: 'https://manager.eu.ovhcloud.com/telecom/',
106106
},
107107
catalog: {
108108
universe: 'hub',

packages/manager/apps/container/src/container/legacy/server-sidebar/order/shop-config/order.constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export const ORDER_URLS: Record<
300300
FR: 'https://www.ovhtelecom.fr/sharepoint/?range=mail',
301301
},
302302
telephony_accessory_order: {
303-
FR: 'https://www.ovhtelecom.fr/manager/#/telecom/orders/accessories',
303+
FR: 'https://manager.eu.ovhcloud.com/#/telecom/orders/accessories',
304304
},
305305
telephony_voip: {
306306
FR: 'https://www.ovhtelecom.fr/telephonie/voip/',

packages/manager/core/sso/src/__tests__/sso.spec.ts

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ describe('sso module', () => {
4545
it('With Telecom', () => {
4646
vi.stubGlobal('window', {
4747
location: {
48-
host: 'www.ovhtelecom.fr',
49-
hostname: 'www.ovhtelecom.fr',
50-
href: 'https://www.ovhtelecom.fr/manager/#/telecom/',
48+
host: 'manager.eu.ovhcloud.com',
49+
hostname: 'manager.eu.ovhcloud.com',
50+
href: 'https://manager.eu.ovhcloud.com/#/telecom/',
5151
hash: '#/telecom/',
5252
assign: vi.fn(),
5353
},
@@ -144,22 +144,6 @@ describe('sso module', () => {
144144
);
145145
});
146146

147-
it('For telecom application', () => {
148-
vi.stubGlobal('window', {
149-
location: {
150-
host: 'www.ovhtelecom.fr',
151-
href: 'https://www.ovhtelecom.fr/manager/#/telecom/',
152-
hash: '#/telecom/',
153-
assign: vi.fn(),
154-
},
155-
});
156-
const windowLocationSpy = vi.spyOn(window.location, 'assign');
157-
redirectToLoginPage();
158-
expect(windowLocationSpy).toHaveBeenCalledWith(
159-
'https://www.ovh.com/auth/?onsuccess=https%3A%2F%2Fwww.ovhtelecom.fr%2Fmanager%2F%23%2Ftelecom%2F',
160-
);
161-
});
162-
163147
it('logins in development mode', () => {
164148
vi.stubGlobal('window', {
165149
location: {
@@ -206,22 +190,6 @@ describe('sso module', () => {
206190
);
207191
});
208192

209-
it('For telecom application', () => {
210-
vi.stubGlobal('window', {
211-
location: {
212-
host: 'www.ovhtelecom.fr',
213-
href: 'https://www.ovhtelecom.fr/manager/#/telecom/',
214-
hash: '#/telecom/',
215-
assign: vi.fn(),
216-
},
217-
});
218-
const windowLocationSpy = vi.spyOn(window.location, 'assign');
219-
redirectToLogoutPage();
220-
expect(windowLocationSpy).toHaveBeenCalledWith(
221-
'https://www.ovh.com/auth/?action=disconnect&onsuccess=https%3A%2F%2Fwww.ovhtelecom.fr%2Fmanager%2F%23%2Ftelecom%2F',
222-
);
223-
});
224-
225193
it('logouts in development mode', () => {
226194
vi.stubGlobal('window', {
227195
location: {

packages/manager/core/sso/src/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,10 @@ const redirectTo = (url: string) => {
88
return window.location.assign(url);
99
};
1010

11-
const isOvhTelecom = () => window.location.host === 'www.ovhtelecom.fr';
12-
1311
export const getAuthUrl = () => {
1412
if (window.location.hostname === 'localhost') {
1513
return '/auth/';
1614
}
17-
if (isOvhTelecom()) {
18-
return DEFAULT_SSO_AUTH_URL.EU;
19-
}
2015
const [, region] = window.location.host.split('.');
2116
return DEFAULT_SSO_AUTH_URL[`${(region || 'eu').toUpperCase() as REGION}`];
2217
};

packages/manager/modules/order/src/order.constant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ export const ORDER_URLS: Record<'EU' | 'CA' | 'US', Record<string, Record<string
385385
FR: 'https://www.ovhtelecom.fr/sharepoint/?range=mail',
386386
},
387387
telephony_accessory_order: {
388-
FR: 'https://www.ovhtelecom.fr/manager/#/telecom/orders/accessories',
388+
FR: 'https://manager.eu.ovhcloud.com/#/telecom/orders/accessories',
389389
},
390390
telephony_voip: {
391391
FR: 'https://www.ovhtelecom.fr/telephonie/voip/',

playwright-helpers/mocks/auth/applications.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
},
3030
"telecom": {
3131
"universe": "telecom",
32-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
32+
"url": "https://manager.eu.ovhcloud.com/telecom/",
3333
"container": { "isDefault": false, "enabled": true, "path": "telecom" },
34-
"publicURL": "https://www.ovhtelecom.fr/manager/#/telecom"
34+
"publicURL": "https://manager.eu.ovhcloud.com/#/telecom"
3535
},
3636
"web": {
3737
"universe": "web",
@@ -76,33 +76,33 @@
7676
},
7777
"telephony": {
7878
"universe": "telecom",
79-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
79+
"url": "https://manager.eu.ovhcloud.com/telecom/",
8080
"container": { "isDefault": false },
81-
"publicURL": "https://www.ovhtelecom.fr/manager/telecom/"
81+
"publicURL": "https://manager.eu.ovhcloud.com/telecom/"
8282
},
8383
"pack-xdsl": {
8484
"universe": "telecom",
85-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
85+
"url": "https://manager.eu.ovhcloud.com/telecom/",
8686
"container": { "isDefault": false },
87-
"publicURL": "https://www.ovhtelecom.fr/manager/telecom/"
87+
"publicURL": "https://manager.eu.ovhcloud.com/telecom/"
8888
},
8989
"overthebox": {
9090
"universe": "telecom",
91-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
91+
"url": "https://manager.eu.ovhcloud.com/telecom/",
9292
"container": { "isDefault": false },
93-
"publicURL": "https://www.ovhtelecom.fr/manager/telecom/"
93+
"publicURL": "https://manager.eu.ovhcloud.com/telecom/"
9494
},
9595
"freefax": {
9696
"universe": "telecom",
97-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
97+
"url": "https://manager.eu.ovhcloud.com/telecom/",
9898
"container": { "isDefault": false },
99-
"publicURL": "https://www.ovhtelecom.fr/manager/telecom/"
99+
"publicURL": "https://manager.eu.ovhcloud.com/telecom/"
100100
},
101101
"sms": {
102102
"universe": "telecom",
103-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
103+
"url": "https://manager.eu.ovhcloud.com/telecom/",
104104
"container": { "isDefault": false },
105-
"publicURL": "https://www.ovhtelecom.fr/manager/telecom/"
105+
"publicURL": "https://manager.eu.ovhcloud.com/telecom/"
106106
},
107107
"catalog": {
108108
"universe": "hub",

playwright-helpers/mocks/auth/configuration.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ export const getConfigurationResponse = ({ region = defaultRegion }): any => ({
1010
dedicated: 'https://www.ovh.com/manager/dedicated/',
1111
hub: 'https://www.ovh.com/manager/hub/',
1212
'public-cloud': 'https://www.ovh.com/manager/public-cloud/',
13-
telecom: 'https://www.ovhtelecom.fr/manager/telecom/',
13+
telecom: 'https://manager.eu.ovhcloud.com/telecom/',
1414
web: 'https://www.ovh.com/manager/web/',
1515
sunrise: 'https://www.ovh.com/manager/sunrise/',
1616
billing: 'https://www.ovh.com/manager/dedicated/#/billing',
1717
user: 'https://www.ovh.com/manager/dedicated/',
1818
exchange: 'https://www.ovh.com/manager/web/',
1919
sharepoint: 'https://www.ovh.com/manager/web/',
2020
office: 'https://www.ovh.com/manager/web/',
21-
telephony: 'https://www.ovhtelecom.fr/manager/telecom/',
22-
'pack-xdsl': 'https://www.ovhtelecom.fr/manager/telecom/',
23-
overthebox: 'https://www.ovhtelecom.fr/manager/telecom/',
24-
freefax: 'https://www.ovhtelecom.fr/manager/telecom/',
25-
sms: 'https://www.ovhtelecom.fr/manager/telecom/',
21+
telephony: 'https://manager.eu.ovhcloud.com/telecom/',
22+
'pack-xdsl': 'https://manager.eu.ovhcloud.com/telecom/',
23+
overthebox: 'https://manager.eu.ovhcloud.com/telecom/',
24+
freefax: 'https://manager.eu.ovhcloud.com/telecom/',
25+
sms: 'https://manager.eu.ovhcloud.com/telecom/',
2626
catalog: 'https://www.ovh.com/manager/catalog',
2727
iam: 'https://www.ovh.com/manager/security',
2828
'carbon-calculator': 'https://www.ovh.com/manager/carbon-calculator/',
@@ -63,9 +63,9 @@ export const getConfigurationResponse = ({ region = defaultRegion }): any => ({
6363
},
6464
telecom: {
6565
universe: 'telecom',
66-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
66+
url: 'https://manager.eu.ovhcloud.com/telecom/',
6767
container: { isDefault: false, enabled: true, path: 'telecom' },
68-
publicURL: 'https://www.ovhtelecom.fr/manager/#/telecom',
68+
publicURL: 'https://manager.eu.ovhcloud.com/#/telecom',
6969
},
7070
web: {
7171
universe: 'web',
@@ -110,33 +110,33 @@ export const getConfigurationResponse = ({ region = defaultRegion }): any => ({
110110
},
111111
telephony: {
112112
universe: 'telecom',
113-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
113+
url: 'https://manager.eu.ovhcloud.com/telecom/',
114114
container: { isDefault: false },
115-
publicURL: 'https://www.ovhtelecom.fr/manager/telecom/',
115+
publicURL: 'https://manager.eu.ovhcloud.com/telecom/',
116116
},
117117
'pack-xdsl': {
118118
universe: 'telecom',
119-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
119+
url: 'https://manager.eu.ovhcloud.com/telecom/',
120120
container: { isDefault: false },
121-
publicURL: 'https://www.ovhtelecom.fr/manager/telecom/',
121+
publicURL: 'https://manager.eu.ovhcloud.com/telecom/',
122122
},
123123
overthebox: {
124124
universe: 'telecom',
125-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
125+
url: 'https://manager.eu.ovhcloud.com/telecom/',
126126
container: { isDefault: false },
127-
publicURL: 'https://www.ovhtelecom.fr/manager/telecom/',
127+
publicURL: 'https://manager.eu.ovhcloud.com/telecom/',
128128
},
129129
freefax: {
130130
universe: 'telecom',
131-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
131+
url: 'https://manager.eu.ovhcloud.com/telecom/',
132132
container: { isDefault: false },
133-
publicURL: 'https://www.ovhtelecom.fr/manager/telecom/',
133+
publicURL: 'https://manager.eu.ovhcloud.com/telecom/',
134134
},
135135
sms: {
136136
universe: 'telecom',
137-
url: 'https://www.ovhtelecom.fr/manager/telecom/',
137+
url: 'https://manager.eu.ovhcloud.com/telecom/',
138138
container: { isDefault: false },
139-
publicURL: 'https://www.ovhtelecom.fr/manager/telecom/',
139+
publicURL: 'https://manager.eu.ovhcloud.com/telecom/',
140140
},
141141
catalog: {
142142
universe: 'hub',

playwright-helpers/mocks/auth/configurations.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@
5656
"dedicated": "https://www.ovh.com/manager/dedicated/",
5757
"hub": "https://www.ovh.com/manager/hub/",
5858
"public-cloud": "https://www.ovh.com/manager/public-cloud/",
59-
"telecom": "https://www.ovhtelecom.fr/manager/telecom/",
59+
"telecom": "https://manager.eu.ovhcloud.com/telecom/",
6060
"web": "https://www.ovh.com/manager/web/",
6161
"sunrise": "https://www.ovh.com/manager/sunrise/",
6262
"billing": "https://www.ovh.com/manager/dedicated/#/billing",
6363
"user": "https://www.ovh.com/manager/dedicated/",
6464
"exchange": "https://www.ovh.com/manager/web/",
6565
"sharepoint": "https://www.ovh.com/manager/web/",
6666
"office": "https://www.ovh.com/manager/web/",
67-
"telephony": "https://www.ovhtelecom.fr/manager/telecom/",
68-
"pack-xdsl": "https://www.ovhtelecom.fr/manager/telecom/",
69-
"overthebox": "https://www.ovhtelecom.fr/manager/telecom/",
70-
"freefax": "https://www.ovhtelecom.fr/manager/telecom/",
71-
"sms": "https://www.ovhtelecom.fr/manager/telecom/",
67+
"telephony": "https://manager.eu.ovhcloud.com/telecom/",
68+
"pack-xdsl": "https://manager.eu.ovhcloud.com/telecom/",
69+
"overthebox": "https://manager.eu.ovhcloud.com/telecom/",
70+
"freefax": "https://manager.eu.ovhcloud.com/telecom/",
71+
"sms": "https://manager.eu.ovhcloud.com/telecom/",
7272
"catalog": "https://www.ovh.com/manager/catalog",
7373
"iam": "https://www.ovh.com/manager/security",
7474
"carbon-calculator": "https://www.ovh.com/manager/carbon-calculator/",
@@ -109,9 +109,9 @@
109109
},
110110
"telecom": {
111111
"universe": "telecom",
112-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
112+
"url": "https://manager.eu.ovhcloud.com/telecom/",
113113
"container": { "isDefault": false, "enabled": true, "path": "telecom" },
114-
"publicURL": "https://www.ovhtelecom.fr/manager/#/telecom"
114+
"publicURL": "https://manager.eu.ovhcloud.com/#/telecom"
115115
},
116116
"web": {
117117
"universe": "web",
@@ -156,33 +156,33 @@
156156
},
157157
"telephony": {
158158
"universe": "telecom",
159-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
159+
"url": "https://manager.eu.ovhcloud.com/telecom/",
160160
"container": { "isDefault": false },
161-
"publicURL": "https://www.ovhtelecom.fr/manager/telecom/"
161+
"publicURL": "https://manager.eu.ovhcloud.com/telecom/"
162162
},
163163
"pack-xdsl": {
164164
"universe": "telecom",
165-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
165+
"url": "https://manager.eu.ovhcloud.com/telecom/",
166166
"container": { "isDefault": false },
167-
"publicURL": "https://www.ovhtelecom.fr/manager/telecom/"
167+
"publicURL": "https://manager.eu.ovhcloud.com/telecom/"
168168
},
169169
"overthebox": {
170170
"universe": "telecom",
171-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
171+
"url": "https://manager.eu.ovhcloud.com/telecom/",
172172
"container": { "isDefault": false },
173-
"publicURL": "https://www.ovhtelecom.fr/manager/telecom/"
173+
"publicURL": "https://manager.eu.ovhcloud.com/telecom/"
174174
},
175175
"freefax": {
176176
"universe": "telecom",
177-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
177+
"url": "https://manager.eu.ovhcloud.com/telecom/",
178178
"container": { "isDefault": false },
179-
"publicURL": "https://www.ovhtelecom.fr/manager/telecom/"
179+
"publicURL": "https://manager.eu.ovhcloud.com/telecom/"
180180
},
181181
"sms": {
182182
"universe": "telecom",
183-
"url": "https://www.ovhtelecom.fr/manager/telecom/",
183+
"url": "https://manager.eu.ovhcloud.com/telecom/",
184184
"container": { "isDefault": false },
185-
"publicURL": "https://www.ovhtelecom.fr/manager/telecom/"
185+
"publicURL": "https://manager.eu.ovhcloud.com/telecom/"
186186
},
187187
"catalog": {
188188
"universe": "hub",

0 commit comments

Comments
 (0)