Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
"packages/manager/apps/web-office",
"packages/manager/apps/zimbra",
"packages/manager/apps/pci-instances"
"packages/manager/apps/pci-instances",
"packages/manager/apps/web-hosting"
]
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"packages/manager/apps/vrack-services",
"packages/manager/apps/web",
"packages/manager/apps/web-domains",
"packages/manager/apps/web-hosting",
"packages/manager/apps/web-ongoing-operations",
"packages/manager/core/api",
"packages/manager/core/application",
Expand Down
26 changes: 13 additions & 13 deletions packages/manager/apps/web-hosting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@hookform/resolvers": "^5.0.1",
"@ovh-ux/manager-common-translations": "^0.22.0",
"@ovh-ux/manager-config": "^8.6.8",
"@ovh-ux/manager-core-api": "^0.11.1",
"@ovh-ux/manager-core-api": "^0.19.0",
"@ovh-ux/manager-core-utils": "^0.4.7",
"@ovh-ux/manager-react-components": "^2.43.1",
"@ovh-ux/manager-react-core-application": "^0.12.12",
Expand All @@ -37,28 +37,28 @@
"@tanstack/react-table": "^8.20.1",
"clsx": "2.1.1",
"export-to-csv": "^1.4.0",
"i18next": "^23.8.2",
"i18next-http-backend": "^2.5.0",
"i18next": "23.8.2",
"i18next-http-backend": "2.7.3",
"ipaddr.js": "^1.9.1",
"p-limit": "^6.2.0",
"punycode": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.55.0",
"react-i18next": "^14.0.5",
"react-router-dom": "^6.3.0",
"react-use": "^17.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.56.0",
"react-i18next": "14.1.0",
"react-router-dom": "6.16.0",
"react-use": "17.5.0",
"tailwindcss": "^3.4.4",
"zod": "^3.24.2"
},
"devDependencies": {
"@ovh-ux/manager-static-analysis-kit": "^0.12.0",
"@ovh-ux/manager-tests-setup": "latest",
"@ovh-ux/manager-vite-config": "^0.14.1",
"@tanstack/react-query-devtools": "^5.51.21",
"@types/jest": "^29.5.12",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19"
"@tanstack/react-query-devtools": "5.51.21",
"@types/jest": "29.5.12",
"@types/react": "18.2.55",
"@types/react-dom": "18.3.0"
},
"regions": [
"EU",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hosting_tab_LOCAL_SEO": "Visibility Pro",
"hosting_tab_LOCAL_SEO_description": "Seien Sie dort prΓ€sent, wo Ihre Kund:innen Sie suchen, aber auch dort, wo sie ΓΌber Sie sprechen. Mit dieser LΓΆsung fΓΌr lokale Referenzierung verwalten Sie die Informationen zu Ihrem Unternehmen und Kontaktdaten auf Referenzierungsplattformen und Kundenbewertungsportalen ΓΌber ein einziges intuitives Interface.",
"hosting_dashboard_local_seo_visibility_check": "Überprüfen Sie Ihre lokale Referenzierung.",
"hosting_tab_LOCAL_SEO_table_header_name": "Name des Unternehmens",
"hosting_tab_LOCAL_SEO_table_header_email": "E-Mail-Account",
"hosting_tab_LOCAL_SEO_table_header_address": "Adresse",
"hosting_tab_LOCAL_SEO_table_value_undefined": "Zu definieren",
"hosting_tab_LOCAL_SEO_state_created": "OK",
"hosting_tab_LOCAL_SEO_state_creating": "Wird erstellt",
"hosting_tab_LOCAL_SEO_state_deleting": "Wird gelΓΆscht",
"hosting_tab_LOCAL_SEO_access_interface": "Zum Interface",
"hosting_tab_LOCAL_SEO_delete": "Abonnement lΓΆschen",
"hosting_tab_LOCAL_SEO_delete_confirm": "Sind Sie sicher, dass Sie Ihr β€žVisibility Proβ€œ Abonnement fΓΌr den folgenden Account kΓΌndigen mΓΆchten?",
"hosting_tab_LOCAL_SEO_delete_success": "Die LΓΆschung des β€žVisibility Proβ€œ Abonnements wurde registriert.",
"hosting_tab_LOCAL_SEO_delete_error": "Beim LΓΆschen Ihres β€žVisibility Proβ€œ Abonnements ist ein Fehler aufgetreten. {{error}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hosting_tab_LOCAL_SEO": "Visibility Pro",
"hosting_tab_LOCAL_SEO_description": "Ensure that your company appears when your customers search for you, and where you do business. With this local SEO ranking solution, you can manage your company information and contact details on SEO platforms and customer review platforms - and you can do this all via a unique, intuitive interface.",
"hosting_dashboard_local_seo_visibility_check": "Check your local online presence",
"hosting_tab_LOCAL_SEO_table_header_name": "Company name",
"hosting_tab_LOCAL_SEO_table_header_email": "Email account",
"hosting_tab_LOCAL_SEO_table_header_address": "Address",
"hosting_tab_LOCAL_SEO_table_value_undefined": "To be defined",
"hosting_tab_LOCAL_SEO_state_created": "OK",
"hosting_tab_LOCAL_SEO_state_creating": "Creating...",
"hosting_tab_LOCAL_SEO_state_deleting": "Deleting...",
"hosting_tab_LOCAL_SEO_access_interface": "Access the interface",
"hosting_tab_LOCAL_SEO_delete": "Remove the subscription",
"hosting_tab_LOCAL_SEO_delete_confirm": "Are you sure you want to cancel your Visibility Pro account?",
"hosting_tab_LOCAL_SEO_delete_success": "Your cancellation request for this Visibility Pro account has been successfully submitted.",
"hosting_tab_LOCAL_SEO_delete_error": "An error has occurred cancelling your Pro Visibility subscription: {{error}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hosting_tab_LOCAL_SEO": "Visibilidad Pro",
"hosting_tab_LOCAL_SEO_description": "Aparezca no solo donde sus clientes le buscan, sino tambiΓ©n donde hablan de usted. Esta soluciΓ³n de posicionamiento local le permite gestionar, a travΓ©s de una intuitiva interfaz ΓΊnica, la informaciΓ³n y los datos de su empresa en las plataformas de posicionamiento y de opiniones de clientes.",
"hosting_dashboard_local_seo_visibility_check": "Compruebe su posicionamiento local",
"hosting_tab_LOCAL_SEO_table_header_name": "Nombre de la empresa",
"hosting_tab_LOCAL_SEO_table_header_email": "Cuenta de correo electrΓ³nico",
"hosting_tab_LOCAL_SEO_table_header_address": "DirecciΓ³n",
"hosting_tab_LOCAL_SEO_table_value_undefined": "Por determinar",
"hosting_tab_LOCAL_SEO_state_created": "OK",
"hosting_tab_LOCAL_SEO_state_creating": "Creando...",
"hosting_tab_LOCAL_SEO_state_deleting": "Eliminando...",
"hosting_tab_LOCAL_SEO_access_interface": "Acceder al panel",
"hosting_tab_LOCAL_SEO_delete": "Eliminar la suscripciΓ³n",
"hosting_tab_LOCAL_SEO_delete_confirm": "ΒΏSeguro que quiere dar de baja la suscripciΓ³n Β«Visibilidad ProΒ» para la siguiente cuenta?",
"hosting_tab_LOCAL_SEO_delete_success": "La solicitud de eliminaciΓ³n de la suscripciΓ³n Β«Visibilidad ProΒ» se ha enviado.",
"hosting_tab_LOCAL_SEO_delete_error": "Se ha producido un error al eliminar la suscripciΓ³n Β«Visibilidad ProΒ». {{error}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hosting_tab_LOCAL_SEO": "VisibilitΓ© Pro",
"hosting_tab_LOCAL_SEO_description": "Soyez prΓ©sents lΓ  oΓΉ vos clients vous cherchent, mais aussi lΓ  oΓΉ ils parlent de vous. Cette solution de rΓ©fΓ©rencement local vous permet de gΓ©rer, via une interface unique et intuitive, vos informations et coordonnΓ©es d'entreprise sur les plateformes de rΓ©fΓ©rencement et d'avis client.",
"hosting_dashboard_local_seo_visibility_check": "VΓ©rifiez votre rΓ©fΓ©rencement local",
"hosting_tab_LOCAL_SEO_table_header_name": "Nom de l'entreprise",
"hosting_tab_LOCAL_SEO_table_header_email": "Compte Email",
"hosting_tab_LOCAL_SEO_table_header_address": "Adresse",
"hosting_tab_LOCAL_SEO_table_value_undefined": "Γ€ dΓ©finir",
"hosting_tab_LOCAL_SEO_state_created": "OK",
"hosting_tab_LOCAL_SEO_state_creating": "CrΓ©ation en cours",
"hosting_tab_LOCAL_SEO_state_deleting": "Suppression en cours",
"hosting_tab_LOCAL_SEO_access_interface": "AccΓ©der Γ  l'interface",
"hosting_tab_LOCAL_SEO_delete": "Supprimer l'abonnement",
"hosting_tab_LOCAL_SEO_delete_confirm": "Êtes-vous sûr de vouloir résilier votre abonnement «Visibilité Pro» pour le compte suivant ?",
"hosting_tab_LOCAL_SEO_delete_success": "La suppression de l'abonnement Β«VisibilitΓ© ProΒ» a bien Γ©tΓ© prise en compte.",
"hosting_tab_LOCAL_SEO_delete_error": "Une erreur est survenue lors de la suppression de votre abonnement Β«VisibilitΓ© ProΒ». {{error}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hosting_tab_LOCAL_SEO": "VisibilitΓ© Pro",
"hosting_tab_LOCAL_SEO_description": "Soyez prΓ©sents lΓ  oΓΉ vos clients vous cherchent, mais aussi lΓ  oΓΉ ils parlent de vous. Cette solution de rΓ©fΓ©rencement local vous permet de gΓ©rer, via une interface unique et intuitive, vos informations et coordonnΓ©es d'entreprise sur les plateformes de rΓ©fΓ©rencement et d'avis client.",
"hosting_dashboard_local_seo_visibility_check": "VΓ©rifiez votre rΓ©fΓ©rencement local",
"hosting_tab_LOCAL_SEO_table_header_name": "Nom de l'entreprise",
"hosting_tab_LOCAL_SEO_table_header_email": "Compte Email",
"hosting_tab_LOCAL_SEO_table_header_address": "Adresse",
"hosting_tab_LOCAL_SEO_table_value_undefined": "Γ€ dΓ©finir",
"hosting_tab_LOCAL_SEO_state_created": "OK",
"hosting_tab_LOCAL_SEO_state_creating": "CrΓ©ation en cours",
"hosting_tab_LOCAL_SEO_state_deleting": "Suppression en cours",
"hosting_tab_LOCAL_SEO_access_interface": "AccΓ©der Γ  l'interface",
"hosting_tab_LOCAL_SEO_delete": "Supprimer l'abonnement",
"hosting_tab_LOCAL_SEO_delete_confirm": "Êtes-vous sûr de vouloir résilier votre abonnement «Visibilité Pro» pour le compte suivant ?",
"hosting_tab_LOCAL_SEO_delete_success": "La suppression de l'abonnement Β«VisibilitΓ© ProΒ» a bien Γ©tΓ© prise en compte.",
"hosting_tab_LOCAL_SEO_delete_error": "Une erreur est survenue lors de la suppression de votre abonnement Β«VisibilitΓ© ProΒ». {{error}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hosting_tab_LOCAL_SEO": "Visibility Pro",
"hosting_tab_LOCAL_SEO_description": "Assicurati che la tua azienda sia visibile nel momento in cui i tuoi clienti la cercano o ne parlano. Questa soluzione di referenziamento locale ti consente di gestire, attraverso un'interfaccia unica e intuitiva, le informazioni e le coordinate della tua azienda sulle piattaforme di SEO e recensioni dei clienti.",
"hosting_dashboard_local_seo_visibility_check": "Verifica il tuo posizionamento locale",
"hosting_tab_LOCAL_SEO_table_header_name": "Nome dell'azienda",
"hosting_tab_LOCAL_SEO_table_header_email": "Account email",
"hosting_tab_LOCAL_SEO_table_header_address": "Indirizzo",
"hosting_tab_LOCAL_SEO_table_value_undefined": "Da definire",
"hosting_tab_LOCAL_SEO_state_created": "OK",
"hosting_tab_LOCAL_SEO_state_creating": "Creazione in corso...",
"hosting_tab_LOCAL_SEO_state_deleting": "Eliminazione in corso...",
"hosting_tab_LOCAL_SEO_access_interface": "Accedi all'interfaccia",
"hosting_tab_LOCAL_SEO_delete": "Elimina l'abbonamento",
"hosting_tab_LOCAL_SEO_delete_confirm": "Vuoi davvero cancellare l'abbonamento \"Visibility Pro\" per il seguente account?",
"hosting_tab_LOCAL_SEO_delete_success": "La cancellazione dell'abbonamento \"Visibility Pro\" Γ¨ in fase di elaborazione.",
"hosting_tab_LOCAL_SEO_delete_error": "Si Γ¨ verificato un errore durante la cancellazione del tuo abbonamento \"Visibility Pro\": {{error}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hosting_tab_LOCAL_SEO": "Widoczna firma",
"hosting_tab_LOCAL_SEO_description": "Bądź obecny tam, gdzie szukają Cię Twoi klienci, ale również wszędzie, gdzie o Tobie mówią. Narzędzie do lokalnego pozycjonowania pozwala w prosty sposób zarządzać informacjami o Twojej firmie w internecie i w serwisach z opiniami klientów.",
"hosting_dashboard_local_seo_visibility_check": "SprawdΕΊ TwojΔ… lokalnΔ… obecnoΕ›Δ‡",
"hosting_tab_LOCAL_SEO_table_header_name": "Nazwa firmy",
"hosting_tab_LOCAL_SEO_table_header_email": "Konto e-mail",
"hosting_tab_LOCAL_SEO_table_header_address": "Adres",
"hosting_tab_LOCAL_SEO_table_value_undefined": "Do okreΕ›lenia",
"hosting_tab_LOCAL_SEO_state_created": "OK",
"hosting_tab_LOCAL_SEO_state_creating": "Trwa tworzenie",
"hosting_tab_LOCAL_SEO_state_deleting": "Trwa usuwanie",
"hosting_tab_LOCAL_SEO_access_interface": "Zaloguj siΔ™ do interfejsu",
"hosting_tab_LOCAL_SEO_delete": "UsuΕ„ subskrypcjΔ™",
"hosting_tab_LOCAL_SEO_delete_confirm": "Czy na pewno chcesz zrezygnowaΔ‡ z subskrypcji pakietu β€žWidoczna firma\" dla tego konta?",
"hosting_tab_LOCAL_SEO_delete_success": "Ε»Δ…danie usuniΔ™cia subskrypcji pakietu β€žWidoczna firma\" zostaΕ‚o wysΕ‚ane.",
"hosting_tab_LOCAL_SEO_delete_error": "WystΔ…piΕ‚ bΕ‚Δ…d podczas usuwania subskrypcji pakietu β€žWidoczna firma\". {{error}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hosting_tab_LOCAL_SEO": "Visibilidade Pro",
"hosting_tab_LOCAL_SEO_description": "Esteja presente onde os seus clientes o procuram, mas tambΓ©m onde falam de si. Esta soluΓ§Γ£o de SEO local permite-lhe gerir, atravΓ©s de uma interface ΓΊnica e intuitiva, as suas informaΓ§Γ΅es e os dados da sua empresa nas plataformas de SEO e de opiniΓ΅es de clientes.",
"hosting_dashboard_local_seo_visibility_check": "Verifique o seu SEO local",
"hosting_tab_LOCAL_SEO_table_header_name": "Nome da empresa",
"hosting_tab_LOCAL_SEO_table_header_email": "Conta de e-mail",
"hosting_tab_LOCAL_SEO_table_header_address": "Morada",
"hosting_tab_LOCAL_SEO_table_value_undefined": "Por definir",
"hosting_tab_LOCAL_SEO_state_created": "OK",
"hosting_tab_LOCAL_SEO_state_creating": "CriaΓ§Γ£o em curso",
"hosting_tab_LOCAL_SEO_state_deleting": "EliminaΓ§Γ£o em curso",
"hosting_tab_LOCAL_SEO_access_interface": "Aceder Γ  interface",
"hosting_tab_LOCAL_SEO_delete": "Eliminar a subscriΓ§Γ£o",
"hosting_tab_LOCAL_SEO_delete_confirm": "Tem a certeza de que pretende cancelar a sua subscriΓ§Γ£o de \"Visibilidade Pro\" para a seguinte conta?",
"hosting_tab_LOCAL_SEO_delete_success": "A eliminaΓ§Γ£o da subscriΓ§Γ£o de \"Visibilidade Pro\" foi bem-sucedida.",
"hosting_tab_LOCAL_SEO_delete_error": "Ocorreu um erro ao eliminar a subscriΓ§Γ£o de \"Visibilidade Pro\". {{error}}"
}
10 changes: 10 additions & 0 deletions packages/manager/apps/web-hosting/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,13 @@ export enum ACTIONS {
ORDER = 'ORDER',
ATTACH = 'ATTACH',
}

