-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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(launchpad): detect if runner is set up and change UI accordingly #17934
feat(launchpad): detect if runner is set up and change UI accordingly #17934
Conversation
circle.yml
Outdated
@@ -386,7 +386,7 @@ commands: | |||
type: string | |||
steps: | |||
- restore_cached_workspace | |||
- run: yarn workspace @packages/launchpad cypress:run --browser <<parameters.browser>> | |||
- run: yarn workspace @packages/launchpad build && yarn workspace @packages/launchpad cypress:run --browser <<parameters.browser>> |
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.
Turns out build
is not necessary here, I was wrong about the root cause of the flake.
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.
Left a few comments - also have been wondering if there's value to the App
type, or if we should just move those fields to the top level Query
""" | ||
Whether the user has configured e2e testing or not, based on the existance of a 'component' key in their cypress.json | ||
""" | ||
hasSetupE2ETesting: Boolean! |
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.
Nice, love the descriptive graphql fields 👍
` | ||
|
||
gql` | ||
fragment TestingTypeCardsWizard on Wizard { |
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.
Any reason these two couldn't be consolidated into:
fragment TestingTypeCards on Query {
app {
activeProject {
hasSetupComponentTesting
hasSetupE2ETesting
}
}
wizard {
testingTypes {
id
title
description
}
}
}
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.
I could not get mountFragment
to work with Fragments on the top level Query
. I wonder if I'm missing something.
const ct = computed(() => { | ||
const type = props.gql?.wizard?.testingTypes?.find(x => x.id === 'component') | ||
if (!type) { | ||
throw Error('Did not get testingType from API') |
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.
Is this possible and if so, should we make the fields non-null so it's not?
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.
Good idea
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.
} | ||
} | ||
|
||
interval = window.setInterval(poll, 200) |
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.
Interesting, I wonder if there's a better way we should be handling things on the server so this race condition isn't a frontend concern.
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.
I'd say so. If some activities need to occur before the UI is rendered, I suppose something like
async function start (openElectron) {
// do stuff
await initializeThings()
openElectron()
}
I'd say once we untangle the mess that is open_project
, this problem will natural disappear.
@tgriesser made most of the recommended changes and we green, so going to merge. We should explore:
|
…p-gui-gql-stitching * unified-desktop-gui: fix: rename testApolloClient -> testUrqlClient, add apollo.config.js (#17948) feat(launchpad): detect if runner is set up and change UI accordingly (#17934) rebuild yarn lock chore: remove skipLibCheck, re-add vue-tsc, fix types (#17924) fix: ensure @headlessui/vue is bundled chore(graphql): make tsconfig more strict (#17909) run vite during watch fix: source maps while developing electron rebuild schema w/o JS files make constant more generic remove hanging tests allow larger artifacts comment out flaky test fix typing errors make graphql tsconfig more minimal chore: use `import type` syntax (#17864) remove browser-specific `beforeinput` checks (send in firefox) (#17820) fix(types): Update title method options type (#17781) fix(deps): update dependency @cypress/request to v2.88.6 🌟 (#17813)
https://cypress-io.atlassian.net/browse/UNIFY-292
Requirements of ticket:
component
ore2e
keys inside ofcypress.json
. This will change when feat: make cypress.config.js available #17000 is merged (where we will use thedevServer
orsetupNode
key sinplugins
to figure out if CT/E2E has been initialized).Some other things were added to get launchpad to be a bit more functional in general:
open_project
singleton, and will take a bit of heavy lifting to uncouple. This will be okay until we have something a bit better.Using launchpad as an example, since we have configured CT, it shows "launch" for the CT card. E2E has not been configured, so it shows "Click here to configure ...". These are not the final labels, just placeholders.