-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(app): persist current spec in data context, update runner workflow for demo #18406
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1209407
wip: save current spec on server in data context
lmiller1990 3d151ed
execute spec when clickd
lmiller1990 bb6196a
basic CT workflow
lmiller1990 159d7a8
share types
lmiller1990 d216447
style
lmiller1990 52dacb7
style
lmiller1990 586038b
fix types
lmiller1990 3ff9455
Merge remote-tracking branch 'origin/unified-desktop-gui' into lmille…
lmiller1990 21ea4df
use id to identify current spec
lmiller1990 7063468
merge in origin/unified-desktop-gui
lmiller1990 ccd4914
fix types
lmiller1990 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,9 @@ declare global { | |
*/ | ||
AutIframe: any | ||
Reporter: any | ||
shortcuts: { | ||
stop: () => void | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,8 @@ | |
"@urql/vue", | ||
"@vueuse/core", | ||
"lodash", | ||
"mobx", | ||
"nanoid", | ||
"vue", | ||
"vue-toast-notification" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<template> | ||
<div> | ||
<div v-once> | ||
<div class="flex"> | ||
<div :id="RUNNER_ID" /> | ||
<div :id="REPORTER_ID" /> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { onBeforeUnmount, onMounted } from 'vue' | ||
import { UnifiedRunnerAPI } from '../runner' | ||
import { REPORTER_ID, RUNNER_ID, getRunnerElement, getReporterElement, empty } from '../runner/utils' | ||
import { gql } from '@urql/core' | ||
import type { CurrentSpec_RunnerFragment } from '../generated/graphql' | ||
|
||
gql` | ||
fragment CurrentSpec_Runner on Spec { | ||
id | ||
relative | ||
absolute | ||
name | ||
} | ||
` | ||
|
||
const props = defineProps<{ | ||
gql: CurrentSpec_RunnerFragment | null | ||
}>() | ||
|
||
onMounted(() => { | ||
UnifiedRunnerAPI.initialize(execute) | ||
}) | ||
|
||
onBeforeUnmount(() => { | ||
// For now we clean up the AUT and Reporter every time we leave the route. | ||
// In the long term, we really should use <keep-alive> and maintain the state | ||
// For now, this is much more simple. | ||
empty(getRunnerElement()) | ||
window.UnifiedRunner.shortcuts.stop() | ||
empty(getReporterElement()) | ||
}) | ||
|
||
const execute = () => { | ||
if (!props.gql) { | ||
return | ||
} | ||
|
||
UnifiedRunnerAPI.executeSpec(props.gql) | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
#unified-runner { | ||
position: relative; | ||
flex-grow: 1; | ||
margin: 20px; | ||
box-shadow: 0px 0px 5px 0 black; | ||
padding: 10px; | ||
} | ||
|
||
#unified-reporter { | ||
position: relative; | ||
width: 300px; | ||
height: 100vh; | ||
} | ||
</style> | ||
|
||
<route> | ||
{ | ||
name: "Runner" | ||
} | ||
</route> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now just using gql as the source of truth, not sure if there's a specific reason we need to keep the current spec in the URL or not 🤔