-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
ui: Initialize color picker with user's color #3730
Conversation
Awesome, any chance you could also add some test coverage? See https://github.com/ether/etherpad-lite/tree/develop/tests/frontend/specs for other test specs Run tests by visisting /tests/frontend Cheers :D |
I'm having an interesting time re-running tests after making changes to the files. I try restarting the server, restarting my browser, etc. It stays blank a lot of the time. Any advice on getting this to be consistent? |
Do you have minify to false, maxAge to 0 and running etherpad in development mode (it will show on startup)? |
I've been in dev mode. I changed those two settings and it seems to be working. thank you! |
I guess it's not helping consistently. |
It seems to correlate to whether I currently have the file open in vim. |
630e2ae
to
de3020b
Compare
I went off of the user name test and decided to add basic coverage for the color since I didn't see it anywhere. It includes coverage for my fix here. I should note - it seems that the database doesn't reset per test runs, and the same goes for the user name test. This easily leads to a false positive for passing. (Though, I did delete the other test files while I was testing to speed it up. Maybe there's a database reset directive in one of those files?) |
It makes sense for the database to keep things persistent, but yeah, I assume the author value is being reassigned, I'm not sure of a method to get a "new" author, perhaps faking some browser property or deleting some session / cookie on the client side? It's easy to programmatically delete cookies, did you try that? |
So, there's a I made a WIP to fix both of these. Now it works as expected. Except now it breaks a bunch of other tests. Do you have any thoughts on what to try? https://github.com/ether/etherpad-lite/compare/develop...orblivion:fix-clear-cookies-tests?w=1 My "false positive" concern here and in the name change test would be fixed by fixing the helper as described above. At this point it seems to be orthogonal to this PR. Could we make that a separate fix and move on with this PR? |
I doubt @muxator would be happy to see MORE setTimeouts land in the source :D I'm not sure cookies aren't cleared "before" newPad though, you would have thought that would be the case. But maybe it's supposed to be Do a test, test cookies etc. Clear cookies.. Either way Can you keep looking into it today? I have to work on this other problem and I'm starting super late today ;\ |
Okay wtf. I can replicate your testing issue and it's horrible. I'm gonna debug that for you. Good find! My findings. [using dirtydb]
Doesn't help Clearing browser cache doesn't help This is bonkers. I have no idea what's happening.. Gimme some time.. Eh.... After I edited the file it was saving but then it was back to it's original format when I went into the folder??? I have a feeling it's to do with |
Closer. The spec framework for some reason is using the .swp file for the specs... Fixing, assuming I can. |
Fixed in #3745 Feel free to pull that and test. I'm gonna go back to working on fixing broken tests now. |
To be clear - what you replicated was related to editing with vim? Not the cookie issue? |
Confirmed that merging in #3745 fixes the vim problem 👍 |
Strange, I wasn't able to replicate my own problem with the cookies that supposedly required the timeout. But, I wrote a test that would catch it if it were to ever happen again, and I put in the other part of the cookie fix, and the result is now in my working branch for this issue: develop...orblivion:fix-clear-cookies-tests After confirming that I didn't break any more tests, I'll make a new PR for that. |
The new tests should be merged into develop today so just continue on this tomorrow with a pull of ether/develop into your branch. |
Sounds good. I ended up trying the existing tests already and it seems to not break anything new. Interestingly none of the |
(Firefox 68 esr on Debian on Qubes) |
Interesting RE importexport tests not working. Same in Chrome/Edge et al? What database backend? Does import/export work in the UI? Thanks! @muxator btw this can be reviewed/merged.. The conversation has switched to something else |
…th the user's color When opening the color chooser after a page load, the selected color is always gray, and not the user's color.
Initialize the color picker with user's current color. Was previously initialized with grey in Farbtastic library. Fixes ether#3617
d2bfb9d
to
bcbf2fc
Compare
bcbf2fc
to
32bc9cc
Compare
The peculiar caching behaviour from Etherpad hit me when testing, too. I had to try three times. 😄 Pulled in, thanks. |
Initialize the color picker with user's current color. Was previously initialized with grey in farbtastic library. Fixes #3617