Skip to content

Commit

Permalink
FIX playwright tests
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinovega committed Nov 5, 2024
1 parent 6bec273 commit f0d02be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -335,9 +335,9 @@ export const TeamApiKeysForApi = () => {
}

if (
apiQuery.isLoading &&
subsQuery.isLoading &&
teamQuery.isLoading &&
apiQuery.isLoading ||
subsQuery.isLoading ||
teamQuery.isLoading ||
subApisQuery.isLoading
) {
return <Spinner />;
Expand Down
7 changes: 6 additions & 1 deletion daikoku/javascript/tests/connectedUser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down

0 comments on commit f0d02be

Please sign in to comment.