Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 9, 2024
1 parent cf6a2ee commit 55d4318
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion binderhub/static/js/App.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,9 @@ test("renders error for misconfigured repo", () => {
<App />
</MemoryRouter>,
);
expect(screen.queryByText(/Spec is not of the form "user\/repo\/ref", provided: "userrepo\/main"/)).toBeInTheDocument();
expect(
screen.queryByText(
/Spec is not of the form "user\/repo\/ref", provided: "userrepo\/main"/,
),
).toBeInTheDocument();
});
2 changes: 1 addition & 1 deletion binderhub/static/js/components/ErrorPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export function ErrorPage({ title, errorMessage }) {
return (
<>
<div className="container text-center jumbotron">
<h1>{ title }</h1>
<h1>{title}</h1>

<p className="lead">
{errorMessage} Note: Some errors disappear by refreshing the page.
Expand Down
4 changes: 2 additions & 2 deletions binderhub/static/js/pages/LoadingPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function LoadingPage({ baseUrl }) {
const [isLaunching, setIsLaunching] = useState(false);

const spec = new Spec(buildSpec, LaunchSpec.fromSearchParams(searchParams));
const formatError = buildSpec.split("/").filter(x => !!x).length !== 4;
const formatError = buildSpec.split("/").filter((x) => !!x).length !== 4;

useEffect(() => {
if (!formatError) {
Expand All @@ -40,7 +40,7 @@ export function LoadingPage({ baseUrl }) {
title="400: Bad Request"
errorMessage={`Spec is not of the form "user/repo/ref", provided: "${buildSpec.substring(buildSpec.indexOf("/") + 1)}".`}
/>
)
);
}

return (
Expand Down
4 changes: 3 additions & 1 deletion integration-tests/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ async def test_loading_page(
assert r.status == status_code, f"{r.status} {uri}"
if status_code == 200:
nbviewer_url = page.get_by_test_id("nbviewer-iframe").get_attribute("src")
expected_url = f"https://nbviewer.jupyter.org/github/{repo}/tree/{ref.replace("/", "")}"
expected_url = (
f"https://nbviewer.jupyter.org/github/{repo}/tree/{ref.replace("/", "")}"
)
assert nbviewer_url == expected_url


Expand Down

0 comments on commit 55d4318

Please sign in to comment.