mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
fix tests
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user