Skip to content
Merged
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 app/tests/analytics/web_client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import ClientResults from '../components/csr_test_runner';
import ClientResults from '@/components/app_tests/analytics/csr_test_runner';

export const metadata: Metadata = {
title: 'Analytics Web SDK CSR test'
Expand Down
4 changes: 2 additions & 2 deletions app/tests/analytics/web_ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import { testAnalytics, TestResults } from '../lib/test';
import ResultsDisplay from '../components/results_display';
import { testAnalytics, TestResults } from '@/lib/app_tests/analytics/test';
import ResultsDisplay from '@/components/app_tests/analytics/results_display';

export const metadata: Metadata = {
title: 'Analytics Web SDK SSR test'
Expand Down
2 changes: 1 addition & 1 deletion app/tests/app/web_client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import CsrTestRunner from '../components/csr_test_runner';
import CsrTestRunner from '@/components/app_tests/app/csr_test_runner';

export const metadata: Metadata = {
title: 'App Web SDK CSR test'
Expand Down
4 changes: 2 additions & 2 deletions app/tests/app/web_ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import { testApp, TestResults } from '../lib/test';
import ResultsDisplay from '../components/results_display';
import { testApp, TestResults } from '@/lib/app_tests/app/test';
import ResultsDisplay from '@/components/app_tests/app/results_display';

// Suppress static site generation.
export const dynamic = "force-dynamic";
Expand Down
2 changes: 1 addition & 1 deletion app/tests/app_check/web_client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import ClientResults from '../components/csr_test_runner';
import ClientResults from '@/components/app_tests/app_check/csr_test_runner';

export const metadata: Metadata = {
title: 'AppCheck Web SDK CSR test'
Expand Down
4 changes: 2 additions & 2 deletions app/tests/app_check/web_ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import { testAppCheck, TestResults } from '../lib/test';
import ResultsDisplay from '../components/results_display';
import { testAppCheck, TestResults } from '@/lib/app_tests/app_check/test';
import ResultsDisplay from '@/components/app_tests/app_check/results_display';

// Suppress static site generation.
export const dynamic = "force-dynamic";
Expand Down
2 changes: 1 addition & 1 deletion app/tests/auth/web_client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import CSRTestRunner from '../components/csr_test_runner';
import CSRTestRunner from '@/components/app_tests/auth/csr_test_runner';

export const metadata: Metadata = {
title: 'Auth Web SDK CSR test'
Expand Down
4 changes: 2 additions & 2 deletions app/tests/auth/web_ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import { testAuth, TestResults } from '../lib/test';
import ResultsDisplay from '../components/results_display';
import { testAuth, TestResults } from '@/lib/app_tests/auth/test';
import ResultsDisplay from '@/components/app_tests/auth/results_display';

// Suppress static site generation.
export const dynamic = "force-dynamic";
Expand Down
2 changes: 1 addition & 1 deletion app/tests/database/web_client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import CSRTestRunner from '../components/csr_test_runner';
import CSRTestRunner from '@/components/app_tests/database/csr_test_runner';

export const metadata: Metadata = {
title: 'Database Web SDK CSR test'
Expand Down
4 changes: 2 additions & 2 deletions app/tests/database/web_ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import { testDatabase, TestResults } from '../lib/test';
import ResultsDisplay from '../components/results_display';
import { testDatabase, TestResults } from '@/lib/app_tests/database/test';
import ResultsDisplay from '@/components/app_tests/database/results_display';

// Suppress static site generation.
export const dynamic = "force-dynamic";
Expand Down
2 changes: 1 addition & 1 deletion app/tests/firestore/web_client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import CSRTestRunner from '../components/csr_test_runner';
import CSRTestRunner from '@/components/app_tests/firestore/csr_test_runner';

export const metadata: Metadata = {
title: 'Firestore Web SDK CSR test'
Expand Down
4 changes: 2 additions & 2 deletions app/tests/firestore/web_ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import { testFirestore, TestResults } from '../lib/test';
import ResultsDisplay from '../components/results_display';
import { testFirestore, TestResults } from '@/lib/app_tests/firestore/test';
import ResultsDisplay from '@/components/app_tests/firestore/results_display';

// Suppress static site generation as this hangs on the app deletion in test.ts.
export const dynamic = "force-dynamic";
Expand Down
2 changes: 1 addition & 1 deletion app/tests/functions/web_client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import CSRTestRunner from '../components/csr_test_runner';
import CSRTestRunner from '@/components/app_tests/functions/csr_test_runner';

export const metadata: Metadata = {
title: 'Functions Web SDK CSR test'
Expand Down
4 changes: 2 additions & 2 deletions app/tests/functions/web_ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import { testFunctions, TestResults } from '../lib/test';
import ResultsDisplay from '../components/results_display';
import { testFunctions, TestResults } from '@/lib/app_tests/functions/test';
import ResultsDisplay from '@/components/app_tests/functions/results_display';

// Suppress static site generation.
export const dynamic = "force-dynamic";
Expand Down
2 changes: 1 addition & 1 deletion app/tests/messaging/web_client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import CSRTestRunner from '../components/csr_test_runner';
import CSRTestRunner from '@/components/app_tests/messaging/csr_test_runner';

export const metadata: Metadata = {
title: 'Messaging Web SDK CSR test'
Expand Down
4 changes: 2 additions & 2 deletions app/tests/messaging/web_ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import { testMessaging, TestResults } from '../lib/test';
import ResultsDisplay from '../components/results_display';
import { testMessaging, TestResults } from '@/lib/app_tests/messaging/test';
import ResultsDisplay from '@/components/app_tests/messaging/results_display';

// Suppress static site generation.
export const dynamic = "force-dynamic";
Expand Down
2 changes: 1 addition & 1 deletion app/tests/performance/web_client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import CSRTestRunner from '../components/csr_test_runner';
import CSRTestRunner from '@/components/app_tests/performance/csr_test_runner';

export const metadata: Metadata = {
title: 'Performance Web SDK CSR test'
Expand Down
4 changes: 2 additions & 2 deletions app/tests/performance/web_ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import { testPerformance, TestResults } from '../lib/test';
import ResultsDisplay from '../components/results_display';
import { testPerformance, TestResults } from '@/lib/app_tests/performance/test';
import ResultsDisplay from '@/components/app_tests/performance/results_display';

// Suppress static site generation.
export const dynamic = "force-dynamic";
Expand Down
2 changes: 1 addition & 1 deletion app/tests/storage/web_client/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import CSRTestRunner from '../components/csr_test_runner';
import CSRTestRunner from '@/components/app_tests/storage/csr_test_runner';

export const metadata: Metadata = {
title: 'Storage Web SDK CSR test'
Expand Down
6 changes: 3 additions & 3 deletions app/tests/storage/web_ssr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import type { Metadata } from 'next'
import { testStorage, TestResults } from '../lib/test';
import ResultsDisplay from '../components/results_display';
import { testStorage, TestResults } from '@/lib/app_tests/storage/test';
import ResultsDisplay from '@/components/app_tests/storage/results_display';

// Suppress static site generation.
export const dynamic = "force-dynamic";
Expand All @@ -26,7 +26,7 @@ export const metadata: Metadata = {
}

export default async function Page() {
const testResults: TestResults = await testStorage(/*isServer=*/true);
const testResults: TestResults = await testStorage();
return (
<>
<h1>Storage SSR Test results:</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use client'

import { useState, useEffect } from 'react'
import { testAnalytics, initializeTestResults } from '../lib/test';
import { testAnalytics, initializeTestResults } from '@/lib/app_tests/analytics/test';
import ResultsDisplay from './results_display';

export default function ClientResults() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use client'

import { useState, useEffect } from 'react'
import { testApp, initializeTestResults } from '../lib/test';
import { testApp, initializeTestResults } from '@/lib/app_tests/app/test';
import ResultsDisplay from './results_display';

export default function CsrTestRunner() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use client'

import { useState, useEffect } from 'react'
import { testAppCheck, initializeTestResults } from '../lib/test';
import { testAppCheck, initializeTestResults } from '@/lib/app_tests/app_check/test';
import ResultsDisplay from './results_display';

export default function ClientResults() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use client'

import { useState, useEffect } from 'react'
import { testAuth, initializeTestResults } from '../lib/test';
import { testAuth, initializeTestResults } from '@/lib/app_tests/auth/test';
import ResultsDisplay from './results_display';

export default function CsrTestRunner() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use client'

import { useState, useEffect } from 'react'
import { testDatabase, initializeTestResults } from '../lib/test';
import { testDatabase, initializeTestResults } from '@/lib/app_tests/database/test';
import ResultsDisplay from './results_display';

export default function CsrTestRunner() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use client'

import { useState, useEffect } from 'react'
import { testFirestore, initializeTestResults } from '../lib/test';
import { testFirestore, initializeTestResults } from '@/lib/app_tests/firestore/test';
import ResultsDisplay from './results_display';

export default function CsrTestRunner() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use client'

import { useState, useEffect } from 'react'
import { testFunctions, initializeTestResults } from '../lib/test';
import { testFunctions, initializeTestResults } from '@/lib/app_tests/functions/test';
import ResultsDisplay from './results_display';

export default function CsrTestRunner() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use client'

import { useState, useEffect } from 'react'
import { testMessaging, initializeTestResults } from '../lib/test';
import { testMessaging, initializeTestResults } from '@/lib/app_tests/messaging/test';
import ResultsDisplay from './results_display';

export default function CsrTestRunner() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use client'

import { useState, useEffect } from 'react'
import { testPerformance, initializeTestResults } from '../lib/test';
import { testPerformance, initializeTestResults } from '@/lib/app_tests/performance/test';
import ResultsDisplay from './results_display';

export default function CsrTestRunner() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'use client'

import { useState, useEffect } from 'react'
import { testStorage, initializeTestResults } from '../lib/test';
import { testStorage, initializeTestResults } from '@/lib/app_tests/storage/test';
import ResultsDisplay from './results_display';

export default function CsrTestRunner() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
import { deleteApp, initializeApp } from 'firebase/app';
import { getAnalytics, logEvent, isSupported } from 'firebase/analytics';
import { firebaseConfig } from 'lib/firebase';
import { OK, OK_SKIPPED, FAILED, sleep } from 'lib/util';
import { firebaseConfig } from '@/lib/app_tests/firebase';
import { OK, OK_SKIPPED, FAILED, sleep } from '@/lib/app_tests/util';

export type TestResults = {
initializeAppResult: string,
Expand All @@ -38,9 +38,9 @@ export function initializeTestResults(): TestResults {
return testAnalyticsResult;
}

export async function testAnalytics(isServerApp: boolean = false): Promise<TestResults> {
export async function testAnalytics(isServer: boolean = false): Promise<TestResults> {
const result: TestResults = initializeTestResults();
if (isServerApp) {
if (isServer) {
try {
// Note: Analytics isn't supported in node environments.
const firebaseApp = initializeApp(firebaseConfig);
Expand All @@ -58,7 +58,7 @@ export async function testAnalytics(isServerApp: boolean = false): Promise<TestR
} catch (e) {
console.log("Caught error: ", e);
}
} else /* !isServer() */ {
} else /* !isServer */ {
try {
const firebaseApp = initializeApp(firebaseConfig);
if (firebaseApp !== null) {
Expand All @@ -74,7 +74,7 @@ export async function testAnalytics(isServerApp: boolean = false): Promise<TestR
result.logEventResult = OK;
}
// logEvent throws an error if we delete the app here, due to
// it's asynchronous behavior.
// its asynchronous behavior.
await sleep(1000);
deleteApp(firebaseApp);
result.deleteAppResult = OK;
Expand Down
4 changes: 2 additions & 2 deletions app/tests/app/lib/test.ts → src/lib/app_tests/app/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* limitations under the License.
*/
import { getApp, deleteApp, initializeApp, initializeServerApp } from 'firebase/app';
import { firebaseConfig } from 'lib/firebase';
import { OK, OK_SKIPPED, FAILED } from 'lib/util';
import { firebaseConfig } from '@/lib/app_tests/firebase';
import { OK, OK_SKIPPED, FAILED } from '@/lib/app_tests/util';

export type TestResults = {
initializeAppResult: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
import { deleteApp, initializeApp } from 'firebase/app';
import { AppCheckToken, CustomProvider, initializeAppCheck, getToken } from 'firebase/app-check';
import { firebaseConfig } from 'lib/firebase';
import { OK, FAILED } from 'lib/util';
import { firebaseConfig } from '@/lib/app_tests/firebase';
import { OK, FAILED } from '@/lib/app_tests/util';

export type TestResults = {
initializeAppResult: string,
Expand Down
4 changes: 2 additions & 2 deletions app/tests/auth/lib/test.ts → src/lib/app_tests/auth/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
import { deleteApp, initializeApp, initializeServerApp } from 'firebase/app';
import { deleteUser, getAuth, signInAnonymously } from 'firebase/auth';
import { firebaseConfig } from 'lib/firebase';
import { OK, OK_SKIPPED, FAILED, waitForUserSignIn } from 'lib/util';
import { firebaseConfig } from '@/lib/app_tests/firebase';
import { OK, OK_SKIPPED, FAILED, waitForUserSignIn } from '@/lib/app_tests/util';

export type TestResults = {
initializeAppResult: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import { deleteApp, initializeApp } from 'firebase/app';
import { getDatabase, update, off, onValue, ref, remove, set } from 'firebase/database';
import { firebaseConfig } from 'lib/firebase';
import { OK, OK_SKIPPED, FAILED } from 'lib/util';
import { firebaseConfig } from '@/lib/app_tests/firebase';
import { OK, OK_SKIPPED, FAILED } from '@/lib/app_tests/util';

export type TestResults = {
initializeAppResult: string,
Expand Down Expand Up @@ -101,7 +101,6 @@ export async function testDatabase(isServer: boolean = false): Promise<TestResul
}
});
await remove(dbRef);
console.log("remove returned");
off(dbRef);

result.deleteRemoveValueListenerResult = OK;
Expand Down
File renamed without changes.
Loading