Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade test app to Next 15 #1199

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion e2e/browser/test-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
// ESLint dependencies are resolved in the root package.
extends: ["@inrupt/eslint-config-react", "next/core-web-vitals"],
extends: ["next/core-web-vitals"],
rules: {
"react/jsx-filename-extension": [1, { extensions: [".tsx"] }],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import dynamic from "next/dynamic";
import React from "react";

const BrowserSideApp = dynamic(() => import("../components/appContent"), {
ssr: false,
});

export default function Home() {
return <BrowserSideApp />;
export default function TestAppLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>
<main>{children}</main>
</body>
</html>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

"use client";

import {
login,
logout,
Expand All @@ -33,8 +35,8 @@
TESTID_OPENID_PROVIDER_INPUT,
TESTID_SESSION_STATUS,
} from "@inrupt/internal-playwright-testids";
import { useState, useEffect } from "react";

Check warning on line 38 in e2e/browser/test-app/app/page.tsx

View workflow job for this annotation

GitHub Actions / lint / lint

Unable to resolve path to module 'react'
import AccessController from "../accessGrants";
import AccessController from "../components/accessGrants";

// This is the content of the file uploaded manually at SHARED_FILE_IRI.
const DEFAULT_ISSUER = "https://login.inrupt.com/";
Expand Down
6 changes: 3 additions & 3 deletions e2e/browser/test-app/components/accessGrants/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
getResourceOwner,
getResources,
getAccessModes,
} from "@inrupt/solid-client-access-grants";

Check warning on line 36 in e2e/browser/test-app/components/accessGrants/index.tsx

View workflow job for this annotation

GitHub Actions / lint / lint

Unable to resolve path to module '@inrupt/solid-client-access-grants'
import {
getPodUrlAll,
saveFileInContainer,
getSourceUrl,
deleteFile,
} from "@inrupt/solid-client";
import React, { useState } from "react";

Check warning on line 43 in e2e/browser/test-app/components/accessGrants/index.tsx

View workflow job for this annotation

GitHub Actions / lint / lint

Unable to resolve path to module 'react'
import { useRouter } from "next/router";
import { useRouter } from "next/navigation";

Check warning on line 44 in e2e/browser/test-app/components/accessGrants/index.tsx

View workflow job for this annotation

GitHub Actions / lint / lint

Unable to resolve path to module 'next/navigation'

const session = getDefaultSession();
const SHARED_FILE_CONTENT = "Some content.\n";
Expand Down Expand Up @@ -203,7 +203,7 @@

const handleAccessRequest = async () => {
if (accessRequestUrl === undefined || !URL.canParse(accessRequestUrl)) {
console.error(

Check warning on line 206 in e2e/browser/test-app/components/accessGrants/index.tsx

View workflow job for this annotation

GitHub Actions / lint / lint

Unexpected console statement
"Please issue an Access Request and provide its URL before being redirected.",
);
return;
Expand Down Expand Up @@ -259,7 +259,7 @@
Created resource:{" "}
<span data-testid="resource-iri">{sharedResourceIri}</span>
</p>
<p>
<div>
Custom fields:{" "}
<form>
<input
Expand Down Expand Up @@ -311,7 +311,7 @@
/>
<br />
</form>
</p>
</div>
<p>
Access Request to Approve:{" "}
<input
Expand Down
Loading
Loading