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-10-18 21:11:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-18 21:11:03 +0300
commit962b96e640834c04a729f7478afa48d3dedf9fca (patch)
treeb2f9a9407a80f45901dd462a3954600aad953209 /spec/frontend
parentb81ffd93854bcc57c493745137578f141ac8a78f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
-rw-r--r--spec/frontend/ci/runner/components/runner_details_tabs_spec.js14
-rw-r--r--spec/frontend/organizations/new/components/app_spec.js14
2 files changed, 18 insertions, 10 deletions
diff --git a/spec/frontend/ci/runner/components/runner_details_tabs_spec.js b/spec/frontend/ci/runner/components/runner_details_tabs_spec.js
index 689d0575726..516209794ad 100644
--- a/spec/frontend/ci/runner/components/runner_details_tabs_spec.js
+++ b/spec/frontend/ci/runner/components/runner_details_tabs_spec.js
@@ -54,7 +54,7 @@ describe('RunnerDetailsTabs', () => {
...options,
});
- routerPush = jest.spyOn(wrapper.vm.$router, 'push').mockImplementation(() => {});
+ routerPush = jest.spyOn(wrapper.vm.$router, 'push');
return waitForPromises();
};
@@ -67,9 +67,8 @@ describe('RunnerDetailsTabs', () => {
});
it('shows runner jobs', async () => {
- setWindowLocation(`#${JOBS_ROUTE_PATH}`);
-
- await createComponent({ mountFn: mountExtended });
+ createComponent({ mountFn: mountExtended });
+ await wrapper.vm.$router.push({ path: JOBS_ROUTE_PATH });
expect(findRunnerDetails().exists()).toBe(false);
expect(findRunnerJobs().props('runner')).toBe(mockRunner);
@@ -101,10 +100,9 @@ describe('RunnerDetailsTabs', () => {
}
});
- it.each(['#/', '#/unknown-tab'])('shows details when location hash is `%s`', async (hash) => {
- setWindowLocation(hash);
-
- await createComponent({ mountFn: mountExtended });
+ it.each(['#/', '#/unknown-tab'])('shows details when location hash is `%s`', async (path) => {
+ createComponent({ mountFn: mountExtended });
+ await wrapper.vm.$router.push({ path });
expect(findTabs().props('value')).toBe(0);
expect(findRunnerDetails().exists()).toBe(true);
diff --git a/spec/frontend/organizations/new/components/app_spec.js b/spec/frontend/organizations/new/components/app_spec.js
index 2206a6f0384..06d30ad6b12 100644
--- a/spec/frontend/organizations/new/components/app_spec.js
+++ b/spec/frontend/organizations/new/components/app_spec.js
@@ -5,7 +5,7 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import App from '~/organizations/new/components/app.vue';
import resolvers from '~/organizations/shared/graphql/resolvers';
import NewEditForm from '~/organizations/shared/components/new_edit_form.vue';
-import { visitUrl } from '~/lib/utils/url_utility';
+import { visitUrlWithAlerts } from '~/lib/utils/url_utility';
import { createOrganizationResponse } from '~/organizations/mock_data';
import { createAlert } from '~/alert';
import createMockApollo from 'helpers/mock_apollo_helper';
@@ -71,7 +71,17 @@ describe('OrganizationNewApp', () => {
});
it('redirects user to organization path', () => {
- expect(visitUrl).toHaveBeenCalledWith(createOrganizationResponse.organization.path);
+ expect(visitUrlWithAlerts).toHaveBeenCalledWith(
+ createOrganizationResponse.organization.path,
+ [
+ {
+ id: 'organization-successfully-created',
+ title: 'Organization successfully created.',
+ message: 'You can now start using your new organization.',
+ variant: 'success',
+ },
+ ],
+ );
});
});