Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tom2drum committed Sep 2, 2024
1 parent cd8305d commit 7f9e454
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions configs/app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ function getAssetFileExtension(value: string) {
const url = new URL(value);
return url.pathname.match(regexp.FILE_EXTENSION)?.[1];
} catch (error) {
try {
parseEnvJson(value);
return 'json';
} catch (error) {}
return parseEnvJson(value) ? 'json' : undefined;
}
}
4 changes: 2 additions & 2 deletions ui/pages/Marketplace.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { test, expect, devices } from 'playwright/lib';

import Marketplace from './Marketplace';

const MARKETPLACE_CONFIG_URL = 'http://localhost/marketplace-config.json';
const MARKETPLACE_SECURITY_REPORTS_URL = 'https://marketplace-security-reports.json';
const MARKETPLACE_CONFIG_URL = 'http://localhost:4000/marketplace-config.json';
const MARKETPLACE_SECURITY_REPORTS_URL = 'https://localhost:4000/marketplace-security-reports.json';

test.beforeEach(async({ mockConfigResponse, mockEnvs, mockAssetResponse, page }) => {
await mockEnvs([
Expand Down
4 changes: 2 additions & 2 deletions ui/pages/MarketplaceApp.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const hooksConfig = {
},
};

const MARKETPLACE_CONFIG_URL = 'https://marketplace-config.json';
const MARKETPLACE_SECURITY_REPORTS_URL = 'https://marketplace-security-reports.json';
const MARKETPLACE_CONFIG_URL = 'http://localhost:4000/marketplace-config.json';
const MARKETPLACE_SECURITY_REPORTS_URL = 'http://localhost:4000/marketplace-security-reports.json';

const testFn: Parameters<typeof test>[1] = async({ render, mockConfigResponse, mockAssetResponse, mockEnvs, mockRpcResponse, page }) => {
await mockEnvs([
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/SearchResults.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ test('search by user op hash +@mobile', async({ render, mockApiResponse, mockEnv

test.describe('with apps', () => {
test('default view +@mobile', async({ render, mockApiResponse, mockConfigResponse, mockAssetResponse, mockEnvs }) => {
const MARKETPLACE_CONFIG_URL = 'https://marketplace-config.json';
const MARKETPLACE_CONFIG_URL = 'https://localhost:4000/marketplace-config.json';
const hooksConfig = {
router: {
query: { q: 'o' },
Expand Down
2 changes: 1 addition & 1 deletion ui/snippets/searchBar/SearchBar.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ test('recent keywords suggest +@mobile', async({ render, page }, { project }) =>
});

test.describe('with apps', () => {
const MARKETPLACE_CONFIG_URL = 'https://marketplace-config.json';
const MARKETPLACE_CONFIG_URL = 'http://localhost:4000/marketplace-config.json';

test('default view +@mobile', async({ render, page, mockApiResponse, mockConfigResponse, mockAssetResponse, mockEnvs }) => {
await mockEnvs([
Expand Down

0 comments on commit 7f9e454

Please sign in to comment.