diff --git a/daikoku/javascript/src/components/backoffice/apikeys/TeamApiKeysForApi.tsx b/daikoku/javascript/src/components/backoffice/apikeys/TeamApiKeysForApi.tsx index aaffdadf9..427674521 100644 --- a/daikoku/javascript/src/components/backoffice/apikeys/TeamApiKeysForApi.tsx +++ b/daikoku/javascript/src/components/backoffice/apikeys/TeamApiKeysForApi.tsx @@ -1,6 +1,6 @@ import { getApolloContext } from '@apollo/client'; import { constraints, format, type } from '@maif/react-forms'; -import { useQuery, useQueryClient } from '@tanstack/react-query'; +import { useQueries, useQuery, useQueryClient } from '@tanstack/react-query'; import classNames from 'classnames'; import sortBy from 'lodash/sortBy'; import moment from 'moment'; @@ -335,9 +335,9 @@ export const TeamApiKeysForApi = () => { } if ( - apiQuery.isLoading && - subsQuery.isLoading && - teamQuery.isLoading && + apiQuery.isLoading || + subsQuery.isLoading || + teamQuery.isLoading || subApisQuery.isLoading ) { return ; diff --git a/daikoku/javascript/tests/connectedUser.spec.ts b/daikoku/javascript/tests/connectedUser.spec.ts index 0539db82d..969beb478 100644 --- a/daikoku/javascript/tests/connectedUser.spec.ts +++ b/daikoku/javascript/tests/connectedUser.spec.ts @@ -629,7 +629,12 @@ test('transfer an api subscription', async ({ page, context }) => { await page.locator('.top__container').filter({hasText: 'Your teams'}).getByText('Testers').click(); await page.getByText('API keys').click(); await page.getByRole('row', { name: 'test API 2.0.0 View API View' }).getByLabel('View APIkeys').click(); - expect(page.locator('.api-subscription__infos__value')).toHaveText(apikey) + expect(page.locator('.api-subscription__infos__name')).toHaveText("not test plan"); + + await page.getByRole('button', { name: 'clientId:clientToken' }).click(); + const _apikey = await page.evaluate(() => navigator.clipboard.readText()); + expect(_apikey).toBe(apikey); + }); test('can setup subscription valid until for a subs to his apis', async ({ page }) => {