diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-04-10 20:22:02 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-04-10 20:22:02 +0000 |
commit | 9c2b0f5477366d1e6cfc2c42a037b5e894e0aba7 (patch) | |
tree | 66b5e7df94ec9e921f6a72c72c37705bde1a8860 | |
parent | 0b5a8a34e0b7851957b976a8151a7d6acf8b9f69 (diff) | |
parent | f87158af3a20b8af94e23d800d3ee66e69623e71 (diff) | |
download | gitlab-ce-9c2b0f5477366d1e6cfc2c42a037b5e894e0aba7.tar.gz |
Merge branch '1595-ee-backport-environments-tests' into 'master'
Backport of EE changes in environments tests
See merge request !10528
-rw-r--r-- | spec/javascripts/environments/environment_spec.js | 5 | ||||
-rw-r--r-- | spec/javascripts/environments/folder/environments_folder_view_spec.js | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/spec/javascripts/environments/environment_spec.js b/spec/javascripts/environments/environment_spec.js index 4431baa4b96..9762688af1a 100644 --- a/spec/javascripts/environments/environment_spec.js +++ b/spec/javascripts/environments/environment_spec.js @@ -83,9 +83,10 @@ describe('Environment', () => { it('should render a table with environments', (done) => { setTimeout(() => { + expect(component.$el.querySelectorAll('table')).toBeDefined(); expect( - component.$el.querySelectorAll('table tbody tr').length, - ).toEqual(1); + component.$el.querySelector('.environment-name').textContent.trim(), + ).toEqual(environment.name); done(); }, 0); }); diff --git a/spec/javascripts/environments/folder/environments_folder_view_spec.js b/spec/javascripts/environments/folder/environments_folder_view_spec.js index 43a217a67f5..72f3db29a66 100644 --- a/spec/javascripts/environments/folder/environments_folder_view_spec.js +++ b/spec/javascripts/environments/folder/environments_folder_view_spec.js @@ -47,9 +47,10 @@ describe('Environments Folder View', () => { it('should render a table with environments', (done) => { setTimeout(() => { + expect(component.$el.querySelectorAll('table')).toBeDefined(); expect( - component.$el.querySelectorAll('table tbody tr').length, - ).toEqual(2); + component.$el.querySelector('.environment-name').textContent.trim(), + ).toEqual(environmentsList[0].name); done(); }, 0); }); |