Last active
December 18, 2015 23:59
-
-
Save aTei/5865525 to your computer and use it in GitHub Desktop.
BDD test secodary alts
This file contains hidden or 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
| describe 'Secondary alts', -> | |
| loadFixtures('html/vid_alts') | |
| $('.show-secondary').show_secondary() | |
| hidden_alts = null | |
| secondary_button = null | |
| beforeEach -> | |
| hidden_alts = $('.vid_view_alt_secondary') | |
| secondary_button = $('.show-secondary') | |
| it 'when loaded should be hidden', -> | |
| expect(hidden_alts).toBeHidden() | |
| it 'when button clicked, should be visible', -> | |
| secondary_button.trigger('click') | |
| expect(hidden_alts).not.toHaveClass('vid_view_alt_secondary') | |
| expect(hidden_alts).not.toBeHidden() | |
| it "when button clicked, button should be removed", -> | |
| secondary_button.trigger('click') | |
| expect(secondary_button.length).toBe(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment