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 all tests on Windows and add run-script for Walkontable watch (#5878) #6187

Merged
merged 9 commits into from
Aug 22, 2019

Conversation

warpech
Copy link
Member

@warpech warpech commented Aug 7, 2019

Context

Continuation of #6128. This fixes #5878

I need this change, because I am using a Windows desktop PC for development. That's because time npm run build takes 53s on Windows and 1m21s on macOS.

How has this been tested?

Run the following scripts on Windows with success:

npm run test
npm run test:walkontable
npm run test:walkontable.watch
npm run test:e2e
npm run test:e2e.watch
npm run test:unit
npm run test:unit.watch

As well as manually running spec runners in Chrome:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature or improvement (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Additional language file or change to the existing one (translations)

Related issue(s):

  1. npm task for unit tests throws errors on Windows. #5878

Checklist:

  • My code follows the code style of this project,
  • My change requires a change to the documentation.

by changing single quotes to escaped double quotes, because otherwise I got the following error:

'np' is not recognized as an internal or external command,
operable program or batch file.
'run' is not recognized as an internal or external command,
operable program or batch file.
The filename, directory name, or volume label syntax is incorrect.
'--watch'' is not recognized as an internal or external command,
operable program or batch file.
'np' is not recognized as an internal or external command,
operable program or batch file.
'run' is not recognized as an internal or external command,
operable program or batch file.
The filename, directory name, or volume label syntax is incorrect.
'--watch'' is not recognized as an internal or external command,
operable program or batch file.
analogous to "test:e2e.watch", but observes src and test changes for Walkontable
because on Windows there the viewport suitable for rendering is different, caused by the scrollbar size taller by 2px compared to macOS
…indows and macOS

because the current value (150) causes the 9th row to be only visible on Windows. This, in turn does not trigger more rows to be rendered after 9th row. So we have 9 rendered rows on Windows and 16 on macOS

With this change, there are 16 rows rendered on Windows and macOS
Copy link
Contributor

@mrpiotr-dev mrpiotr-dev left a comment

Choose a reason for hiding this comment

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

Seems to work OK.
Although, sometimes npm run test:walkontable.watch doesn't run tests until you make change in the code (on macOS).
On Window, killing a watch task works strange:
image
And then you need to use CTRL+C many times or reopen Command prompt window.

src/3rdparty/walkontable/test/spec/selection.spec.js Outdated Show resolved Hide resolved
src/3rdparty/walkontable/test/spec/table.spec.js Outdated Show resolved Hide resolved
test/e2e/core/selectAll.spec.js Outdated Show resolved Hide resolved
@warpech
Copy link
Member Author

warpech commented Aug 12, 2019

I have addressed all comments, except of this one:

Although, sometimes npm run test:walkontable.watch doesn't run tests until you make change in the code (on macOS).

I have noticed it too, but I don't know what to do about it :(

@mrpiotr-dev mrpiotr-dev assigned warpech and unassigned mrpiotr-dev Aug 22, 2019
@mrpiotr-dev mrpiotr-dev self-requested a review August 22, 2019 08:15
Copy link
Contributor

@mrpiotr-dev mrpiotr-dev left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@warpech warpech merged commit 9c147a2 into develop Aug 22, 2019
@warpech warpech deleted the fix-watch-run-scripts-windows branch August 22, 2019 21:08
@wojciechczerniak wojciechczerniak added this to the August 2019 milestone Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants