Skip to content

Commit

Permalink
fix: test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kiram15 committed Aug 29, 2023
1 parent 28098d8 commit a1ea1db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ const APICredentialsPage = () => {
<div className="mb-4 api-cred-fields">
<h4>
Application name:
<span>data?.name</span>
<span>{data?.name}</span>
</h4>
<h4>
Allowed URIs:
<span>data?.redirect_uris</span>
<span>{data?.redirect_uris}</span>
</h4>
<h4>
API client ID:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const returnResponse = {
client_id: clientId,
client_secret: clientSecret,
api_client_documentation: apiClientDocumentation,
redirect_uris: redirectUris,
updated,
}],
};
Expand All @@ -36,6 +37,7 @@ const data = {
client_id: clientId,
client_secret: clientSecret,
api_client_documentation: apiClientDocumentation,
redirect_uris: redirectUris,
updated,
};
const regenerationDate = {
Expand Down Expand Up @@ -91,7 +93,7 @@ describe('API Credentials Tab', () => {
await waitFor(() => expect(mockFetchFn).toHaveBeenCalled());

expect(screen.getByRole('heading', { name: `Application name: ${name}` }).toBeInTheDocument);
expect(screen.getByRole('heading', { name: 'Allowed URIs:' }).toBeInTheDocument);
expect(screen.getByRole('heading', { name: `Allowed URIs: ${redirectUris}` }).toBeInTheDocument);
expect(screen.getByRole('heading', { name: `API client ID: ${clientId}` }).toBeInTheDocument);
expect(screen.getByRole('heading', { name: `API client secret: ${clientSecret}` }).toBeInTheDocument);
expect(screen.getByRole('heading', { name: `API client documentation: ${apiClientDocumentation}` }).toBeInTheDocument);
Expand Down Expand Up @@ -152,7 +154,7 @@ describe('API Credentials Tab', () => {
});

expect(screen.getByRole('heading', { name: `Application name: ${name}` }).toBeInTheDocument);
expect(screen.getByRole('heading', { name: 'Allowed URIs:' }).toBeInTheDocument);
expect(screen.getByRole('heading', { name: `Allowed URIs: ${redirectUris}` }).toBeInTheDocument);
expect(screen.getByRole('heading', { name: `API client ID: ${clientId}` }).toBeInTheDocument);
expect(screen.getByRole('heading', { name: `API client secret: ${clientSecret}` }).toBeInTheDocument);
expect(screen.getByRole('heading', { name: `API client documentation: ${apiClientDocumentation}` }).toBeInTheDocument);
Expand Down

0 comments on commit a1ea1db

Please sign in to comment.