You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The regex const IMAGE_KEY_PATTERN_REGEX = /(([\/a-zA-Z0-9]+)\/([a-zA-Z0-9]+))_((\d+|auto)x(\d+|auto))(\.jpeg|\.jpg|\.png)/;
Is large and needs to be tested to make sure future changes don't break our filename schema.
The way images are currently resolved is by taking the s3 path of the failed image request, usually something like raw/1283ds7320dofiuasdofisddgn_400x300 and extracting the original file from it.
In this case it would be 1283ds7320dofiuasdofisddgn and we know that the user wants an image that is 400 pixels wide by 300 tall, respecting the aspect ratio (this is not the scope of this test though).
We need a test that will ensure that requests coming in for new image sizes are parsed and the original image path is extracted correctly.
The regex
const IMAGE_KEY_PATTERN_REGEX = /(([\/a-zA-Z0-9]+)\/([a-zA-Z0-9]+))_((\d+|auto)x(\d+|auto))(\.jpeg|\.jpg|\.png)/;Is large and needs to be tested to make sure future changes don't break our filename schema.
The way images are currently resolved is by taking the s3 path of the failed image request, usually something like
raw/1283ds7320dofiuasdofisddgn_400x300and extracting the original file from it.In this case it would be
1283ds7320dofiuasdofisddgnand we know that the user wants an image that is400pixels wide by300tall, respecting the aspect ratio (this is not the scope of this test though).We need a test that will ensure that requests coming in for new image sizes are parsed and the original image path is extracted correctly.