Fix 'originalCode' undefined in a test (#6027)
This commit is contained in:
		@ -273,7 +273,6 @@ export const isErrorWhitelisted = (exception: Error) => {
 | 
			
		||||
      project: 'Google Chrome',
 | 
			
		||||
      foundInSpec: 'e2e/playwright/snapshot-tests.spec.ts',
 | 
			
		||||
    },
 | 
			
		||||
    // TODO: fix this error in the code
 | 
			
		||||
    {
 | 
			
		||||
      name: 'TypeError',
 | 
			
		||||
      message: 'Failed to fetch',
 | 
			
		||||
@ -282,14 +281,6 @@ export const isErrorWhitelisted = (exception: Error) => {
 | 
			
		||||
      foundInSpec: 'e2e/playwright/snapshot-tests.spec.ts',
 | 
			
		||||
    },
 | 
			
		||||
    // TODO: fix this error in the code
 | 
			
		||||
    {
 | 
			
		||||
      name: 'ReferenceError',
 | 
			
		||||
      message: 'originalCode is not defined',
 | 
			
		||||
      stack: '',
 | 
			
		||||
      project: 'Google Chrome',
 | 
			
		||||
      foundInSpec: 'e2e/playwright/onboarding-tests.spec.ts',
 | 
			
		||||
    },
 | 
			
		||||
    // TODO: fix this error in the code
 | 
			
		||||
    {
 | 
			
		||||
      name: 'ReferenceError',
 | 
			
		||||
      message: 'createNewVariableCheckbox is not defined',
 | 
			
		||||
 | 
			
		||||
@ -230,9 +230,9 @@ test.describe('Onboarding tests', () => {
 | 
			
		||||
 | 
			
		||||
    // Override beforeEach test setup
 | 
			
		||||
    await context.addInitScript(
 | 
			
		||||
      async ({ settingsKey, settings }) => {
 | 
			
		||||
      async ({ settingsKey, settings, code }) => {
 | 
			
		||||
        // Give some initial code, so we can test that it's cleared
 | 
			
		||||
        localStorage.setItem('persistCode', originalCode)
 | 
			
		||||
        localStorage.setItem('persistCode', code)
 | 
			
		||||
        localStorage.setItem(settingsKey, settings)
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
@ -240,6 +240,7 @@ test.describe('Onboarding tests', () => {
 | 
			
		||||
        settings: settingsToToml({
 | 
			
		||||
          settings: TEST_SETTINGS_ONBOARDING_EXPORT,
 | 
			
		||||
        }),
 | 
			
		||||
        code: originalCode,
 | 
			
		||||
      }
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user