mirror of
https://github.com/enso-org/enso.git
synced 2024-12-02 13:52:08 +03:00
f96e5dddd6
Related to https://github.com/enso-org/enso/issues/8518 These tests already caught one regression in nav breadcrumbs: https://github.com/enso-org/enso/issues/8756 It also provides API for mocking expression updates for arbitrary nodes on the screen. The implementation is a bit convoluted and includes setting a callback on `window`, but it looks like the only possible solution given our architecture and playwright restrictions.
44 lines
1.0 KiB
Vue
44 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
import { computed, onMounted } from 'vue'
|
|
import { getMainFile, setMainFile } from '../mock/engine'
|
|
import App from '../src/App.vue'
|
|
import { useGraphStore } from '../src/stores/graph'
|
|
import MockProjectStoreWrapper from '../stories/MockProjectStoreWrapper.vue'
|
|
|
|
const mainFile = computed({
|
|
get() {
|
|
return getMainFile()
|
|
},
|
|
set(value) {
|
|
setMainFile(value)
|
|
},
|
|
})
|
|
|
|
const graphStore = useGraphStore()
|
|
|
|
onMounted(() => {
|
|
const window_ = window as any
|
|
window_.mockExpressionUpdate = graphStore.mockExpressionUpdate
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<MockProjectStoreWrapper v-model="mainFile">
|
|
<App :config="{}" :accessToken="''" :metadata="{}" :unrecognizedOptions="[]" />
|
|
</MockProjectStoreWrapper>
|
|
</template>
|
|
|
|
<style scoped>
|
|
:is(.viewport) {
|
|
color: var(--color-text);
|
|
font-family: var(--font-code);
|
|
font-size: 11.5px;
|
|
font-weight: 500;
|
|
line-height: 20px;
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
height: 100vh;
|
|
}
|
|
</style>
|