Skip to content

Commit

Permalink
Upgrade test app to Next 15 (#1109)
Browse files Browse the repository at this point in the history
Upgrade test app to latest version of NextJS, and updates the directory layout to use the latest `app/` convention.
  • Loading branch information
NSeydoux authored Jan 16, 2025
1 parent bd658a6 commit b3f0fc2
Show file tree
Hide file tree
Showing 11 changed files with 368 additions and 252 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ jobs:
# run even for dependabot so that the matrixed jobs are skipped, instead
# of the whole pipeline.
if: ${{ github.actor != 'dependabot[bot]' }}
run: npm t
run: npm run test:e2e:browser
env:
E2E_DEMO_CLIENT_APP_URL: http://localhost:3001
E2E_TEST_USER: ${{ secrets.E2E_TEST_USER }}
E2E_TEST_PASSWORD: ${{ secrets.E2E_TEST_PASSWORD }}
E2E_TEST_IDP: ${{ secrets.E2E_TEST_IDP }}
E2E_TEST_OWNER_CLIENT_ID: ${{ secrets.E2E_TEST_OWNER_CLIENT_ID }}
E2E_TEST_OWNER_CLIENT_SECRET: ${{ secrets.E2E_TEST_OWNER_CLIENT_SECRET }}
E2E_TEST_ENVIRONMENT: ${{ matrix.environment-name }}
- name: Archive browser-based end-to-end test request logs
uses: actions/upload-artifact@v4
if: failure()
continue-on-error: true
with:
name: playwright-output
path: test-results/
13 changes: 13 additions & 0 deletions e2e/browser/test-app/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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,9 +19,8 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

// Disabling the following prevents from having to install before linting from
// the root.
// eslint-disable-next-line import/no-unresolved
"use client";

import React, { useState, useEffect } from "react";
import {
login,
Expand All @@ -30,9 +29,9 @@ import {
getDefaultSession,
ISessionInfo,
} from "@inrupt/solid-client-authn-browser";
import SolidClient from "../solidClient";
import SolidClient from "../components/solidClient";

const REDIRECT_URL = window.location.href;
const REDIRECT_URL = "http://localhost:3000";
const APP_NAME = "Solid client browser-based tests app";
const DEFAULT_ISSUER = "https://login.inrupt.com/";

Expand Down
2 changes: 1 addition & 1 deletion e2e/browser/test-app/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading

0 comments on commit b3f0fc2

Please sign in to comment.