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

chore(server): align test folder structure to src folder structure #18597

Merged
merged 2 commits into from
Oct 25, 2021

Conversation

emilyrohrbough
Copy link
Member

In the packages/server module:

  • align the test folder structure to the src folder structure. This makes it easier to identify if src has corresponding unit tests.
  • fix broken browser_spec test log output normalization
  • fix circular dependency between config and util/config

PR Tasks

  • Have tests been added/updated?

@emilyrohrbough emilyrohrbough requested a review from a team as a code owner October 21, 2021 21:38
@emilyrohrbough emilyrohrbough requested review from mjhenkes and BlueWinds and removed request for a team October 21, 2021 21:38
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 21, 2021

Thanks for taking the time to open a PR!

@@ -2412,25 +2412,3 @@ describe('lib/config', () => {
})
})
})

describe('lib/util/config', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

moved to util/config_spec.js test file

@@ -5,7 +5,7 @@ const utils = require(`${root}../lib/browsers/utils`)
const snapshot = require('snap-shot-it')

const normalizeBrowsers = (message) => {
return message.replace(/(found are: ).*/, '$1chrome, firefox, electron')
return message.replace(/(found on your system are:)((\n.*)*)/, '$1\n- chrome\n- firefox\n- electron')
Copy link
Member Author

Choose a reason for hiding this comment

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

fixes this snapshot error which will vary depending on the browsers installed on one's machine:

----------
Difference
----------
 
 Available browsers found on your system are:
 - chrome
 - firefox
+- edge
 - electron
-------------------
Saved snapshot text
-------------------
Can't run because you've entered an invalid browser name.

Browser: 'browserNotGonnaBeFound' was not found on your system or is not supported by Cypress.

Cypress supports the following browsers:
- chrome
- chromium
- edge
- electron
- firefox

You can also use a custom browser: https://on.cypress.io/customize-browsers

Available browsers found on your system are:
- chrome
- firefox
- electron
------------
Current text
------------
Can't run because you've entered an invalid browser name.

Browser: 'browserNotGonnaBeFound' was not found on your system or is not supported by Cypress.

Cypress supports the following browsers:
- chrome
- chromium
- edge
- electron
- firefox

You can also use a custom browser: https://on.cypress.io/customize-browsers

Available browsers found on your system are:
- chrome
- firefox
- edge
- electron
--------
Diff end
--------

@cypress
Copy link

cypress bot commented Oct 21, 2021



Test summary

4208 0 50 2Flakiness 0


Run details

Project cypress
Status Passed
Commit d6f66ba
Started Oct 25, 2021 2:23 PM
Ended Oct 25, 2021 2:34 PM
Duration 11:05 💡
OS Linux Debian - 10.9
Browser Electron 93

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Contributor

@chrisbreiding chrisbreiding left a comment

Choose a reason for hiding this comment

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

Very nice 👍 I like this a lot!

@emilyrohrbough emilyrohrbough merged commit 252be9e into develop Oct 25, 2021
@emilyrohrbough emilyrohrbough deleted the align-tests-to-src branch October 25, 2021 14:41
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.

3 participants