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: end to end test bugs #5557

Merged
merged 8 commits into from
Apr 12, 2021

Conversation

jniles
Copy link
Collaborator

@jniles jniles commented Apr 2, 2021

Fixes a number of test bugs introduced by the transition to Jenkins and the changes we've made to Stock Management.

@jniles jniles force-pushed the fix-end-to-end-test-bugs branch 2 times, most recently from 4e89ea5 to 4ef59d7 Compare April 5, 2021 21:56
@jniles jniles requested a review from lomamech April 7, 2021 07:43
@jniles
Copy link
Collaborator Author

jniles commented Apr 7, 2021

This doesn't fix all the test bugs in the end to end tests, but it does fix a number of them.

Notably, we now create the appropriate fiscal year, we also removed writes to the integration table in importing stock, and we allow multiple flags to be passed into the chromedriver to support running on Ubuntu 20.04.

We still fail in the stock lots tests though, because of the changes to handling unique lots. I'm at the point where I think we should just rewrite the stock tests with a coherent dataset, like we did for stock integration testing.

@lomamech can you try to run these and see how they work on your machine?

@lomamech
Copy link
Collaborator

lomamech commented Apr 7, 2021

This doesn't fix all the test bugs in the end to end tests, but it does fix a number of them.

Notably, we now create the appropriate fiscal year, we also removed writes to the integration table in importing stock, and we allow multiple flags to be passed into the chromedriver to support running on Ubuntu 20.04.

We still fail in the stock lots tests though, because of the changes to handling unique lots. I'm at the point where I think we should just rewrite the stock tests with a coherent dataset, like we did for stock integration testing.

@lomamech can you try to run these and see how they work on your machine?

I just did it and twice in a row the E2E fails with the test
Stock Lots Registry
find lots by entry date:

NoSuchElementError: No element found using locator: By(css selector, [date-id="entry-date"])

image

@jniles
Copy link
Collaborator Author

jniles commented Apr 7, 2021

Thanks @lomamech! That reflects what I found as well.

Copy link
Collaborator

@lomamech lomamech left a comment

Choose a reason for hiding this comment

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

Otherwise it would take a great investigation

@jniles jniles force-pushed the fix-end-to-end-test-bugs branch 10 times, most recently from 01a91e2 to 39cc2a9 Compare April 12, 2021 07:04
@jniles jniles requested a review from lomamech April 12, 2021 07:17
jniles added 7 commits April 12, 2021 08:17
This change normalizes the CHROME_OPTIONS environmental variable so that
we can pass multiple options into the CHROME_BIN.  Basically, you can
now set your ~/.bashrc to have:

CHROME_OPTIONS="--headless --disable-gpu --no-dev-shm"

and everything will work correctly.
Fixes the employee end to end tests.
Updates the fiscal years for 2021.
Removes the integration table reference from the stored procedure to
import stock.
This commit fixes the end to end tests for stock lots and movements so
we have reasonable numbers.
Fixes a bug in the edit password behavior that broke the user registry.
Ensures that the tests work with the bhCheckboxTree component.
@jniles
Copy link
Collaborator Author

jniles commented Apr 12, 2021

@lomamech I've confirmed that this works on my local machine and on @jmcameron's machine. If you can confirm it works for you, we can get this merged.

@jniles jniles force-pushed the fix-end-to-end-test-bugs branch from 39cc2a9 to 69b74d9 Compare April 12, 2021 09:00
This commit waits for the return result from HTTP before reloading the
registry after attempting to delete a record.  Found with excellent help
from @jmcameron.
@jniles jniles force-pushed the fix-end-to-end-test-bugs branch from 69b74d9 to 94e7c97 Compare April 12, 2021 10:41
@jniles
Copy link
Collaborator Author

jniles commented Apr 12, 2021

Looks like this finally works on everyone's machines. We still have some flakey issues to work out, but this should solve a lot of issues.

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 12, 2021

Build succeeded:

@bors bors bot merged commit e2f6ec4 into Third-Culture-Software:master Apr 12, 2021
@jniles jniles deleted the fix-end-to-end-test-bugs branch April 12, 2021 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants