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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-03 00:07:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-03 00:07:52 +0300
commit07f40d55abd429da44fccdd95185a5ee838132d1 (patch)
treeb306d6d4991bd76ff3682e10f0ea92953e44eae2 /spec/frontend/access_tokens
parent86461e8c72db13d6d334fd107d38aa1b021d030e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/access_tokens')
-rw-r--r--spec/frontend/access_tokens/components/access_token_table_app_spec.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/frontend/access_tokens/components/access_token_table_app_spec.js b/spec/frontend/access_tokens/components/access_token_table_app_spec.js
index aed3db4aa4c..a460d18cc60 100644
--- a/spec/frontend/access_tokens/components/access_token_table_app_spec.js
+++ b/spec/frontend/access_tokens/components/access_token_table_app_spec.js
@@ -1,6 +1,6 @@
import { GlButton, GlPagination, GlTable } from '@gitlab/ui';
-import { mount } from '@vue/test-utils';
import { nextTick } from 'vue';
+import { mountExtended } from 'helpers/vue_test_utils_helper';
import AccessTokenTableApp from '~/access_tokens/components/access_token_table_app.vue';
import { EVENT_SUCCESS, PAGE_SIZE } from '~/access_tokens/components/constants';
import { __, s__, sprintf } from '~/locale';
@@ -11,6 +11,7 @@ describe('~/access_tokens/components/access_token_table_app', () => {
const accessTokenType = 'personal access token';
const accessTokenTypePlural = 'personal access tokens';
+ const information = undefined;
const initialActiveAccessTokens = [];
const noActiveTokensMessage = 'This user has no active personal access tokens.';
const showRole = false;
@@ -43,10 +44,11 @@ describe('~/access_tokens/components/access_token_table_app', () => {
];
const createComponent = (props = {}) => {
- wrapper = mount(AccessTokenTableApp, {
+ wrapper = mountExtended(AccessTokenTableApp, {
provide: {
accessTokenType,
accessTokenTypePlural,
+ information,
initialActiveAccessTokens,
noActiveTokensMessage,
showRole,
@@ -101,6 +103,13 @@ describe('~/access_tokens/components/access_token_table_app', () => {
);
});
+ it('should render information section', () => {
+ const info = 'This is my information';
+ createComponent({ information: info });
+
+ expect(wrapper.findByTestId('information-section').text()).toBe(info);
+ });
+
it('should render the `GlTable` component with default 6 column headers', () => {
createComponent();