acteng / atip

Active Travel Infrastructure Platform
https://acteng.github.io/atip/
Apache License 2.0
22 stars 4 forks source link

Fix storage quota bug #489

Closed Pete-Y-CS closed 6 months ago

Pete-Y-CS commented 6 months ago

Ahh just remembered you wanted us to display the amount of memory used, let me add that now

dabreegster commented 6 months ago

And is a playwright test possible?

Pete-Y-CS commented 6 months ago

image image

I tried to add a breaking length string in playwright and it timed out. Maybe there's another way but I think it would be easier with unit rather than functional tests.

dabreegster commented 6 months ago

Not sure why a 1MB file is necessary for a test when we can do "x".repeat(123). Also don't think we need to force a browser to deal with 5MB in a form. We can just set some unused local storage key directly. I started a test in https://github.com/acteng/atip/commit/7168babaac920114b1b6ee4c21c30327b0dd10c0. But the window.alerts appear to be quite flaky both in playwright and manually; they mostly haven't appeared for me, which is weird, because I thought window.alert is supposed to be blocking. What if we try a Modal instead and just have this handling in the sketch tool for now?

robinlovelace-ate commented 6 months ago

Looks like a tricky one, happy to test locally if you guys want a second pair of eyes on it.