Types on test settings (#5643)

* type check the test settings

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix another

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2025-03-05 18:03:49 -08:00
committed by GitHub
parent 00ff6371ed
commit 8aa46099a8
11 changed files with 122 additions and 86 deletions

View File

@ -1,7 +1,12 @@
import { test, expect } from './zoo-test'
import { join } from 'path'
import fsp from 'fs/promises'
import { getUtils, executorInputPath, createProject } from './test-utils'
import {
getUtils,
executorInputPath,
createProject,
settingsToToml,
} from './test-utils'
import { bracket } from 'lib/exampleKcl'
import { onboardingPaths } from 'routes/Onboarding/paths'
import {
@ -10,7 +15,6 @@ import {
TEST_SETTINGS_ONBOARDING_EXPORT,
TEST_SETTINGS_ONBOARDING_USER_MENU,
} from './storageStates'
import * as TOML from '@iarna/toml'
import { expectPixelColor } from './fixtures/sceneFixture'
// Because our default test settings have the onboardingStatus set to 'dismissed',
@ -22,7 +26,7 @@ test.describe('Onboarding tests', () => {
{
appSettings: {
app: {
onboardingStatus: '',
onboarding_status: '',
},
},
cleanProjectDir: true,
@ -63,7 +67,7 @@ test.describe('Onboarding tests', () => {
tag: '@electron',
appSettings: {
app: {
onboardingStatus: '',
onboarding_status: '',
},
},
cleanProjectDir: true,
@ -153,7 +157,7 @@ test.describe('Onboarding tests', () => {
{
appSettings: {
app: {
onboardingStatus: '',
onboarding_status: '',
},
},
},
@ -167,7 +171,7 @@ test.describe('Onboarding tests', () => {
},
{
settingsKey: TEST_SETTINGS_KEY,
settings: TOML.stringify({
settings: settingsToToml({
settings: TEST_SETTINGS_ONBOARDING_START,
}),
}
@ -209,7 +213,7 @@ test.describe('Onboarding tests', () => {
{
appSettings: {
app: {
onboardingStatus: '/export',
onboarding_status: '/export',
},
},
cleanProjectDir: true,
@ -226,7 +230,7 @@ test.describe('Onboarding tests', () => {
},
{
settingsKey: TEST_SETTINGS_KEY,
settings: TOML.stringify({
settings: settingsToToml({
settings: TEST_SETTINGS_ONBOARDING_EXPORT,
}),
}
@ -264,7 +268,7 @@ test.describe('Onboarding tests', () => {
{
appSettings: {
app: {
onboardingStatus: '/parametric-modeling',
onboarding_status: '/parametric-modeling',
},
},
cleanProjectDir: true,
@ -314,7 +318,7 @@ test.describe('Onboarding tests', () => {
{
appSettings: {
app: {
onboardingStatus: '',
onboarding_status: '',
},
},
cleanProjectDir: true,
@ -327,7 +331,7 @@ test.describe('Onboarding tests', () => {
},
{
settingsKey: TEST_SETTINGS_KEY,
settings: TOML.stringify({
settings: settingsToToml({
settings: TEST_SETTINGS_ONBOARDING_USER_MENU,
}),
}
@ -387,7 +391,7 @@ test.describe('Onboarding tests', () => {
{
appSettings: {
app: {
onboardingStatus: '',
onboarding_status: '',
},
},
cleanProjectDir: true,
@ -401,7 +405,7 @@ test.describe('Onboarding tests', () => {
},
{
settingsKey: TEST_SETTINGS_KEY,
settings: TOML.stringify({
settings: settingsToToml({
settings: TEST_SETTINGS_ONBOARDING_USER_MENU,
}),
}
@ -443,7 +447,7 @@ test.fixme(
{
appSettings: {
app: {
onboardingStatus: 'dismissed',
onboarding_status: 'dismissed',
},
},
cleanProjectDir: true,