-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
178 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,57 @@ | ||
This folder includes test data, scripts and source code that used to test the export functionality of onnxruntime-web package. | ||
|
||
## nextjs-default | ||
|
||
### Summary | ||
|
||
This is a Next.js application created by `npx create-next-app@latest` using the following config: | ||
|
||
``` | ||
<ORT_ROOT>\js\web\test\e2e\exports\testcases>npx create-next-app@latest | ||
√ What is your project named? ... nextjs-default | ||
√ Would you like to use TypeScript? ... No / Yes | ||
√ Would you like to use ESLint? ... No / Yes | ||
√ Would you like to use Tailwind CSS? ... No / Yes | ||
√ Would you like your code inside a `src/` directory? ... No / Yes | ||
√ Would you like to use App Router? (recommended) ... No / Yes | ||
√ Would you like to use Turbopack for `next dev`? ... No / Yes | ||
√ Would you like to customize the import alias (`@/*` by default)? ... No / Yes | ||
Creating a new Next.js app in <ORT_ROOT>\js\web\test\e2e\exports\testcases\nextjs-default. | ||
Using npm. | ||
Initializing project with template: app | ||
Installing dependencies: | ||
- react | ||
- react-dom | ||
- next | ||
``` | ||
|
||
Small changes are made based on the application template, including: | ||
|
||
- Add a client side rendering (CSR) component which contains: | ||
- a checkbox for multi-thread | ||
- a checkbox for proxy | ||
- a "Load Model" button | ||
- a "Run Model" button | ||
- a state DIV | ||
- a log DIV | ||
- Add a helper module for creating ORT session and run | ||
|
||
### Tests | ||
|
||
Uses puppeteer to simulate the following tests: | ||
|
||
- Tests on `npm run dev` (dev server) | ||
- multi-thread OFF, proxy OFF | ||
- multi-thread OFF, proxy ON | ||
- multi-thread ON, proxy OFF | ||
- multi-thread ON, proxy ON | ||
- Tests on `npm run build` + `npm run serve` (prod) | ||
- multi-thread OFF, proxy OFF | ||
- multi-thread OFF, proxy ON | ||
- multi-thread ON, proxy OFF | ||
- multi-thread ON, proxy ON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-66.3 KB
js/web/test/e2e/exports/testcases/nextjs-default/app/fonts/GeistMonoVF.woff
Binary file not shown.
Binary file removed
BIN
-64.7 KB
js/web/test/e2e/exports/testcases/nextjs-default/app/fonts/GeistVF.woff
Binary file not shown.
27 changes: 12 additions & 15 deletions
27
js/web/test/e2e/exports/testcases/nextjs-default/app/layout.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
import localFont from "next/font/local"; | ||
import "./globals.css"; | ||
import { Geist, Geist_Mono } from 'next/font/google'; | ||
import './globals.css'; | ||
|
||
const geistSans = localFont({ | ||
src: "./fonts/GeistVF.woff", | ||
variable: "--font-geist-sans", | ||
weight: "100 900", | ||
const geistSans = Geist({ | ||
variable: '--font-geist-sans', | ||
subsets: ['latin'], | ||
}); | ||
const geistMono = localFont({ | ||
src: "./fonts/GeistMonoVF.woff", | ||
variable: "--font-geist-mono", | ||
weight: "100 900", | ||
|
||
const geistMono = Geist_Mono({ | ||
variable: '--font-geist-mono', | ||
subsets: ['latin'], | ||
}); | ||
|
||
export const metadata = { | ||
title: "Create Next App", | ||
description: "Generated by create next app", | ||
title: 'Create Next App', | ||
description: 'Generated by create next app', | ||
}; | ||
|
||
export default function RootLayout({ children }) { | ||
return ( | ||
<html lang="en"> | ||
<body className={`${geistSans.variable} ${geistMono.variable}`}> | ||
{children} | ||
</body> | ||
<body className={`${geistSans.variable} ${geistMono.variable}`}>{children}</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.