Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
Expand Up @@ -135,6 +135,7 @@ const SqlEditorLeftBar = ({
data-test="DatabaseSelector"
css={css`
min-width: 500px;
max-width: 500px;
`}
>
<Typography.Title level={5} style={{ margin: 0 }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,17 @@ describe('OAuth2RedirectMessage Component', () => {
expect(getByText(/provide authorization/i)).toBeInTheDocument();
});

test('renders the prose body without preformatted/monospace styling so it wraps within the popover', () => {
const { container } = render(setup());

// The OAuth2 body is prose, not a stack trace, so it must not be styled as
// preformatted (monospace + pre-wrap). Otherwise it renders as a single
// unwrapped line that balloons the SQL Lab popover width.
const description = container.querySelector('[data-testid="description"]');
expect(description).not.toBeNull();
expect(description).not.toHaveStyle({ whiteSpace: 'pre-wrap' });
});

test('renders the authorization link pointing at the OAuth2 URL', () => {
const { getByText } = render(setup());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export function OAuth2RedirectMessage({
message={subtitle}
type={level}
description={body}
descriptionPre={false}
closable={closable}
/>
);
Expand Down
Loading