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

Test suite changes #1254

Closed

Conversation

mohammedsahl
Copy link
Contributor

@mohammedsahl mohammedsahl commented Jun 29, 2020

Summary
This PR aims to duplicate the current sidebar e2e tests for the desktop over to mobile. In addition there is a small test for #1243

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

Integration tests added. Complete overhaul of cypress/snapshots/sidebar snapshots.

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

The PR fulfills these requirements:
You have tested in the following browsers: (Providing a detailed version will be better.)

  • Electron 78 (headless)

Other information:
Adding describe or context or it changes the filename of the snapshot. This causes test to fail.
In order to use describe and context, I had to delete all existing snapshots and re-run npm run test:e2e.

I verified if the new snapshots generated were correct through manual inspection. In addition I carried out a second verification by running npm run test:e2e twice in a row, ensuring all tests pass.

I expect some of the e2e tests checks to fail for this PR


@vercel
Copy link

vercel bot commented Jun 29, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/bv5aecgyt
✅ Preview: https://docsify-preview-git-fork-mlh-fellowship-test-suite-changes.docsify-core.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 29, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 79ff495:

Sandbox Source
hardcore-forest-cyvq0 Configuration

Copy link
Member

@anikethsaha anikethsaha left a comment

Choose a reason for hiding this comment

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

One question , did you move the tests to mobile cases or keeping both ?

@mohammedsahl
Copy link
Contributor Author

One question , did you move the tests to mobile cases or keeping both ?

Keeping both. I simply copied the same tests (with a few minor changes) over to mobile. Mobile is the equvalient of adding

cy.viewport('iphone-x`)
cy.visit('localhost:3000`)

to beforeEach

Copy link
Contributor Author

@mohammedsahl mohammedsahl left a comment

Choose a reason for hiding this comment

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

Please see #1254 (comment)

@anikethsaha
Copy link
Member

I am seeing some removal of code from the old tests. Can you give me some details about that ?

thanks

@mohammedsahl
Copy link
Contributor Author

mohammedsahl commented Jun 30, 2020

I am seeing some removal of code from the old tests. Can you give me some details about that ?

thanks

Sure, no worries! Its mainly because I've wrapped the entire test in a describe code block. I was thinking it makes it easier to organize tests that would be added in the future. If you notice, the code that is removed is exactly the same as what was added.

For example:
This was removed and this was added
Note you will need to click on "Load diff" to look at the code since the diff is pretty large

@trusktr
Copy link
Member

trusktr commented Jul 3, 2020

It's not as big a deal for test code, but I would prefer to avoid duplicate code if possible, having both mobile and desktop tests import from a shared file.

@mohammedsahl
Copy link
Contributor Author

Gonna close this PR for now. I'll have a look again once again in the near future (~1 week)

@trusktr
Copy link
Member

trusktr commented Jul 11, 2020

@mohammedsahl Another thing you can do instead of closing is leaving it open but mark it as a "draft" PR in the right sidebar. Looks like this:

Also when making a new PR it gives you the option to create it up front as a "draft" PR.

Sorry for lag on my end, It's tax time and have been working on business stuff related to that.

@mohammedsahl mohammedsahl reopened this Jul 11, 2020
@mohammedsahl mohammedsahl marked this pull request as draft July 11, 2020 13:43
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