-
Notifications
You must be signed in to change notification settings - Fork 17
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
Rspec conversion #3243
Draft
KludgeKML
wants to merge
25
commits into
main
Choose a base branch
from
rspec-conversion
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Rspec conversion #3243
Conversation
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
KludgeKML
force-pushed
the
rspec-conversion
branch
from
July 1, 2024 13:44
48f50a4
to
746d0c8
Compare
KludgeKML
force-pushed
the
rspec-conversion
branch
from
July 1, 2024 13:52
746d0c8
to
c4bc9f8
Compare
KludgeKML
force-pushed
the
rspec-conversion
branch
from
July 1, 2024 13:54
c4bc9f8
to
a3136d9
Compare
KludgeKML
force-pushed
the
rspec-conversion
branch
from
July 1, 2024 13:55
a3136d9
to
8a8d51d
Compare
KludgeKML
force-pushed
the
rspec-conversion
branch
from
July 1, 2024 13:56
8a8d51d
to
638382f
Compare
KludgeKML
force-pushed
the
rspec-conversion
branch
from
July 1, 2024 14:11
638382f
to
5a005e5
Compare
KludgeKML
force-pushed
the
rspec-conversion
branch
from
July 3, 2024 08:58
73a64a4
to
495925a
Compare
- Remove autogenerated code (we want all the defaults anyway), and replace with the rails loading code (We probably don't run individual tests enough to justify keeping spec_helper lightweight)
KludgeKML
force-pushed
the
rspec-conversion
branch
from
July 3, 2024 09:01
495925a
to
609dc37
Compare
- turn component_test_helper into support/component_helpers - add component helper to view specs
- We'll update the controller tests to request tests and move them into the requests directory
- Remove tests for Slimmer request vars because those tests aren't really possible in a request test, we'll reintroduce them as system tests in the next commit. - add slimmer and webmock requires - update configuration to include GovukContentSchemaExamples for request tests. - include examples support file, move path_for method into it and out of the spec file (it's used in multiple places)
- These tests were previously controller tests that worked by looking for Slimmer header presence. We can't do that in request tests, so we recast as system tests and actually provide the layout elements that slimmer tinkers with to control how search items appear on the final page. This isn't an ideal way to do this, because it requires a bit more knowledge of how slimmer works than you'd hope. If the layouts that are actually used no longer have the #global-header #search and form#search# elements, this test won't catch that they're gone. But that's a wider issue with slimmer/static.
- rename to remove controller name, since this is the same controller as the previous commit but a different set of features
- rename to remove controller name, since this is the same controller as the previous commit but a different set of features
- Move into a request test
- These integration tests can be made into system tests. - We create a helper for system tests using content items and begin moving the methods in from the old test_helper as they're used. - for the moment these tests aren't including JS, so we can drive them with rack_test.
KludgeKML
force-pushed
the
rspec-conversion
branch
from
July 3, 2024 09:17
609dc37
to
2c751ab
Compare
- move test fixtures.
- add code to suppress the "good job!" message
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow these steps if you are doing a Rails upgrade.