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>2023-01-18 22:00:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 22:00:14 +0300
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js')
-rw-r--r--spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js21
1 files changed, 13 insertions, 8 deletions
diff --git a/spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js b/spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js
index 01317eb5dba..e20c4b62e77 100644
--- a/spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js
+++ b/spec/frontend/jira_connect/subscriptions/components/sign_in_oauth_button_spec.js
@@ -4,6 +4,7 @@ import { nextTick } from 'vue';
import SignInOauthButton from '~/jira_connect/subscriptions/components/sign_in_oauth_button.vue';
import {
+ GITLAB_COM_BASE_PATH,
I18N_DEFAULT_SIGN_IN_BUTTON_TEXT,
OAUTH_WINDOW_OPTIONS,
} from '~/jira_connect/subscriptions/constants';
@@ -36,6 +37,9 @@ describe('SignInOauthButton', () => {
},
state: 'good-state',
};
+ const defaultProps = {
+ gitlabBasePath: GITLAB_COM_BASE_PATH,
+ };
const createComponent = ({ slots, props } = {}) => {
store = createStore();
@@ -48,7 +52,7 @@ describe('SignInOauthButton', () => {
provide: {
oauthMetadata: mockOauthMetadata,
},
- propsData: props,
+ propsData: { ...defaultProps, ...props },
});
};
@@ -57,16 +61,17 @@ describe('SignInOauthButton', () => {
});
const findButton = () => wrapper.findComponent(GlButton);
+ describe('when `gitlabBasePath` is GitLab.com', () => {
+ it('displays a button', () => {
+ createComponent();
- it('displays a button', () => {
- createComponent();
-
- expect(findButton().exists()).toBe(true);
- expect(findButton().text()).toBe(I18N_DEFAULT_SIGN_IN_BUTTON_TEXT);
- expect(findButton().props('category')).toBe('primary');
+ expect(findButton().exists()).toBe(true);
+ expect(findButton().text()).toBe(I18N_DEFAULT_SIGN_IN_BUTTON_TEXT);
+ expect(findButton().props('category')).toBe('primary');
+ });
});
- describe('when `gitlabBasePath` is passed', () => {
+ describe('when `gitlabBasePath` is self-managed', () => {
const mockBasePath = 'https://gitlab.mycompany.com';
it('uses custom text for button', () => {