Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ci/runner/components/runner_list_header_spec.js')
-rw-r--r--spec/frontend/ci/runner/components/runner_list_header_spec.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/frontend/ci/runner/components/runner_list_header_spec.js b/spec/frontend/ci/runner/components/runner_list_header_spec.js
new file mode 100644
index 00000000000..45823fa6813
--- /dev/null
+++ b/spec/frontend/ci/runner/components/runner_list_header_spec.js
@@ -0,0 +1,31 @@
+import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
+import RunnerListHeader from '~/ci/runner/components/runner_list_header.vue';
+
+describe('RunnerListHeader', () => {
+ let wrapper;
+ const createWrapper = (options) => {
+ wrapper = shallowMountExtended(RunnerListHeader, {
+ ...options,
+ });
+ };
+
+ it('shows title', () => {
+ createWrapper({
+ scopedSlots: {
+ title: () => 'My title',
+ },
+ });
+
+ expect(wrapper.find('h1').text()).toBe('My title');
+ });
+
+ it('shows actions', () => {
+ createWrapper({
+ scopedSlots: {
+ actions: () => 'My actions',
+ },
+ });
+
+ expect(wrapper.text()).toContain('My actions');
+ });
+});