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/ci_variable_list/components/ci_variable_shared_spec.js')
-rw-r--r--spec/frontend/ci/ci_variable_list/components/ci_variable_shared_spec.js33
1 files changed, 8 insertions, 25 deletions
diff --git a/spec/frontend/ci/ci_variable_list/components/ci_variable_shared_spec.js b/spec/frontend/ci/ci_variable_list/components/ci_variable_shared_spec.js
index f7b90c3da30..6fa1915f3c1 100644
--- a/spec/frontend/ci/ci_variable_list/components/ci_variable_shared_spec.js
+++ b/spec/frontend/ci/ci_variable_list/components/ci_variable_shared_spec.js
@@ -52,6 +52,7 @@ const mockProvide = {
const defaultProps = {
areScopedVariablesAvailable: true,
+ hasEnvScopeQuery: false,
pageInfo: {},
hideEnvironmentScope: false,
refetchAfterMutation: false,
@@ -219,16 +220,12 @@ describe('Ci Variable Shared Component', () => {
expect(mockEnvironments).toHaveBeenCalled();
});
- describe('when Limit Environment Scope FF is enabled', () => {
+ // applies only to project-level CI variables
+ describe('when environment scope is limited', () => {
beforeEach(async () => {
await createComponentWithApollo({
props: { ...createProjectProps() },
- provide: {
- glFeatures: {
- ciLimitEnvironmentScope: true,
- ciVariablesPages: isVariablePagesEnabled,
- },
- },
+ provide: pagesFeatureFlagProvide,
});
});
@@ -251,26 +248,11 @@ describe('Ci Variable Shared Component', () => {
expect.objectContaining({ search: 'staging' }),
);
});
- });
-
- describe('when Limit Environment Scope FF is disabled', () => {
- beforeEach(async () => {
- await createComponentWithApollo({
- props: { ...createProjectProps() },
- provide: pagesFeatureFlagProvide,
- });
- });
- it('initial query is called with the correct variables', () => {
- expect(mockEnvironments).toHaveBeenCalledWith({ fullPath: '/namespace/project/' });
- });
+ it('does not show loading icon in table while searching for environments', () => {
+ findCiSettings().vm.$emit('search-environment-scope', 'staging');
- it(`does not refetch environments when search term is present`, async () => {
- expect(mockEnvironments).toHaveBeenCalledTimes(1);
-
- await findCiSettings().vm.$emit('search-environment-scope', 'staging');
-
- expect(mockEnvironments).toHaveBeenCalledTimes(1);
+ expect(findLoadingIcon().exists()).toBe(false);
});
});
});
@@ -532,6 +514,7 @@ describe('Ci Variable Shared Component', () => {
areEnvironmentsLoading: false,
areScopedVariablesAvailable: wrapper.props().areScopedVariablesAvailable,
hideEnvironmentScope: defaultProps.hideEnvironmentScope,
+ hasEnvScopeQuery: props.hasEnvScopeQuery,
pageInfo: defaultProps.pageInfo,
isLoading: false,
maxVariableLimit,