diff options
author | Takuya Noguchi <takninnovationresearch@gmail.com> | 2018-01-07 18:09:42 +0300 |
---|---|---|
committer | Takuya Noguchi <takninnovationresearch@gmail.com> | 2018-04-11 17:52:47 +0300 |
commit | 21e6c7acf20b4b287da185cf4f7c90148741aa0c (patch) | |
tree | 1fda01780e2ca3b212b8c2e9fadee14157443665 /spec/javascripts/signin_tabs_memoizer_spec.js | |
parent | 9fc2493bd7f25af6a2b15c6ff6b4c224a74e0dc1 (diff) |
Refactor CSS to eliminate vertical misalignment of login nav
Diffstat (limited to 'spec/javascripts/signin_tabs_memoizer_spec.js')
-rw-r--r-- | spec/javascripts/signin_tabs_memoizer_spec.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/javascripts/signin_tabs_memoizer_spec.js b/spec/javascripts/signin_tabs_memoizer_spec.js index b1b03ef1e09..423432c9e5d 100644 --- a/spec/javascripts/signin_tabs_memoizer_spec.js +++ b/spec/javascripts/signin_tabs_memoizer_spec.js @@ -4,7 +4,7 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; (() => { describe('SigninTabsMemoizer', () => { const fixtureTemplate = 'static/signin_tabs.html.raw'; - const tabSelector = 'ul.nav-tabs'; + const tabSelector = 'ul.new-session-tabs'; const currentTabKey = 'current_signin_tab'; let memo; @@ -27,7 +27,7 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; it('does nothing if no tab was previously selected', () => { createMemoizer(); - expect(document.querySelector('li a.active').getAttribute('id')).toEqual('standard'); + expect(document.querySelector(`${tabSelector} > li.active a`).getAttribute('href')).toEqual('#ldap'); }); it('shows last selected tab on boot', () => { @@ -48,9 +48,9 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer'; it('saves last selected tab on change', () => { createMemoizer(); - document.getElementById('standard').click(); + document.querySelector('a[href="#login-pane"]').click(); - expect(memo.readData()).toEqual('#standard'); + expect(memo.readData()).toEqual('#login-pane'); }); it('overrides last selected tab with hash tag when given', () => { |