export const LOCAL_SEO_VISIBILITY_CHECKER =
'https://www.ovh.com/fr/hebergement-web/referencement-local.xml';

export const LOCAL_SEO_ORDER_OPTIONS_SERVICE = {
FR: "https://www.ovh.com/fr/order/domain/#/legacy/domain/hosting/choose?options=~(flow~'hosting_existing_service~serviceName~'{serviceName})",
};

export const LOCAL_SEO_INTERFACE =
'https://localseo.hosting.ovh.net/{lang}/app/ovh?access_token={token}';
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from './webHostingDashboard';
export * from './ssl';
export * from './tasks';
export * from './managedWordpress/mocks';
export * from './localSeo';
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { LocalSeoType, SeoCountry, SeoOffer } from '../types/product/seo';
import { SeoStatus } from '../types/status';

export const localSeoMocks: LocalSeoType[] = [
{
accountId: 5424,
address: '2 rue Kellermann 59100 Roubaix',
country: SeoCountry.FR,
creationDate: '2025-08-25T13:17:39.620Z',
id: 0,
lastUpdate: '2025-08-25T13:17:39.620Z',
name: 'Mon entreprise de test',
offer: SeoOffer.NORMAL,
status: SeoStatus.CREATED,
taskId: 0,
},
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { describe, expect, vi } from 'vitest';

import { hostingDeleteLocation, hostingLocalSeoLogin } from '@/data/api/local-seo';

vi.mock('@ovh-ux/manager-core-api', () => ({
v6: {
get: vi.fn().mockReturnValue({ data: {}, headers: { 'x-pagination-total': '1' } }),
post: vi.fn().mockResolvedValue({ data: {} }),
},
}));

describe('hostingLocalSeoLogin', () => {
it('should call v6.post with the correct URL', async () => {
const serviceName = 'srv-123';
const accountId = 'accountId-123';

await hostingLocalSeoLogin(serviceName, accountId);

expect(hostingLocalSeoLogin).toHaveBeenCalledWith(serviceName, accountId);
});
});

describe('hostingDeleteLocation', () => {
it('should call v6.post with the correct URL', async () => {
const serviceName = 'srv-123';
const locationId = 'locationId-123';

await hostingDeleteLocation(serviceName, locationId);

expect(hostingDeleteLocation).toHaveBeenCalledWith(serviceName, locationId);
});
});
33 changes: 33 additions & 0 deletions packages/manager/apps/web-hosting/src/data/api/local-seo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { v6 } from '@ovh-ux/manager-core-api';

import { LocalSeoAccount } from '../types/product/seo';

export const getHostingLocalSeoAccount = async (
serviceName: string,
id: string,
): Promise<LocalSeoAccount> => {
const { data } = await v6.get<LocalSeoAccount>(
`/hosting/web/${serviceName}/localSeo/account/${id}`,
);
return data;
};

export const hostingLocalSeoLogin = async (
serviceName: string,
accountId: string,
): Promise<string> => {
const { data } = await v6.post<string>(
`/hosting/web/${serviceName}/localSeo/account/${accountId}/login`,
);
return data;
};

export const hostingDeleteLocation = async (
serviceName: string,
locationId: string,
): Promise<string> => {
const { data } = await v6.post<string>(
`/hosting/web/${serviceName}/localSeo/location/${locationId}/terminate`,
);
return data;
};
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ type UseManagedWordpressWebsitesParams = Omit<
> & {
defaultFQDN?: string;
shouldFetchAll?: boolean;
disableRefetchInterval?: boolean;
};

export const useManagedWordpressWebsites = (props: UseManagedWordpressWebsitesParams = {}) => {
const { defaultFQDN, shouldFetchAll, ...options } = props;
const { defaultFQDN, shouldFetchAll, disableRefetchInterval, ...options } = props;
const [allPages, setAllPages] = useState(!!shouldFetchAll);
const { serviceName } = useParams();
const searchParams = buildURLSearchParams({
Expand All @@ -54,7 +55,7 @@ export const useManagedWordpressWebsites = (props: UseManagedWordpressWebsitesPa
: typeof props.enabled !== 'boolean' || props.enabled,
getNextPageParam: (lastPage) => lastPage.cursorNext,
select: (data) => data?.pages.flatMap((page: WebsitesResponse) => page.data) ?? [],
refetchInterval: DATAGRID_REFRESH_INTERVAL,
refetchInterval: disableRefetchInterval ? false : DATAGRID_REFRESH_INTERVAL,
refetchOnMount: DATAGRID_REFRESH_ON_MOUNT,
});
const fetchAllPages = useCallback(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import '@testing-library/jest-dom';
import { act, renderHook, waitFor } from '@testing-library/react';
import { beforeEach, describe, expect, vi } from 'vitest';

import { localSeoMocks } from '@/data/__mocks__';
import { hostingDeleteLocation, hostingLocalSeoLogin } from '@/data/api/local-seo';
import { wrapper } from '@/utils/test.provider';

import { useHostingDeleteLocation, useHostingLocalSeoLogin } from './useWebHostingLocalSeo';

vi.mock('@ovh-ux/manager-core-api', () => ({
v6: {
get: vi.fn().mockReturnValue({
data: localSeoMocks,
headers: { 'x-pagination-total': '1' },
}),
},
}));

const onSuccess = vi.fn();
const onError = vi.fn();

describe('useHostingLocalSeoLogin', () => {
beforeEach(() => {
vi.clearAllMocks();
});

it('local seo login for token', async () => {
const { result } = renderHook(() => useHostingLocalSeoLogin('serviceName'), {
wrapper,
});
act(() => result.current.mutate('accountId'));

await waitFor(() => {
expect(hostingLocalSeoLogin).toHaveBeenCalledWith('serviceName', 'accountId');
});
});
});

describe('useHostingDeleteLocation', () => {
beforeEach(() => {
vi.clearAllMocks();
});

it('local seo login for token', async () => {
const { result } = renderHook(
() => useHostingDeleteLocation('serviceName', onSuccess, onError),
{
wrapper,
},
);
act(() => result.current.mutate('locationId'));

await waitFor(() => {
expect(hostingDeleteLocation).toHaveBeenCalledWith('serviceName', 'locationId');
expect(onSuccess).toHaveBeenCalled();
});
});
});
Loading
Loading