Compare commits

...

3 Commits

3 changed files with 9 additions and 8 deletions

View File

@ -1,7 +1,7 @@
name: E2E Tests name: E2E Tests
on: on:
push: push:
branches: [ main ] branches: [ main, pierremtb/im-dying ]
pull_request: pull_request:
branches: [ main ] branches: [ main ]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -87,13 +87,12 @@ export const fileLoader: LoaderFunction = async (
) )
const isBrowserProject = params.id === decodeURIComponent(BROWSER_PATH) const isBrowserProject = params.id === decodeURIComponent(BROWSER_PATH)
let code = ''
if (!isBrowserProject && projectPathData) { if (!isBrowserProject && projectPathData) {
const { projectName, projectPath, currentFileName, currentFilePath } = const { projectName, projectPath, currentFileName, currentFilePath } =
projectPathData projectPathData
const urlObj = new URL(routerData.request.url) const urlObj = new URL(routerData.request.url)
let code = ''
if (!urlObj.pathname.endsWith('/settings')) { if (!urlObj.pathname.endsWith('/settings')) {
const fallbackFile = isDesktop() const fallbackFile = isDesktop()
@ -123,10 +122,6 @@ export const fileLoader: LoaderFunction = async (
}) })
code = normalizeLineEndings(code) code = normalizeLineEndings(code)
// If persistCode in localStorage is present, it'll persist that code
// through *anything*. INTENDED FOR TESTS.
code = codeManager.localStoragePersistCode() || code
// Update both the state and the editor's code. // Update both the state and the editor's code.
// We explicitly do not write to the file here since we are loading from // We explicitly do not write to the file here since we are loading from
// the file system and not the editor. // the file system and not the editor.
@ -154,6 +149,12 @@ export const fileLoader: LoaderFunction = async (
? await getProjectInfo(projectPath) ? await getProjectInfo(projectPath)
: null : null
console.log('maybeProjectInfo', {
maybeProjectInfo,
defaultProjectData,
projectPathData,
})
const projectData: IndexLoaderData = { const projectData: IndexLoaderData = {
code, code,
project: maybeProjectInfo ?? defaultProjectData, project: maybeProjectInfo ?? defaultProjectData,
@ -170,7 +171,7 @@ export const fileLoader: LoaderFunction = async (
} }
return { return {
code, code: '',
project: { project: {
name: BROWSER_PROJECT_NAME, name: BROWSER_PROJECT_NAME,
path: '/' + BROWSER_PROJECT_NAME, path: '/' + BROWSER_PROJECT_NAME,