-
Notifications
You must be signed in to change notification settings - Fork 237
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
Migrate changed files if possible #2049
Merged
Merged
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
f7d82c2
Migrate changed files if possible
BenSurgisonGDS 66c836d
adding test for upgradeIfPossible method
HannahJMWood 58e6336
refactoring application update into its own method
HannahJMWood b783ffb
started fixing issues with failing test
HannahJMWood c68628a
Replace any of the sections if possible
BenSurgisonGDS d4816f9
add globals line if there's jquery in application
HannahJMWood fe19a65
adding another new line and comment
HannahJMWood 7c41308
Make sure all original lines exist in sequence within the file before…
BenSurgisonGDS 2cb2652
addressing some review comments
HannahJMWood 6a0618e
Just insert user's code into starter application code
BenSurgisonGDS abfa486
Fix verbose log
BenSurgisonGDS 67fafe5
Simplify
BenSurgisonGDS c442ed0
Add change log entry
BenSurgisonGDS 9db7e7a
Migrate changed filters if possible
BenSurgisonGDS 3c9b1f9
Fixed tests
BenSurgisonGDS e70e3cb
Add change log entry
BenSurgisonGDS 59764d4
Fix application.js conversion
BenSurgisonGDS c6a064c
Merge pull request #2079 from alphagov/migrate-changed-filters-if-pos…
BenSurgisonGDS 40f2d4e
Add more complex application.js to test
BenSurgisonGDS e0518bc
Add line containing the frontend initAll function to make sure it is …
BenSurgisonGDS 6a2f813
Remove big comment if unchanged from filters file and move upgrade fu…
BenSurgisonGDS 46e3a5f
Fix test
BenSurgisonGDS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 13 additions & 1 deletion
14
__tests__/fixtures/test-v11-prototype/app/assets/javascripts/application.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
/* global $ */ | ||
/* global GOVUK */ | ||
|
||
// Warn about using the kit in production | ||
if (window.console && window.console.info) { | ||
window.console.info('GOV.UK Prototype Kit - do not use for production') | ||
} | ||
|
||
$(document).ready(function () { | ||
window.GOVUKFrontend.initAll() | ||
// Use GOV.UK shim-links-with-button-role.js to trigger a link styled to look like a button, | ||
// with role="button" when the space key is pressed. | ||
GOVUK.shimLinksWithButtonRole.init() | ||
|
||
// Details/summary polyfill from frontend toolkit | ||
GOVUK.details.init() | ||
|
||
// Show and hide toggled content | ||
// Where .multiple-choice uses the data-target attribute | ||
// to toggle hidden content | ||
var showHideContent = new GOVUK.ShowHideContent() | ||
showHideContent.init() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've removed
initAll()
from this test, I think it's important that it's still in.