Skip to content

Conversation

@kchadha
Copy link
Contributor

@kchadha kchadha commented Dec 25, 2018

The regex for extracting project titles was not previously structured to include .sb files. This was breaking the project title extraction now that we allow .sb files, and the project downloader was defaulting to attempting to download a file named sb3.zip.

Fix regex to make ending "2" or "3" optional in the extension.

thisandagain
thisandagain previously approved these changes Dec 26, 2018
Copy link
Contributor

@thisandagain thisandagain left a comment

Choose a reason for hiding this comment

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

Thanks for tracking this down! Looks good, but it is failing a test:

FAIL  test/unit/containers/sb-file-uploader.test.jsx
  ● SBFileUploader Container › sets blank title with .sb filename
    expect(received).toBe(expected)
    
    Expected value to be (using ===):
      ""
    Received:
      "my project is great"
      
      at Object.<anonymous> (test/unit/containers/sb-file-uploader.test.jsx:75:25)
          at new Promise (<anonymous>)
          at <anonymous>

@kchadha
Copy link
Contributor Author

kchadha commented Dec 26, 2018

@thisandagain, thanks for catching that! I just updated the test.

@thisandagain thisandagain assigned kchadha and unassigned thisandagain Dec 26, 2018
@kchadha kchadha merged commit 2a6d798 into scratchfoundation:develop Dec 26, 2018
@kchadha kchadha deleted the fix-filename-regex branch December 26, 2018 15:27
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.

2 participants