Commit 7f9e4547 authored by tom's avatar tom

fix tests

parent cd8305d1
......@@ -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;
}
}
......@@ -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([
......
......@@ -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([
......
......@@ -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' },
......
......@@ -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([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment