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

fix(unify): fixing icons and supporting router within the shared cypress commands package #18237

Merged
merged 4 commits into from
Sep 24, 2021

Conversation

JessicaSachs
Copy link
Contributor

@JessicaSachs JessicaSachs commented Sep 24, 2021

Summary

Currently, the component tests for the App aren't running and the icons don't look right within the tests. This PR fixes the local component tests for the App.

How to test

  1. git checkout fix/icon-colors-and-shared-plugins
  2. cd packages/app
  3. yarn cypress:open and the component tests should render and look correct.

Changes

  1. The current frontend-shared commands for Cypress are importing application code. This causes issues when one project uses dependencies that another project does not. This PR refactors frontend-shared/commands/command.ts to export a factory function where each project can inject the plugins it needs.
  2. The component tests were broken when adding CYPRESS_INTERNAL_CLOUD_ENV during the remote schema stitching PR.
  3. The icons (mainly the settings cog) weren't getting colored correctly.

@JessicaSachs JessicaSachs requested a review from a team as a code owner September 24, 2021 16:39
@JessicaSachs JessicaSachs requested review from flotwig and chrisbreiding and removed request for a team September 24, 2021 16:39
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 24, 2021

Thanks for taking the time to open a PR!

@JessicaSachs JessicaSachs force-pushed the fix/icon-colors-and-shared-plugins branch from 1c015cf to 231a2b2 Compare September 24, 2021 16:44
@JessicaSachs JessicaSachs force-pushed the fix/icon-colors-and-shared-plugins branch from 231a2b2 to 3676263 Compare September 24, 2021 16:49
Cypress.Commands.add(
'mount',
<C extends Parameters<typeof mount>[0]>(comp: C, options: CyMountOptions<C> = {}) => {
export const registerMountFn = ({ plugins }) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

CC @lmiller1990 🎉

Copy link
Contributor

@elevatebart elevatebart left a comment

Choose a reason for hiding this comment

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

The only suggetsion I'd have is to rename the spec file Foo.spec.ts into SmokeTest.spec.ts or mountFreamnet.spec.ts.

The rest seems to work.

Comment on lines -84 to +95
* }
* }
*/
* {
* `.icon-light-green-500`: {
* '> *[stroke].icon-light': {
* stroke: resolvedColor
* },
* '> *[fill].icon-light': {
* fill: resolvedColor
* }
* }
* }
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Hum... but OK

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it was wrong the first time I wrote it.

@JessicaSachs JessicaSachs merged commit cf05740 into unified-desktop-gui Sep 24, 2021
tgriesser added a commit that referenced this pull request Sep 28, 2021
* unified-desktop-gui: (48 commits)
  refactor: remove nexus-decorators, add data context (#18211)
  fix mountFragment tests
  fix(unified-desktop-gui branch): initial installation on windows (#18247)
  fix(unify): fixing icons and supporting router within the shared cypress commands package (#18237)
  feat(launchpad): improve layout and design (#18238)
  feat(launchpad): add design tokens from Figma (#18223)
  fix(unify): appveyor windows issue + better icon types (#18226)
  fixing broken ct tests
  fix types
  remove old code
  chore: bump deps (#18213)
  feat(app): icon library supporting Cy's custom icons (#18195)
  feat(app): adding navigation, pages, router, and layout (#18194)
  chore: Update Chrome (stable) to 94.0.4606.54 (#18196)
  fix(launchpad): fix bugs introduced by urql/graphcache (#18193)
  chore: bump yarn.lock (#18204)
  feat: add gulp makePackage, begin to scaffold data-context (#18186)
  feat(launchpad): Directory Upload in Global Mode (#18165)
  chore(tests): fix flake in net stubbing/xhr/proxy logging tests (#18163)
  chore: remove nxs.gen.ts - should be created by codegen (#18184)
  ...
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.

2 participants