02 Aug 2016
Reading time ~1 minute
What I Did
- Spent most of the day trudging through integration tests. I’m really having trouble trying to figure out what the best way to deal with images is in terms of writing feature specs. Rather than blindly walking through the dark, I decided to sit down and really read through the Dragonfly documentation to understand how things are working under the hood.
What I Learned
- I realized that I can simply utilize a pre-existing image_uid on the Amazon S3 server where the images for “These Numbers Matter” currently live. Though this would not be checking that uploading of images actually works in and of itself, it’s certainly a start. In light of this, I went ahead to properly tailor my page and photo factories in order to begin whipping out specs.
What I Still Don’t Understand
At the end of the day, I went with checking that certain CSS classes were in existence in the app within my test environment that correspond with the CK blocks that I expected to be present on the page. I’m still very much unsure if this is at all an effective to be essentially testing views. If Ben has gone in and changed the names of his classes, all of my tests will break. Alternatively, I considered simply asserting that all of the content that I had included in my page factor exists on the page or not. This would get around the previously mentioned issue, but it simply does not represent making sure that distinct CK blocks are being rendered onto the page. I’ve got to reason through some better ways and intents to go about writing such specs.