Skip to content

Commit 0db572d

Browse files
committed
Add instructions on how to confirm functionality
Why these changes are being introduced: We've introduced a section in our readmes to confirm the app is working after dependency updates, but we haven't yet done so for TIMDEX UI. Relevant ticket(s): * [TIMX-269](https://mitlibraries.atlassian.net/browse/TIMX-269) How this addresses that need: This adds said instructions to the TIMDEX UI readme. Side effects of this change: The readme did not contain information on ADRs, so that has been added, too, as is our practice with our repos.
1 parent fab482a commit 0db572d

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
A discovery interface backed by [the TIMDEX API](https://github.com/MITLibraries/timdex).
66

7+
## Architecture decision records (ADRs)
8+
9+
This repository contains ADRs in the docs/architecture-decisions directory.
10+
11+
adr-tools should allow easy creation of additional records with a standardized template.
12+
713
## TIMDEX UI Flow Diagram
814

915
Note: this is a logical flow diagram and not a direct representation of object relationships. It is also a guide, not
@@ -43,11 +49,29 @@ change as part of the work.
4349
UserInputAdvanced("User Input Advanced 🦸‍♀️")
4450
```
4551

46-
## Required Environment Variables
52+
## Developer notes
53+
54+
### Confirming functionality after dependency updates
55+
56+
This application has test coverage >95%, so running the test suite is likely sufficient to confirm
57+
functionality in most cases. Some click testing is also useful, particularly if there have been
58+
updates to `graphql-ruby` or `graphql-client`:
59+
60+
1. Confirm that basic and advanced searches do not error and return results.
61+
2. Confirm that geospatial searches (bounding box and distance) do not error and return results. (Note that this
62+
requires testing against an index that contains geospatial records.)
63+
3. Confirm that filters from multiple categories can be applied and removed, both on the sidebar
64+
and the panel beneath the search form.
65+
66+
If the `flipflop` gem has been updated, check that the `:gdt` feature is working by ensuring that
67+
UI elements specific to GDT (e.g., geospatial search fields or the 'Ask GIS' link) appear with the
68+
feature flag enabled, and do not when it is disabled.
69+
70+
### Required Environment Variables
4771

4872
- `TIMDEX_GRAPHQL`: Set this to the URL of the GraphQL endpoint. There is no default value in the application.
4973

50-
## Optional Environment Variables
74+
### Optional Environment Variables
5175

5276
- `ABOUT_APP`: If populated, an 'about' partial containing the contents of this variable will render on
5377
`basic_search#index`.
@@ -73,18 +97,18 @@ may have unexpected consequences if applied to other TIMDEX UI apps.
7397
- `TIMDEX_SOURCES`: Comma-separated list of sources to display in the advanced-search source selection element. This
7498
overrides the default which is set in ApplicationHelper.
7599

76-
### Test Environment-only Variables
100+
#### Test Environment-only Variables
77101

78102
- `SPEC_REPORTER`: Optional variable. If set, enables spec reporter style output from tests rather than minimal output.
79103
- `TIMDEX_HOST`: Test Env only. Used to ensure the VCR cassettes can properly scrub specific host data to make sure we get the same cassettes regardless of which host was used to generate the cassettes. This should be set to the host name that matches `TIMDEX_GRAPHQL`. Ex: If `TIMDEX_GRAPHQL` is `https://www.example.com/graphql` then `TIMDEX_HOST` should be `www.example.com`.
80104

81-
## Generating VCR Cassettes
105+
### Generating VCR Cassettes
82106

83107
When generating new cassettes for timdex-ui, update `.env.test` to have appropriate values for your test for `TIMDEX_GRAPHQL` and `TIMDEX_HOST`. This will allow the cassettes to be generated from any TIMDEX source with the data you need, but be sure to set them back to the original values after the cassette are generated. When the values are not set to the "fake" values we normally store, many tests will fail due to how the cassettes re-write values to normalize what we store.
84108

85109
`.env.test` should be commited to the repository, but should not include real values for a TIMDEX source even though they are not secrets. We want to use fake values to allow us to normalize our cassettes without forcing us to always generate them from a single TIMDEX source.
86110

87-
## Updating GraphQL Schema
111+
### Updating GraphQL Schema
88112

89113
The schema for the GraphQL endpoint can be found at `/config/schema/schema.json`. This schema is used by the graphql-client gem, and so must be kept in sync with the Timdex GraphQL API. Updating the schema can be accomplished via the following command in the console:
90114

0 commit comments

Comments
 (0)