Skip to content
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): run e2e tests #18448

Merged
merged 17 commits into from
Oct 13, 2021

Conversation

lmiller1990
Copy link
Contributor

@lmiller1990 lmiller1990 commented Oct 12, 2021

Get E2E specs running in the new runner.

TODO:

  • Do not include gqlPort in query string. Not sure on the best way to get this, for now I just copied what we do in launchpad and stuck it in the ?gqlPort=<port>.
  • Figure out CI. This PR cuts-over and abandons "packages/runner" entirely. We still want to run the existing E2E tests (driver, reporter etc) against the current E2E runner, until the new unified runner has feature parity.

image

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 12, 2021

Thanks for taking the time to open a PR!

@lmiller1990 lmiller1990 changed the title update server feat(app): run e2e tests Oct 12, 2021
@@ -82,8 +82,8 @@ export const runner = {
return serveRunner(runnerPkg, config, res)
},

handle (testingType, req, res) {
const pathToFile = getPathToDist(testingType === 'e2e' ? 'runner' : 'runner-ct', req.params[0])
handle (testingType: Cypress.TestingType, req: Request, res: Response) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are building driver and reporter by webpack, and the entry point for that bundle is runner-ct/src/main.tsx, whenever we run the new app (as decided by the LAUNCHPAD variable) we always want to server runner-ct, unless running suites like driver under the existing e2e runner.

@@ -8,6 +8,11 @@ import type { Server } from 'http'
import { SocketIOServer } from '@packages/socket'

let graphqlServer: Server | undefined
let graphqlPort: number | undefined

export function getExistingGraphqlServerPort () {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need some way to access this - somehow the new app needs to be able to access this when it creates its urql client, the only way I could come up with was passing it as a query param (like we are doing in launchpad).

Bit of a hack, definitely not ideal long term. @tgriesser any ideas how I can pass the gql port to the front-end (bearing in mind we currently need to manually change to __vite__ to use the new app).

@lmiller1990 lmiller1990 marked this pull request as ready for review October 13, 2021 01:39
@lmiller1990 lmiller1990 requested a review from a team as a code owner October 13, 2021 01:39
@lmiller1990 lmiller1990 requested review from BlueWinds, emilyrohrbough and tgriesser and removed request for a team, BlueWinds and emilyrohrbough October 13, 2021 01:39
@lmiller1990 lmiller1990 merged commit 9ca177c into unified-desktop-gui Oct 13, 2021
@lmiller1990 lmiller1990 deleted the lmiller1990-support-e2e-in-new-app branch October 13, 2021 02:13
tgriesser added a commit that referenced this pull request Oct 13, 2021
…ramework

* unified-desktop-gui:
  fix conflicts
  fix conflicts
  feat: create a copy when selecting a pre-existing story (#18440)
  feat: add configured state to TestingTypeCard (#18461)
  feat(app): run e2e tests (#18448)
  fix: frontend-shared typo on windi config
  feat: make the select language component (#18443)
  chore: Update Chrome (stable) to 94.0.4606.81 (#18411)
  release 8.6.0
  fix: do not attempt to trim objects when printing to console (#18341)
  fix(driver): `cy.pause()` should not be ignored with `cypress run --headed --no-exit` (#18358)
  chore: release @cypress/vite-dev-server-v2.1.1
  chore: release @cypress/react-v5.10.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants