Commit 19ec5459 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents de2c5422 331a0a08
query groupMilestones( query projectMilestones(
$fullPath: ID! $fullPath: ID!
$state: MilestoneStateEnum $state: MilestoneStateEnum
$includeAncestors: Boolean $includeAncestors: Boolean
......
...@@ -14,27 +14,27 @@ The QA framework uses [Zeitwerk](https://github.com/fxn/zeitwerk) for class and ...@@ -14,27 +14,27 @@ The QA framework uses [Zeitwerk](https://github.com/fxn/zeitwerk) for class and
In case custom inflection logic is needed, custom inflectors are added in the [qa.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/qa.rb) file in the `loader.inflector.inflect` method invocation. In case custom inflection logic is needed, custom inflectors are added in the [qa.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/qa.rb) file in the `loader.inflector.inflect` method invocation.
## Link a test to its test-case issue ## Link a test to its test case
Every test should have a corresponding issue in the [Quality Test Cases project](https://gitlab.com/gitlab-org/quality/testcases/). Every test should have a corresponding test case as well as a results issue in the [Quality Test Cases project](https://gitlab.com/gitlab-org/quality/testcases/).
It's recommended that you reuse the issue created to plan the test. If one does not already exist you It's recommended that you reuse the issue created to plan the test as the results issue. If a test case or results issue does not already exist you
can create the issue yourself. Alternatively, you can run the test in a pipeline that has reporting can create them yourself. Alternatively, you can run the test in a pipeline that has reporting
enabled and the test-case issue reporter will automatically create a new issue. enabled and the test-case reporter will automatically create a new test case and/or results issue and link the results issue to it's corresponding test case.
Whether you create a new test-case issue or one is created automatically, you will need to manually add Whether you create a new test case or one is created automatically, you will need to manually add
a `testcase` RSpec metadata tag. In most cases, a single test will be associated with a single test-case a `testcase` RSpec metadata tag. In most cases, a single test will be associated with a single test case
issue ([see below for exceptions](#exceptions)). ([see below for exceptions](#exceptions)).
For example: For example:
```ruby ```ruby
RSpec.describe 'Stage' do RSpec.describe 'Stage' do
describe 'General description of the feature under test' do describe 'General description of the feature under test' do
it 'test name', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/:issue_id' do it 'test name', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/:test_case_id' do
... ...
end end
it 'another test', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/:another_issue_id' do it 'another test', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/:another_test_case_id' do
... ...
end end
end end
...@@ -44,10 +44,10 @@ end ...@@ -44,10 +44,10 @@ end
### Exceptions ### Exceptions
Most tests are defined by a single line of a `spec` file, which is why those tests can be linked to a Most tests are defined by a single line of a `spec` file, which is why those tests can be linked to a
single test-case issue via the `testcase` tag. single test case via the `testcase` tag.
However, some tests don't have a one-to-one relationship between a line of a `spec` file and a test-case However, some tests don't have a one-to-one relationship between a line of a `spec` file and a test case.
issue. This is because some tests are defined in a way that means a single line is associated with This is because some tests are defined in a way that means a single line is associated with
multiple tests, including: multiple tests, including:
- Parallelized tests. - Parallelized tests.
...@@ -55,13 +55,13 @@ multiple tests, including: ...@@ -55,13 +55,13 @@ multiple tests, including:
- Tests in shared examples that include more than one example. - Tests in shared examples that include more than one example.
In those and similar cases we can't assign a single `testcase` tag and so we rely on the test-case In those and similar cases we can't assign a single `testcase` tag and so we rely on the test-case
reporter to programmatically determine the correct test-case issue based on the name and description of reporter to programmatically determine the correct test case based on the name and description of
the test. In such cases, the test-case reporter will automatically create a test-case issue the first time the test. In such cases, the test-case reporter will automatically create a test case and/or results issue
the test runs, if no issue exists already. the first time the test runs, if none exist already.
In such a case, if you create the issue yourself or want to reuse an existing issue, In such a case, if you create the test case or results issue yourself or want to reuse an existing issue,
you must use this [end-to-end test issue template](https://gitlab.com/gitlab-org/quality/testcases/-/blob/master/.gitlab/issue_templates/End-to-end%20Test.md) you must use this [end-to-end test issue template](https://gitlab.com/gitlab-org/quality/testcases/-/blob/master/.gitlab/issue_templates/End-to-end%20Test.md)
to format the issue description. to format the issue description. (Note you must copy/paste this for test cases as templates aren't currently available.)
To illustrate, there are two tests in the shared examples in [`qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb`](https://gitlab.com/gitlab-org/gitlab/-/blob/47b17db82c38ab704a23b5ba5d296ea0c6a732c8/qa/qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb): To illustrate, there are two tests in the shared examples in [`qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb`](https://gitlab.com/gitlab-org/gitlab/-/blob/47b17db82c38ab704a23b5ba5d296ea0c6a732c8/qa/qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb):
...@@ -90,9 +90,9 @@ RSpec.describe 'Create' do ...@@ -90,9 +90,9 @@ RSpec.describe 'Create' do
end end
``` ```
There would be two associated test-case issues, one for each shared example, with the following content: There would be two associated test cases, one for each shared example, with the following content:
[Test 1](https://gitlab.com/gitlab-org/quality/testcases/-/issues/600): [Test 1 Test Case](https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1491):
````markdown ````markdown
```markdown ```markdown
...@@ -111,10 +111,66 @@ pushes and merges ...@@ -111,10 +111,66 @@ pushes and merges
./qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb ./qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb
### DO NOT EDIT BELOW THIS LINE
Active and historical test results:
https://gitlab.com/gitlab-org/quality/testcases/-/issues/600
```
````
[Test 1 Results Issue](https://gitlab.com/gitlab-org/quality/testcases/-/issues/600):
````markdown
```markdown
Title: browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb | Create Restricted
protected branch push and merge when only one user is allowed to merge and push to a protected
branch behaves like only user with access pushes and merges selecte...
Description:
### Full description
Create Restricted protected branch push and merge when only one user is allowed to merge and push
to a protected branch behaves like only user with access pushes and merges selected developer user
pushes and merges
### File path
./qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb
```
````
[Test 2 Test Case](https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/602):
````markdown
```markdown
Title: browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb | Create Restricted
protected branch push and merge when only one user is allowed to merge and push to a protected
branch behaves like only user with access pushes and merges unselec...
Description:
### Full description
Create Restricted protected branch push and merge when only one user is allowed to merge and push
to a protected branch behaves like only user with access pushes and merges unselected maintainer
user fails to push
### File path
./qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb
### DO NOT EDIT BELOW THIS LINE
Active and historical test results:
https://gitlab.com/gitlab-org/quality/testcases/-/issues/602
``` ```
```` ````
[Test 2](https://gitlab.com/gitlab-org/quality/testcases/-/issues/602): [Test 2 Results Issue](https://gitlab.com/gitlab-org/quality/testcases/-/issues/602):
````markdown ````markdown
```markdown ```markdown
......
...@@ -284,6 +284,7 @@ export default { ...@@ -284,6 +284,7 @@ export default {
:loading="isLoadingAdoptionData" :loading="isLoadingAdoptionData"
:data="devopsAdoptionEnabledNamespaces" :data="devopsAdoptionEnabledNamespaces"
:timestamp="timestamp" :timestamp="timestamp"
@enabledNamespacesRemoved="deleteEnabledNamespacesFromCache"
/> />
</gl-tab> </gl-tab>
......
...@@ -7,7 +7,6 @@ import { ...@@ -7,7 +7,6 @@ import {
I18N_DELETE_MODAL_CANCEL, I18N_DELETE_MODAL_CANCEL,
I18N_DELETE_MODAL_CONFIRM, I18N_DELETE_MODAL_CONFIRM,
I18N_DELETE_MODAL_ERROR, I18N_DELETE_MODAL_ERROR,
DELETE_MODAL_ID,
} from '../constants'; } from '../constants';
import disableDevopsAdoptionNamespaceMutation from '../graphql/mutations/disable_devops_adoption_namespace.mutation.graphql'; import disableDevopsAdoptionNamespaceMutation from '../graphql/mutations/disable_devops_adoption_namespace.mutation.graphql';
...@@ -21,8 +20,11 @@ export default { ...@@ -21,8 +20,11 @@ export default {
confirm: I18N_DELETE_MODAL_CONFIRM, confirm: I18N_DELETE_MODAL_CONFIRM,
error: I18N_DELETE_MODAL_ERROR, error: I18N_DELETE_MODAL_ERROR,
}, },
deleteModalId: DELETE_MODAL_ID,
props: { props: {
modalId: {
required: true,
type: String,
},
namespace: { namespace: {
type: Object, type: Object,
required: true, required: true,
...@@ -103,7 +105,7 @@ export default { ...@@ -103,7 +105,7 @@ export default {
<template> <template>
<gl-modal <gl-modal
ref="modal" ref="modal"
:modal-id="$options.deleteModalId" :modal-id="modalId"
size="sm" size="sm"
:action-primary="primaryOptions" :action-primary="primaryOptions"
:action-cancel="cancelOptions" :action-cancel="cancelOptions"
......
...@@ -7,11 +7,13 @@ import { ...@@ -7,11 +7,13 @@ import {
I18N_TABLE_HEADER_TEXT, I18N_TABLE_HEADER_TEXT,
} from '../constants'; } from '../constants';
import DevopsAdoptionOverviewCard from './devops_adoption_overview_card.vue'; import DevopsAdoptionOverviewCard from './devops_adoption_overview_card.vue';
import DevopsAdoptionOverviewTable from './devops_adoption_overview_table.vue';
export default { export default {
name: 'DevopsAdoptionOverview', name: 'DevopsAdoptionOverview',
components: { components: {
DevopsAdoptionOverviewCard, DevopsAdoptionOverviewCard,
DevopsAdoptionOverviewTable,
GlLoadingIcon, GlLoadingIcon,
}, },
props: { props: {
...@@ -79,5 +81,6 @@ export default { ...@@ -79,5 +81,6 @@ export default {
:display-meta="item.displayMeta" :display-meta="item.displayMeta"
/> />
</div> </div>
<devops-adoption-overview-table :data="data" v-on="$listeners" />
</div> </div>
</template> </template>
<script>
import {
GlTable,
GlButton,
GlModalDirective,
GlTooltipDirective,
GlIcon,
GlBadge,
GlProgressBar,
} from '@gitlab/ui';
import { uniqueId } from 'lodash';
import { formatNumber } from '~/locale';
import {
TABLE_TEST_IDS_HEADERS,
I18N_GROUP_COL_LABEL,
I18N_TABLE_REMOVE_BUTTON_DISABLED,
I18N_TABLE_REMOVE_BUTTON,
I18N_OVERVIEW_TABLE_HEADER_GROUP,
I18N_OVERVIEW_TABLE_HEADER_SUBGROUP,
TABLE_TEST_IDS_ACTIONS,
TABLE_TEST_IDS_NAMESPACE,
DEVOPS_ADOPTION_TABLE_CONFIGURATION,
} from '../constants';
import DevopsAdoptionDeleteModal from './devops_adoption_delete_modal.vue';
const thClass = ['gl-bg-white!', 'gl-text-gray-400'];
const fieldOptions = {
thClass,
thAttr: { 'data-testid': TABLE_TEST_IDS_HEADERS },
};
export default {
name: 'DevopsAdoptionOverviewTable',
components: {
GlTable,
GlButton,
GlIcon,
GlBadge,
GlProgressBar,
DevopsAdoptionDeleteModal,
},
directives: {
GlTooltip: GlTooltipDirective,
GlModal: GlModalDirective,
},
inject: {
groupGid: {
default: null,
},
},
testids: {
ACTIONS: TABLE_TEST_IDS_ACTIONS,
NAMESPACE: TABLE_TEST_IDS_NAMESPACE,
},
cols: DEVOPS_ADOPTION_TABLE_CONFIGURATION,
props: {
data: {
type: Object,
required: false,
default: () => ({}),
},
},
data() {
return {
selectedNamespace: null,
deleteModalId: uniqueId('delete-modal-'),
};
},
computed: {
tableHeader() {
return this.groupGid ? I18N_OVERVIEW_TABLE_HEADER_SUBGROUP : I18N_OVERVIEW_TABLE_HEADER_GROUP;
},
tableHeaderFields() {
return [
{
key: 'name',
label: I18N_GROUP_COL_LABEL,
...fieldOptions,
thClass: ['gl-w-grid-size-30', ...thClass],
tdClass: 'header-cell da-table-mobile-header',
},
...DEVOPS_ADOPTION_TABLE_CONFIGURATION.map((item) => ({
...item,
...fieldOptions,
label: item.title,
tdClass: 'da-table-mobile-header',
})),
{
key: 'actions',
tdClass: 'actions-cell',
...fieldOptions,
},
];
},
formattedData() {
return this.data.nodes.map((group) => ({
group,
adoption: DEVOPS_ADOPTION_TABLE_CONFIGURATION.map((item) => {
const total = item.cols.length;
const adopted = item.cols.filter(
(col) => group.latestSnapshot && Boolean(group.latestSnapshot[col.key]),
).length;
const ratio = total ? adopted / total : 1;
return {
[item.key]: {
total,
adopted,
percent: formatNumber(ratio, { style: 'percent' }),
},
};
}).reduce((values, formatted) => ({ ...values, ...formatted }), {}),
}));
},
},
methods: {
setSelectedNamespace(namespace) {
this.selectedNamespace = namespace;
},
isCurrentGroup(item) {
return item.namespace?.id === this.groupGid;
},
getDeleteButtonTooltipText(item) {
return this.isCurrentGroup(item)
? I18N_TABLE_REMOVE_BUTTON_DISABLED
: I18N_TABLE_REMOVE_BUTTON;
},
headerSlotName(key) {
return `head(${key})`;
},
cellSlotName(key) {
return `cell(${key})`;
},
},
};
</script>
<template>
<div>
<h4>{{ tableHeader }}</h4>
<gl-table
:fields="tableHeaderFields"
:items="formattedData"
thead-class="gl-border-t-0 gl-border-b-solid gl-border-b-1 gl-border-b-gray-100"
stacked="md"
>
<template v-for="header in tableHeaderFields" #[headerSlotName(header.key)]>
{{ header.label }}
</template>
<template #cell(name)="{ item }">
<div :data-testid="$options.testids.NAMESPACE">
<span v-if="item.group.latestSnapshot" class="gl-font-weight-bold">{{
item.group.namespace.fullName
}}</span>
<template v-else>
<span class="gl-text-gray-400">{{ item.group.namespace.fullName }}</span>
<gl-icon name="hourglass" class="gl-text-gray-400" />
</template>
<gl-badge v-if="isCurrentGroup(item.group)" class="gl-ml-1" variant="info">{{
__('This group')
}}</gl-badge>
</div>
</template>
<template v-for="col in $options.cols" #[cellSlotName(col.key)]="{ item }">
<div
v-if="item.group.latestSnapshot"
:key="col.key"
:data-testid="col.testId"
class="gl-display-flex gl-align-items-center gl-justify-content-end gl-justify-content-md-start"
>
<span class="gl-w-7 gl-mr-3">{{ item.adoption[col.key].percent }}</span>
<gl-progress-bar
:value="item.adoption[col.key].adopted"
:max="item.adoption[col.key].total"
class="gl-w-half"
:variant="col.variant"
/>
</div>
</template>
<template #cell(actions)="{ item }">
<span
v-gl-tooltip.hover="getDeleteButtonTooltipText(item.group)"
:data-testid="$options.testids.ACTIONS"
>
<gl-button
v-gl-modal="deleteModalId"
:disabled="isCurrentGroup(item.group)"
category="tertiary"
icon="remove"
:aria-label="getDeleteButtonTooltipText(item.group)"
@click="setSelectedNamespace(item.group)"
/>
</span>
</template>
</gl-table>
<devops-adoption-delete-modal
v-if="selectedNamespace"
:modal-id="deleteModalId"
:namespace="selectedNamespace"
@enabledNamespacesRemoved="$emit('enabledNamespacesRemoved', $event)"
@trackModalOpenState="$emit('trackModalOpenState', $event)"
/>
</div>
</template>
...@@ -7,6 +7,7 @@ import { ...@@ -7,6 +7,7 @@ import {
GlIcon, GlIcon,
GlBadge, GlBadge,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { uniqueId } from 'lodash';
import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue'; import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue';
import { import {
TABLE_TEST_IDS_HEADERS, TABLE_TEST_IDS_HEADERS,
...@@ -14,7 +15,6 @@ import { ...@@ -14,7 +15,6 @@ import {
TABLE_TEST_IDS_ACTIONS, TABLE_TEST_IDS_ACTIONS,
TABLE_TEST_IDS_LOCAL_STORAGE_SORT_BY, TABLE_TEST_IDS_LOCAL_STORAGE_SORT_BY,
TABLE_TEST_IDS_LOCAL_STORAGE_SORT_DESC, TABLE_TEST_IDS_LOCAL_STORAGE_SORT_DESC,
DELETE_MODAL_ID,
TABLE_SORT_BY_STORAGE_KEY, TABLE_SORT_BY_STORAGE_KEY,
TABLE_SORT_DESC_STORAGE_KEY, TABLE_SORT_DESC_STORAGE_KEY,
I18N_TABLE_REMOVE_BUTTON, I18N_TABLE_REMOVE_BUTTON,
...@@ -74,7 +74,6 @@ export default { ...@@ -74,7 +74,6 @@ export default {
removeButtonDisabled: I18N_TABLE_REMOVE_BUTTON_DISABLED, removeButtonDisabled: I18N_TABLE_REMOVE_BUTTON_DISABLED,
removeButton: I18N_TABLE_REMOVE_BUTTON, removeButton: I18N_TABLE_REMOVE_BUTTON,
}, },
deleteModalId: DELETE_MODAL_ID,
testids: { testids: {
NAMESPACE: TABLE_TEST_IDS_NAMESPACE, NAMESPACE: TABLE_TEST_IDS_NAMESPACE,
ACTIONS: TABLE_TEST_IDS_ACTIONS, ACTIONS: TABLE_TEST_IDS_ACTIONS,
...@@ -98,6 +97,7 @@ export default { ...@@ -98,6 +97,7 @@ export default {
sortBy: NAME_HEADER, sortBy: NAME_HEADER,
sortDesc: false, sortDesc: false,
selectedNamespace: null, selectedNamespace: null,
deleteModalId: uniqueId('delete-modal-'),
}; };
}, },
computed: { computed: {
...@@ -206,7 +206,7 @@ export default { ...@@ -206,7 +206,7 @@ export default {
:data-testid="$options.testids.ACTIONS" :data-testid="$options.testids.ACTIONS"
> >
<gl-button <gl-button
v-gl-modal="$options.deleteModalId" v-gl-modal="deleteModalId"
:disabled="isCurrentGroup(item)" :disabled="isCurrentGroup(item)"
category="tertiary" category="tertiary"
icon="remove" icon="remove"
...@@ -218,6 +218,7 @@ export default { ...@@ -218,6 +218,7 @@ export default {
</gl-table> </gl-table>
<devops-adoption-delete-modal <devops-adoption-delete-modal
v-if="selectedNamespace" v-if="selectedNamespace"
:modal-id="deleteModalId"
:namespace="selectedNamespace" :namespace="selectedNamespace"
@enabledNamespacesRemoved="$emit('enabledNamespacesRemoved', $event)" @enabledNamespacesRemoved="$emit('enabledNamespacesRemoved', $event)"
@trackModalOpenState="$emit('trackModalOpenState', $event)" @trackModalOpenState="$emit('trackModalOpenState', $event)"
......
...@@ -5,7 +5,6 @@ export const PER_PAGE = 20; ...@@ -5,7 +5,6 @@ export const PER_PAGE = 20;
export const DEBOUNCE_DELAY = 500; export const DEBOUNCE_DELAY = 500;
export const PROGRESS_BAR_HEIGHT = '8px'; export const PROGRESS_BAR_HEIGHT = '8px';
export const DATE_TIME_FORMAT = 'yyyy-mm-dd HH:MM'; export const DATE_TIME_FORMAT = 'yyyy-mm-dd HH:MM';
export const DELETE_MODAL_ID = 'devopsDeleteModal';
export const TABLE_TEST_IDS_HEADERS = 'header'; export const TABLE_TEST_IDS_HEADERS = 'header';
export const TABLE_TEST_IDS_NAMESPACE = 'namespaceCol'; export const TABLE_TEST_IDS_NAMESPACE = 'namespaceCol';
...@@ -34,6 +33,9 @@ export const I18N_TABLE_REMOVE_BUTTON_DISABLED = s__( ...@@ -34,6 +33,9 @@ export const I18N_TABLE_REMOVE_BUTTON_DISABLED = s__(
'DevopsAdoption|You cannot remove the group you are currently in.', 'DevopsAdoption|You cannot remove the group you are currently in.',
); );
export const I18N_OVERVIEW_TABLE_HEADER_GROUP = s__('DevopsAdoption|Adoption by group');
export const I18N_OVERVIEW_TABLE_HEADER_SUBGROUP = s__('DevopsAdoption|Adoption by subgroup');
export const I18N_GROUP_DROPDOWN_TEXT = s__('DevopsAdoption|Add or remove subgroups'); export const I18N_GROUP_DROPDOWN_TEXT = s__('DevopsAdoption|Add or remove subgroups');
export const I18N_GROUP_DROPDOWN_HEADER = s__('DevopsAdoption|Edit subgroups'); export const I18N_GROUP_DROPDOWN_HEADER = s__('DevopsAdoption|Edit subgroups');
export const I18N_ADMIN_DROPDOWN_TEXT = s__('DevopsAdoption|Add or remove groups'); export const I18N_ADMIN_DROPDOWN_TEXT = s__('DevopsAdoption|Add or remove groups');
...@@ -80,9 +82,11 @@ export const DEVOPS_ADOPTION_OVERALL_CONFIGURATION = { ...@@ -80,9 +82,11 @@ export const DEVOPS_ADOPTION_OVERALL_CONFIGURATION = {
export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [ export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [
{ {
title: s__('DevopsAdoption|Dev'), title: s__('DevopsAdoption|Dev'),
key: 'dev',
tab: 'dev', tab: 'dev',
icon: 'code', icon: 'code',
variant: 'warning', variant: 'warning',
testId: 'devCol',
cols: [ cols: [
{ {
key: 'mergeRequestApproved', key: 'mergeRequestApproved',
...@@ -113,8 +117,10 @@ export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [ ...@@ -113,8 +117,10 @@ export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [
{ {
title: s__('DevopsAdoption|Sec'), title: s__('DevopsAdoption|Sec'),
tab: 'sec', tab: 'sec',
key: 'sec',
icon: 'shield', icon: 'shield',
variant: 'info', variant: 'info',
testId: 'secCol',
cols: [ cols: [
{ {
key: 'dastEnabledCount', key: 'dastEnabledCount',
...@@ -141,8 +147,10 @@ export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [ ...@@ -141,8 +147,10 @@ export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [
{ {
title: s__('DevopsAdoption|Ops'), title: s__('DevopsAdoption|Ops'),
tab: 'ops', tab: 'ops',
key: 'ops',
icon: 'rocket', icon: 'rocket',
variant: 'success', variant: 'success',
testId: 'opsCol',
cols: [ cols: [
{ {
key: 'deploySucceeded', key: 'deploySucceeded',
......
...@@ -39,13 +39,13 @@ ...@@ -39,13 +39,13 @@
} }
} }
@include media-breakpoint-up(sm) { @include media-breakpoint-up(md) {
.actions-cell { .actions-cell {
width: $gl-spacing-scale-6; width: $gl-spacing-scale-6;
} }
} }
@include media-breakpoint-down(sm) { @include media-breakpoint-down(md) {
.actions-cell { .actions-cell {
div { div {
width: 100% !important; width: 100% !important;
...@@ -53,9 +53,22 @@ ...@@ -53,9 +53,22 @@
} }
} }
.actions-cell::before { .header-cell {
div {
width: 100% !important;
text-align: left !important;
padding: 0 !important;
}
}
.actions-cell::before,
.header-cell::before {
@include gl-display-none; @include gl-display-none;
} }
.da-table-mobile-header::before {
@include gl-text-gray-400;
}
} }
.progress-bar { .progress-bar {
......
...@@ -4,7 +4,6 @@ import { createLocalVue, shallowMount } from '@vue/test-utils'; ...@@ -4,7 +4,6 @@ import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vue from 'vue'; import Vue from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import DevopsAdoptionDeleteModal from 'ee/analytics/devops_report/devops_adoption/components/devops_adoption_delete_modal.vue'; import DevopsAdoptionDeleteModal from 'ee/analytics/devops_report/devops_adoption/components/devops_adoption_delete_modal.vue';
import { DELETE_MODAL_ID } from 'ee/analytics/devops_report/devops_adoption/constants';
import disableDevopsAdoptionNamespaceMutation from 'ee/analytics/devops_report/devops_adoption/graphql/mutations/disable_devops_adoption_namespace.mutation.graphql'; import disableDevopsAdoptionNamespaceMutation from 'ee/analytics/devops_report/devops_adoption/graphql/mutations/disable_devops_adoption_namespace.mutation.graphql';
import createMockApollo from 'helpers/mock_apollo_helper'; import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
...@@ -35,6 +34,8 @@ const mutateWithDataErrors = jest.fn().mockResolvedValue({ ...@@ -35,6 +34,8 @@ const mutateWithDataErrors = jest.fn().mockResolvedValue({
const mutateLoading = jest.fn().mockResolvedValue(new Promise(() => {})); const mutateLoading = jest.fn().mockResolvedValue(new Promise(() => {}));
const mutateWithErrors = jest.fn().mockRejectedValue(genericDeleteErrorMessage); const mutateWithErrors = jest.fn().mockRejectedValue(genericDeleteErrorMessage);
const modalId = 'some-generated-id';
describe('DevopsAdoptionDeleteModal', () => { describe('DevopsAdoptionDeleteModal', () => {
let wrapper; let wrapper;
...@@ -47,6 +48,7 @@ describe('DevopsAdoptionDeleteModal', () => { ...@@ -47,6 +48,7 @@ describe('DevopsAdoptionDeleteModal', () => {
localVue, localVue,
apolloProvider: mockApollo, apolloProvider: mockApollo,
propsData: { propsData: {
modalId,
namespace: devopsAdoptionNamespaceData.nodes[0], namespace: devopsAdoptionNamespaceData.nodes[0],
...props, ...props,
}, },
...@@ -72,7 +74,7 @@ describe('DevopsAdoptionDeleteModal', () => { ...@@ -72,7 +74,7 @@ describe('DevopsAdoptionDeleteModal', () => {
const modal = findModal(); const modal = findModal();
expect(modal.exists()).toBe(true); expect(modal.exists()).toBe(true);
expect(modal.props('modalId')).toBe(DELETE_MODAL_ID); expect(modal.props('modalId')).toBe(modalId);
}); });
it('displays the confirmation message', () => { it('displays the confirmation message', () => {
......
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import DevopsAdoptionOverview from 'ee/analytics/devops_report/devops_adoption/components/devops_adoption_overview.vue'; import DevopsAdoptionOverview from 'ee/analytics/devops_report/devops_adoption/components/devops_adoption_overview.vue';
import DevopsAdoptionOverviewCard from 'ee/analytics/devops_report/devops_adoption/components/devops_adoption_overview_card.vue'; import DevopsAdoptionOverviewCard from 'ee/analytics/devops_report/devops_adoption/components/devops_adoption_overview_card.vue';
import DevopsAdoptionOverviewTable from 'ee/analytics/devops_report/devops_adoption/components/devops_adoption_overview_table.vue';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { devopsAdoptionNamespaceData, overallAdoptionData } from '../mock_data'; import { devopsAdoptionNamespaceData, overallAdoptionData } from '../mock_data';
...@@ -45,6 +46,10 @@ describe('DevopsAdoptionOverview', () => { ...@@ -45,6 +46,10 @@ describe('DevopsAdoptionOverview', () => {
overallAdoptionData, overallAdoptionData,
); );
}); });
it('displays the overview table', () => {
expect(wrapper.findComponent(DevopsAdoptionOverviewTable).exists()).toBe(true);
});
}); });
}); });
......
import { GlButton, GlIcon, GlBadge, GlProgressBar } from '@gitlab/ui';
import DevopsAdoptionDeleteModal from 'ee/analytics/devops_report/devops_adoption/components/devops_adoption_delete_modal.vue';
import DevopsAdoptionOverviewTable from 'ee/analytics/devops_report/devops_adoption/components/devops_adoption_overview_table.vue';
import {
TABLE_TEST_IDS_NAMESPACE,
TABLE_TEST_IDS_ACTIONS,
TABLE_TEST_IDS_HEADERS,
DEVOPS_ADOPTION_TABLE_CONFIGURATION,
} from 'ee/analytics/devops_report/devops_adoption/constants';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import { mountExtended } from 'helpers/vue_test_utils_helper';
import { devopsAdoptionNamespaceData } from '../mock_data';
const DELETE_MODAL_ID = 'delete-modal-test-unique-id';
jest.mock('lodash/uniqueId', () => (x) => `${x}test-unique-id`);
describe('DevopsAdoptionOverviewTable', () => {
let wrapper;
const createComponent = (options = {}) => {
const { provide = {} } = options;
wrapper = mountExtended(DevopsAdoptionOverviewTable, {
propsData: {
data: devopsAdoptionNamespaceData,
},
provide,
directives: {
GlTooltip: createMockDirective(),
GlModal: createMockDirective(),
},
});
};
afterEach(() => {
wrapper.destroy();
});
const findCol = (testId) => wrapper.findByTestId(testId);
const findColRowChild = (col, row, child) => wrapper.findAllByTestId(col).at(row).find(child);
const findColSubComponent = (colTestId, childComponent) =>
findCol(colTestId).find(childComponent);
const findDeleteModal = () => wrapper.findComponent(DevopsAdoptionDeleteModal);
describe('table headings', () => {
beforeEach(() => {
createComponent();
});
it('displays the table headings', () => {
const headerTexts = wrapper
.findAllByTestId(TABLE_TEST_IDS_HEADERS)
.wrappers.map((x) => x.text());
expect(headerTexts).toEqual(['Group', 'Dev', 'Sec', 'Ops', '']);
});
});
describe('table fields', () => {
describe('enabled namespace name', () => {
it('displays the correct name', () => {
createComponent();
expect(findCol(TABLE_TEST_IDS_NAMESPACE).text()).toBe('Group 1');
});
describe('"This group" badge', () => {
const thisGroupGid = devopsAdoptionNamespaceData.nodes[0].namespace.id;
it.each`
scenario | expected | provide
${'is not shown by default'} | ${false} | ${null}
${'is not shown for other groups'} | ${false} | ${{ groupGid: 'anotherGroupGid' }}
${'is shown for the current group'} | ${true} | ${{ groupGid: thisGroupGid }}
`('$scenario', ({ expected, provide }) => {
createComponent({ provide });
const badge = findColSubComponent(TABLE_TEST_IDS_NAMESPACE, GlBadge);
expect(badge.exists()).toBe(expected);
});
});
describe('pending state (no snapshot data available)', () => {
beforeEach(() => {
createComponent();
});
it('grays the text out', () => {
const name = findColRowChild(TABLE_TEST_IDS_NAMESPACE, 1, 'span');
expect(name.classes()).toStrictEqual(['gl-text-gray-400']);
});
describe('hourglass icon', () => {
let icon;
beforeEach(() => {
icon = findColRowChild(TABLE_TEST_IDS_NAMESPACE, 1, GlIcon);
});
it('displays the icon', () => {
expect(icon.exists()).toBe(true);
expect(icon.props('name')).toBe('hourglass');
});
});
});
});
const testCols = DEVOPS_ADOPTION_TABLE_CONFIGURATION.map((col) => [col.title, col.testId]);
it.each(testCols)('displays the progress bar for %s', (title, testId) => {
createComponent();
const progressBar = findColSubComponent(testId, GlProgressBar);
expect(progressBar.exists()).toBe(true);
});
describe.each`
scenario | tooltipText | provide | disabled
${'not active group'} | ${'Remove Group from the table.'} | ${{}} | ${false}
${'active group'} | ${'You cannot remove the group you are currently in.'} | ${{ groupGid: devopsAdoptionNamespaceData.nodes[0].namespace.id }} | ${true}
`('actions column when $scenario', ({ tooltipText, provide, disabled }) => {
beforeEach(() => {
createComponent({ provide });
});
it('displays the actions icon', () => {
const button = findColSubComponent(TABLE_TEST_IDS_ACTIONS, GlButton);
const buttonModalId = getBinding(button.element, 'gl-modal').value;
expect(button.exists()).toBe(true);
expect(button.props('disabled')).toBe(disabled);
expect(button.props('icon')).toBe('remove');
expect(button.props('category')).toBe('tertiary');
expect(buttonModalId).toBe(DELETE_MODAL_ID);
});
it('wraps the icon in an element with a tooltip', () => {
const iconWrapper = findCol(TABLE_TEST_IDS_ACTIONS);
const tooltip = getBinding(iconWrapper.element, 'gl-tooltip');
expect(iconWrapper.exists()).toBe(true);
expect(tooltip).toBeDefined();
expect(tooltip.value).toBe(tooltipText);
});
});
});
describe('when delete button is clicked', () => {
beforeEach(async () => {
createComponent();
const deleteButton = findColSubComponent(TABLE_TEST_IDS_ACTIONS, GlButton);
deleteButton.vm.$emit('click');
await deleteButton.vm.$nextTick();
});
it('renders delete modal', () => {
expect(findDeleteModal().props()).toEqual({
modalId: DELETE_MODAL_ID,
namespace: expect.objectContaining(devopsAdoptionNamespaceData.nodes[0]),
});
});
it.each(['trackModalOpenState', 'enabledNamespacesRemoved'])(
're emits %s with the given value',
(event) => {
expect(wrapper.emitted(event)).toBeFalsy();
const arg = {};
findDeleteModal().vm.$emit(event, arg);
expect(wrapper.emitted(event)).toStrictEqual([[arg]]);
},
);
});
});
...@@ -11496,6 +11496,12 @@ msgstr "" ...@@ -11496,6 +11496,12 @@ msgstr ""
msgid "DevopsAdoption|Adopted" msgid "DevopsAdoption|Adopted"
msgstr "" msgstr ""
msgid "DevopsAdoption|Adoption by group"
msgstr ""
msgid "DevopsAdoption|Adoption by subgroup"
msgstr ""
msgid "DevopsAdoption|An error occurred while removing the group. Please try again." msgid "DevopsAdoption|An error occurred while removing the group. Please try again."
msgstr "" msgstr ""
......
...@@ -73,7 +73,7 @@ module QA ...@@ -73,7 +73,7 @@ module QA
it( it(
'imports group with subgroups and labels', 'imports group with subgroups and labels',
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1871' testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1873'
) do ) do
expect { imported_group.import_status }.to( expect { imported_group.import_status }.to(
eventually_eq('finished').within(max_duration: 300, sleep_interval: 2) eventually_eq('finished').within(max_duration: 300, sleep_interval: 2)
......
...@@ -30,7 +30,7 @@ module QA ...@@ -30,7 +30,7 @@ module QA
user.remove_via_api! user.remove_via_api!
end end
it 'imports Github repo via api', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1858' do it 'imports Github repo via api', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1878' do
imported_project # import the project imported_project # import the project
expect { imported_project.reload!.import_status }.to eventually_eq('finished').within(max_duration: 90) expect { imported_project.reload!.import_status }.to eventually_eq('finished').within(max_duration: 90)
......
...@@ -128,7 +128,7 @@ module QA ...@@ -128,7 +128,7 @@ module QA
) )
end end
it 'imports large Github repo via api' do it 'imports large Github repo via api', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1880' do
start = Time.now start = Time.now
Runtime::Logger.info("Importing project '#{imported_project.full_path}'") # import the project and log path Runtime::Logger.info("Importing project '#{imported_project.full_path}'") # import the project and log path
......
...@@ -9,7 +9,7 @@ module QA ...@@ -9,7 +9,7 @@ module QA
end end
context 'for the same project' do context 'for the same project' do
it 'can be used to create a file via the project API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1734' do it 'can be used to create a file via the project API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1823' do
expect do expect do
Resource::File.fabricate_via_api! do |file| Resource::File.fabricate_via_api! do |file|
file.api_client = @user_api_client file.api_client = @user_api_client
...@@ -22,7 +22,7 @@ module QA ...@@ -22,7 +22,7 @@ module QA
end.not_to raise_error end.not_to raise_error
end end
it 'can be used to commit via the API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1735' do it 'can be used to commit via the API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1822' do
expect do expect do
Resource::Repository::Commit.fabricate_via_api! do |commit| Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.api_client = @user_api_client commit.api_client = @user_api_client
...@@ -43,7 +43,7 @@ module QA ...@@ -43,7 +43,7 @@ module QA
@different_project = Resource::Project.fabricate! @different_project = Resource::Project.fabricate!
end end
it 'cannot be used to create a file via the project API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1736' do it 'cannot be used to create a file via the project API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1821' do
expect do expect do
Resource::File.fabricate_via_api! do |file| Resource::File.fabricate_via_api! do |file|
file.api_client = @user_api_client file.api_client = @user_api_client
...@@ -56,7 +56,7 @@ module QA ...@@ -56,7 +56,7 @@ module QA
end.to raise_error(Resource::ApiFabricator::ResourceFabricationFailedError, /403 Forbidden/) end.to raise_error(Resource::ApiFabricator::ResourceFabricationFailedError, /403 Forbidden/)
end end
it 'cannot be used to commit via the API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1737' do it 'cannot be used to commit via the API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1820' do
expect do expect do
Resource::Repository::Commit.fabricate_via_api! do |commit| Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.api_client = @user_api_client commit.api_client = @user_api_client
......
...@@ -8,7 +8,7 @@ module QA ...@@ -8,7 +8,7 @@ module QA
let(:api_client) { Runtime::API::Client.new(:gitlab, ip_limits: true) } let(:api_client) { Runtime::API::Client.new(:gitlab, ip_limits: true) }
let(:request) { Runtime::API::Request.new(api_client, '/users') } let(:request) { Runtime::API::Request.new(api_client, '/users') }
it 'GET /users', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/441' do it 'GET /users', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1567' do
5.times do 5.times do
get request.url get request.url
expect_status(200) expect_status(200)
......
...@@ -30,7 +30,7 @@ module QA ...@@ -30,7 +30,7 @@ module QA
@group.sandbox.remove_member(@user) @group.sandbox.remove_member(@user)
end end
it 'is not allowed to push code via the CLI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1660' do it 'is not allowed to push code via the CLI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1712' do
expect do expect do
Resource::Repository::Push.fabricate! do |push| Resource::Repository::Push.fabricate! do |push|
push.repository_http_uri = @project.repository_http_location.uri push.repository_http_uri = @project.repository_http_location.uri
...@@ -43,7 +43,7 @@ module QA ...@@ -43,7 +43,7 @@ module QA
end.to raise_error(QA::Support::Run::CommandError, /You are not allowed to push code to this project/) end.to raise_error(QA::Support::Run::CommandError, /You are not allowed to push code to this project/)
end end
it 'is not allowed to create a file via the API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1661' do it 'is not allowed to create a file via the API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1711' do
expect do expect do
Resource::File.fabricate_via_api! do |file| Resource::File.fabricate_via_api! do |file|
file.api_client = @user_api_client file.api_client = @user_api_client
...@@ -56,7 +56,7 @@ module QA ...@@ -56,7 +56,7 @@ module QA
end.to raise_error(Resource::ApiFabricator::ResourceFabricationFailedError, /403 Forbidden/) end.to raise_error(Resource::ApiFabricator::ResourceFabricationFailedError, /403 Forbidden/)
end end
it 'is not allowed to commit via the API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1662' do it 'is not allowed to commit via the API', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1710' do
expect do expect do
Resource::Repository::Commit.fabricate_via_api! do |commit| Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.api_client = @user_api_client commit.api_client = @user_api_client
......
...@@ -8,13 +8,13 @@ module QA ...@@ -8,13 +8,13 @@ module QA
let(:api_client) { Runtime::API::Client.new(:gitlab) } let(:api_client) { Runtime::API::Client.new(:gitlab) }
let(:request) { Runtime::API::Request.new(api_client, '/users') } let(:request) { Runtime::API::Request.new(api_client, '/users') }
it 'GET /users', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/460' do it 'GET /users', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1552' do
get request.url get request.url
expect_status(200) expect_status(200)
end end
it 'GET /users/:username with a valid username', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/480' do it 'GET /users/:username with a valid username', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1544' do
get request.url, { params: { username: Runtime::User.username } } get request.url, { params: { username: Runtime::User.username } }
expect_status(200) expect_status(200)
...@@ -23,7 +23,7 @@ module QA ...@@ -23,7 +23,7 @@ module QA
) )
end end
it 'GET /users/:username with an invalid username', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/462' do it 'GET /users/:username with an invalid username', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1551' do
get request.url, { params: { username: SecureRandom.hex(10) } } get request.url, { params: { username: SecureRandom.hex(10) } }
expect_status(200) expect_status(200)
......
...@@ -22,7 +22,7 @@ module QA ...@@ -22,7 +22,7 @@ module QA
push_commit('Initial commit') push_commit('Initial commit')
end end
it 'closes via pushing a commit', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/423' do it 'closes via pushing a commit', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1579' do
push_commit("Closes ##{issue_id}", false) push_commit("Closes ##{issue_id}", false)
Support::Retrier.retry_until(max_duration: 10, sleep_interval: 1) do Support::Retrier.retry_until(max_duration: 10, sleep_interval: 1) do
......
...@@ -28,7 +28,7 @@ module QA ...@@ -28,7 +28,7 @@ module QA
praefect_manager.reset_primary_to_original praefect_manager.reset_primary_to_original
end end
it 'automatically fails over', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/976' do it 'automatically fails over', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1267' do
# Create a new project with a commit and wait for it to replicate # Create a new project with a commit and wait for it to replicate
Resource::Repository::ProjectPush.fabricate! do |push| Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project push.project = project
...@@ -66,7 +66,7 @@ module QA ...@@ -66,7 +66,7 @@ module QA
end end
context 'when recovering from dataloss after failover' do context 'when recovering from dataloss after failover' do
it 'automatically reconciles', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/238187', type: :stale }, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/977' do it 'automatically reconciles', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/238187', type: :stale }, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1266' do
# Start the old primary node again # Start the old primary node again
praefect_manager.start_primary_node praefect_manager.start_primary_node
praefect_manager.wait_for_health_check_current_primary_node praefect_manager.wait_for_health_check_current_primary_node
......
...@@ -22,7 +22,7 @@ module QA ...@@ -22,7 +22,7 @@ module QA
praefect_manager.reset_primary_to_original praefect_manager.reset_primary_to_original
end end
it 'recovers from dataloss', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/978' do it 'recovers from dataloss', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1265' do
# Create a new project with a commit and wait for it to replicate # Create a new project with a commit and wait for it to replicate
praefect_manager.wait_for_replication(project.id) praefect_manager.wait_for_replication(project.id)
......
...@@ -24,7 +24,7 @@ module QA ...@@ -24,7 +24,7 @@ module QA
end end
end end
context 'when moving from one Gitaly storage to another', :orchestrated, :repository_storage, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/973' do context 'when moving from one Gitaly storage to another', :orchestrated, :repository_storage, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1270' do
let(:source_storage) { { type: :gitaly, name: 'default' } } let(:source_storage) { { type: :gitaly, name: 'default' } }
let(:destination_storage) { { type: :gitaly, name: QA::Runtime::Env.additional_repository_storage } } let(:destination_storage) { { type: :gitaly, name: QA::Runtime::Env.additional_repository_storage } }
let(:project) do let(:project) do
...@@ -45,7 +45,7 @@ module QA ...@@ -45,7 +45,7 @@ module QA
# Note: This test doesn't have the :orchestrated tag because it runs in the Test::Integration::Praefect # Note: This test doesn't have the :orchestrated tag because it runs in the Test::Integration::Praefect
# scenario with other tests that aren't considered orchestrated. # scenario with other tests that aren't considered orchestrated.
# It also runs on staging using nfs-file07 as non-cluster storage and nfs-file22 as cluster/praefect storage # It also runs on staging using nfs-file07 as non-cluster storage and nfs-file22 as cluster/praefect storage
context 'when moving from Gitaly to Gitaly Cluster', :requires_praefect, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1755', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/284645', type: :investigating } do context 'when moving from Gitaly to Gitaly Cluster', :requires_praefect, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1269', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/284645', type: :investigating } do
let(:source_storage) { { type: :gitaly, name: QA::Runtime::Env.non_cluster_repository_storage } } let(:source_storage) { { type: :gitaly, name: QA::Runtime::Env.non_cluster_repository_storage } }
let(:destination_storage) { { type: :praefect, name: QA::Runtime::Env.praefect_repository_storage } } let(:destination_storage) { { type: :praefect, name: QA::Runtime::Env.praefect_repository_storage } }
let(:project) do let(:project) do
......
...@@ -19,7 +19,7 @@ module QA ...@@ -19,7 +19,7 @@ module QA
praefect_manager.wait_for_replication(project.id) praefect_manager.wait_for_replication(project.id)
end end
it 'reads from each node', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/979' do it 'reads from each node', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1264' do
pre_read_data = praefect_manager.query_read_distribution pre_read_data = praefect_manager.query_read_distribution
wait_for_reads_to_increase(project, number_of_reads_per_loop, pre_read_data) wait_for_reads_to_increase(project, number_of_reads_per_loop, pre_read_data)
...@@ -47,7 +47,7 @@ module QA ...@@ -47,7 +47,7 @@ module QA
praefect_manager.wait_for_reliable_connection praefect_manager.wait_for_reliable_connection
end end
it 'does not read from the unhealthy node', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/980' do it 'does not read from the unhealthy node', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1263' do
pre_read_data = praefect_manager.query_read_distribution pre_read_data = praefect_manager.query_read_distribution
read_from_project(project, number_of_reads_per_loop * 10) read_from_project(project, number_of_reads_per_loop * 10)
......
...@@ -8,7 +8,7 @@ module QA ...@@ -8,7 +8,7 @@ module QA
let(:first_added_commit_message) { 'commit over git' } let(:first_added_commit_message) { 'commit over git' }
let(:second_added_commit_message) { 'commit over api' } let(:second_added_commit_message) { 'commit over api' }
it 'pushes to gitaly', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1118' do it 'pushes to gitaly', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1843' do
project = Resource::Project.fabricate! do |project| project = Resource::Project.fabricate! do |project|
project.name = "mTLS" project.name = "mTLS"
project.initialize_with_readme = true project.initialize_with_readme = true
......
...@@ -19,7 +19,7 @@ module QA ...@@ -19,7 +19,7 @@ module QA
praefect_manager.clear_replication_queue praefect_manager.clear_replication_queue
end end
it 'allows replication of different repository after interruption', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/975' do it 'allows replication of different repository after interruption', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1268' do
# We want to fill the replication queue with 10 `in_progress` jobs, # We want to fill the replication queue with 10 `in_progress` jobs,
# while a lock has been acquired, which is when the problem occurred # while a lock has been acquired, which is when the problem occurred
# as reported in https://gitlab.com/gitlab-org/gitaly/-/issues/2801 # as reported in https://gitlab.com/gitlab-org/gitaly/-/issues/2801
......
...@@ -31,7 +31,7 @@ module QA ...@@ -31,7 +31,7 @@ module QA
end end
end end
it 'sets labels', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1032' do it 'sets labels', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1244' do
create_new_mr_via_push create_new_mr_via_push
merge_request = project.merge_request_with_title(title) merge_request = project.merge_request_with_title(title)
...@@ -45,7 +45,7 @@ module QA ...@@ -45,7 +45,7 @@ module QA
create_new_mr_via_push create_new_mr_via_push
end end
it 'removes them on subsequent push', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1033' do it 'removes them on subsequent push', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1243' do
Resource::Repository::ProjectPush.fabricate! do |push| Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project push.project = project
push.file_content = "Unlabel test #{SecureRandom.hex(8)}" push.file_content = "Unlabel test #{SecureRandom.hex(8)}"
......
...@@ -29,7 +29,7 @@ module QA ...@@ -29,7 +29,7 @@ module QA
runner.remove_via_api! runner.remove_via_api!
end end
it 'sets merge when pipeline succeeds', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1037' do it 'sets merge when pipeline succeeds', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1240' do
Resource::Repository::Commit.fabricate_via_api! do |commit| Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml' commit.commit_message = 'Add .gitlab-ci.yml'
...@@ -72,7 +72,7 @@ module QA ...@@ -72,7 +72,7 @@ module QA
expect(merge_request.merge_when_pipeline_succeeds).to be true expect(merge_request.merge_when_pipeline_succeeds).to be true
end end
it 'merges when pipeline succeeds', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1036' do it 'merges when pipeline succeeds', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1241' do
Resource::Repository::Commit.fabricate_via_api! do |commit| Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project commit.project = project
commit.commit_message = 'Add .gitlab-ci.yml' commit.commit_message = 'Add .gitlab-ci.yml'
......
...@@ -17,7 +17,7 @@ module QA ...@@ -17,7 +17,7 @@ module QA
end end
end end
it 'removes the source branch', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1035' do it 'removes the source branch', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1242' do
Resource::Repository::ProjectPush.fabricate! do |push| Resource::Repository::ProjectPush.fabricate! do |push|
push.project = project push.project = project
push.branch_name = branch push.branch_name = branch
......
...@@ -16,7 +16,7 @@ module QA ...@@ -16,7 +16,7 @@ module QA
end end
end end
it 'sets a target branch', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1034' do it 'sets a target branch', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1646' do
target_branch = "push-options-test-target-#{SecureRandom.hex(8)}" target_branch = "push-options-test-target-#{SecureRandom.hex(8)}"
Resource::Repository::ProjectPush.fabricate! do |push| Resource::Repository::ProjectPush.fabricate! do |push|
......
...@@ -14,7 +14,7 @@ module QA ...@@ -14,7 +14,7 @@ module QA
end end
end end
it 'sets title and description', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1038' do it 'sets title and description', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1239' do
description = "This is a test of MR push options" description = "This is a test of MR push options"
title = "MR push options test #{SecureRandom.hex(8)}" title = "MR push options test #{SecureRandom.hex(8)}"
......
...@@ -11,7 +11,7 @@ module QA ...@@ -11,7 +11,7 @@ module QA
Runtime::ApplicationSettings.restore_application_settings(:default_branch_name) Runtime::ApplicationSettings.restore_application_settings(:default_branch_name)
end end
it 'sets the default branch name for a new project', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1018' do it 'sets the default branch name for a new project', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1247' do
project = Resource::Project.fabricate_via_api! do |project| project = Resource::Project.fabricate_via_api! do |project|
project.name = "default-branch-name" project.name = "default-branch-name"
project.initialize_with_readme = true project.initialize_with_readme = true
...@@ -30,7 +30,7 @@ module QA ...@@ -30,7 +30,7 @@ module QA
end end
end end
it 'allows a project to be created via the CLI with a different default branch name', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1019' do it 'allows a project to be created via the CLI with a different default branch name', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1246' do
project_name = "default-branch-name-via-cli-#{SecureRandom.hex(8)}" project_name = "default-branch-name-via-cli-#{SecureRandom.hex(8)}"
group = Resource::Group.fabricate_via_api! group = Resource::Group.fabricate_via_api!
......
...@@ -11,7 +11,7 @@ module QA ...@@ -11,7 +11,7 @@ module QA
let(:project_name) { "api-basics-#{SecureRandom.hex(8)}" } let(:project_name) { "api-basics-#{SecureRandom.hex(8)}" }
let(:sanitized_project_path) { CGI.escape("#{Runtime::User.username}/#{project_name}") } let(:sanitized_project_path) { CGI.escape("#{Runtime::User.username}/#{project_name}") }
it 'user creates a project with a file and deletes them afterwards', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/420' do it 'user creates a project with a file and deletes them afterwards', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1581' do
create_project_request = Runtime::API::Request.new(@api_client, '/projects') create_project_request = Runtime::API::Request.new(@api_client, '/projects')
post create_project_request.url, path: project_name, name: project_name post create_project_request.url, path: project_name, name: project_name
...@@ -77,7 +77,7 @@ module QA ...@@ -77,7 +77,7 @@ module QA
SVG SVG
end end
it 'sets no-cache headers as expected', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/421' do it 'sets no-cache headers as expected', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1580' do
create_project_request = Runtime::API::Request.new(@api_client, '/projects') create_project_request = Runtime::API::Request.new(@api_client, '/projects')
post create_project_request.url, path: project_name, name: project_name post create_project_request.url, path: project_name, name: project_name
......
...@@ -27,7 +27,7 @@ module QA ...@@ -27,7 +27,7 @@ module QA
end end
end end
it 'download archives of each user project then check they are different', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/427' do it 'download archives of each user project then check they are different', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1575' do
archive_checksums = {} archive_checksums = {}
users.each do |user_key, user_info| users.each do |user_key, user_info|
......
...@@ -17,11 +17,11 @@ module QA ...@@ -17,11 +17,11 @@ module QA
project&.remove_via_api! project&.remove_via_api!
end end
it 'pushes and creates a single push event three times', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1744' do it 'pushes and creates a single push event three times', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1840' do
verify_single_event_per_push(repeat: 3) verify_single_event_per_push(repeat: 3)
end end
it 'repeatedly pushes and creates a single push event several times', :transient, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1744' do it 'repeatedly pushes and creates a single push event several times', :transient, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1915' do
verify_single_event_per_push(repeat: Runtime::Env.transient_trials) do |i| verify_single_event_per_push(repeat: Runtime::Env.transient_trials) do |i|
QA::Runtime::Logger.info("Transient bug test action - Trial #{i}") QA::Runtime::Logger.info("Transient bug test action - Trial #{i}")
end end
......
...@@ -21,7 +21,7 @@ module QA ...@@ -21,7 +21,7 @@ module QA
praefect_manager.gitlab = 'gitlab' praefect_manager.gitlab = 'gitlab'
end end
it 'moves snippet repository from one Gitaly storage to another', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1700' do it 'moves snippet repository from one Gitaly storage to another', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1912' do
expect(snippet).to have_file('original_file') expect(snippet).to have_file('original_file')
expect { snippet.change_repository_storage(destination_storage[:name]) }.not_to raise_error expect { snippet.change_repository_storage(destination_storage[:name]) }.not_to raise_error
expect { praefect_manager.verify_storage_move(source_storage, destination_storage, repo_type: :snippet) }.not_to raise_error expect { praefect_manager.verify_storage_move(source_storage, destination_storage, repo_type: :snippet) }.not_to raise_error
......
...@@ -34,7 +34,7 @@ module QA ...@@ -34,7 +34,7 @@ module QA
project.remove_via_api! project.remove_via_api!
end end
it 'pipeline schedule is canceled', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1730' do it 'pipeline schedule is canceled', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1825' do
user.block! user.block!
expect(pipeline_schedule[:active]).not_to be_truthy, "Expected schedule active state to be false - active state #{pipeline_schedule[:active]}" expect(pipeline_schedule[:active]).not_to be_truthy, "Expected schedule active state to be false - active state #{pipeline_schedule[:active]}"
......
...@@ -72,7 +72,7 @@ module QA ...@@ -72,7 +72,7 @@ module QA
registry&.remove_via_api! registry&.remove_via_api!
end end
it 'pushes, pulls image to the registry and deletes image blob, manifest and tag', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1738' do it 'pushes, pulls image to the registry and deletes image blob, manifest and tag', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1819' do
Resource::Repository::Commit.fabricate_via_api! do |commit| Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.api_client = api_client commit.api_client = api_client
commit.commit_message = 'Add .gitlab-ci.yml' commit.commit_message = 'Add .gitlab-ci.yml'
......
...@@ -56,7 +56,7 @@ module QA ...@@ -56,7 +56,7 @@ module QA
it( it(
'imports group from UI', 'imports group from UI',
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1785', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1806',
issue_1: 'https://gitlab.com/gitlab-org/gitlab/-/issues/331252', issue_1: 'https://gitlab.com/gitlab-org/gitlab/-/issues/331252',
issue_2: 'https://gitlab.com/gitlab-org/gitlab/-/issues/333678', issue_2: 'https://gitlab.com/gitlab-org/gitlab/-/issues/333678',
# mostly impacts testing as it makes small groups import slower # mostly impacts testing as it makes small groups import slower
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Configure', :orchestrated, :mattermost do RSpec.describe 'Configure', :orchestrated, :mattermost do
describe 'Mattermost support' do describe 'Mattermost support' do
it 'user creates a group with a mattermost team', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/665' do it 'user creates a group with a mattermost team', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1459' do
Flow::Login.sign_in Flow::Login.sign_in
Page::Main::Menu.perform(&:go_to_groups) Page::Main::Menu.perform(&:go_to_groups)
......
...@@ -28,7 +28,7 @@ module QA ...@@ -28,7 +28,7 @@ module QA
end end
it 'transfers a subgroup to another group', it 'transfers a subgroup to another group',
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1724' do testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1828' do
Page::Group::Menu.perform(&:click_group_general_settings_item) Page::Group::Menu.perform(&:click_group_general_settings_item)
Page::Group::Settings::General.perform do |general| Page::Group::Settings::General.perform do |general|
general.transfer_group(target_group.path) general.transfer_group(target_group.path)
......
...@@ -44,7 +44,7 @@ module QA ...@@ -44,7 +44,7 @@ module QA
end end
it 'user transfers a project between groups', it 'user transfers a project between groups',
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1703' do testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1592' do
# Retry is needed here as the target group is not avaliable for transfer right away. # Retry is needed here as the target group is not avaliable for transfer right away.
QA::Support::Retrier.retry_on_exception(reload_page: page) do QA::Support::Retrier.retry_on_exception(reload_page: page) do
Page::File::Show.perform(&:go_to_general_settings) Page::File::Show.perform(&:go_to_general_settings)
......
...@@ -33,7 +33,7 @@ module QA ...@@ -33,7 +33,7 @@ module QA
group.add_member(developer_user, Resource::Members::AccessLevel::DEVELOPER) group.add_member(developer_user, Resource::Members::AccessLevel::DEVELOPER)
end end
it 'allows using 2FA recovery code once only', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/972' do it 'allows using 2FA recovery code once only', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1271' do
recovery_code = enable_2fa_for_user_and_fetch_recovery_code(developer_user) recovery_code = enable_2fa_for_user_and_fetch_recovery_code(developer_user)
Flow::Login.sign_in(as: developer_user, skip_page_validation: true) Flow::Login.sign_in(as: developer_user, skip_page_validation: true)
......
...@@ -19,7 +19,7 @@ module QA ...@@ -19,7 +19,7 @@ module QA
enable_2fa_for_user(user) enable_2fa_for_user(user)
end end
it 'allows 2FA code recovery via ssh' do it 'allows 2FA code recovery via ssh', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1227' do
recovery_code = Support::SSH.perform do |ssh| recovery_code = Support::SSH.perform do |ssh|
ssh.key = ssh_key ssh.key = ssh_key
ssh.uri = address.gsub(/(?<=:)(#{uri.port})/, ssh_port) ssh.uri = address.gsub(/(?<=:)(#{uri.port})/, ssh_port)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Manage', :smoke do RSpec.describe 'Manage', :smoke do
describe 'basic user login' do describe 'basic user login' do
it 'user logs in using basic credentials and logs out', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1690' do it 'user logs in using basic credentials and logs out', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1578' do
Flow::Login.sign_in Flow::Login.sign_in
Page::Main::Menu.perform do |menu| Page::Main::Menu.perform do |menu|
......
...@@ -35,7 +35,7 @@ module QA ...@@ -35,7 +35,7 @@ module QA
group.add_member(developer_user, Resource::Members::AccessLevel::DEVELOPER) group.add_member(developer_user, Resource::Members::AccessLevel::DEVELOPER)
end end
it 'allows enforcing 2FA via UI and logging in with 2FA', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/898' do it 'allows enforcing 2FA via UI and logging in with 2FA', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1320' do
enforce_two_factor_authentication_on_group(group) enforce_two_factor_authentication_on_group(group)
enable_two_factor_authentication_for_user(developer_user) enable_two_factor_authentication_for_user(developer_user)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Manage', :orchestrated, :ldap_no_tls, :ldap_tls do RSpec.describe 'Manage', :orchestrated, :ldap_no_tls, :ldap_tls do
describe 'LDAP login' do describe 'LDAP login' do
it 'user logs into GitLab using LDAP credentials', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/668' do it 'user logs into GitLab using LDAP credentials', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1456' do
Flow::Login.sign_in Flow::Login.sign_in
Page::Main::Menu.perform do |menu| Page::Main::Menu.perform do |menu|
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Manage', :orchestrated, :mattermost do RSpec.describe 'Manage', :orchestrated, :mattermost do
describe 'Mattermost login' do describe 'Mattermost login' do
it 'user logs into Mattermost using GitLab OAuth', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/666' do it 'user logs into Mattermost using GitLab OAuth', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1458' do
Flow::Login.sign_in Flow::Login.sign_in
Support::Retrier.retry_on_exception do Support::Retrier.retry_on_exception do
......
...@@ -5,7 +5,7 @@ module QA ...@@ -5,7 +5,7 @@ module QA
describe 'Instance wide SAML SSO' do describe 'Instance wide SAML SSO' do
it( it(
'user logs in to gitlab with SAML SSO', 'user logs in to gitlab with SAML SSO',
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/671' testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1453'
) do ) do
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
......
...@@ -14,7 +14,7 @@ module QA ...@@ -14,7 +14,7 @@ module QA
end end
RSpec.describe 'Manage', :skip_signup_disabled, :requires_admin do RSpec.describe 'Manage', :skip_signup_disabled, :requires_admin do
describe 'while LDAP is enabled', :orchestrated, :ldap_no_tls, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/935' do describe 'while LDAP is enabled', :orchestrated, :ldap_no_tls, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1300' do
before do before do
# When LDAP is enabled, a previous test might have created a token for the LDAP 'tanuki' user who is not an admin # When LDAP is enabled, a previous test might have created a token for the LDAP 'tanuki' user who is not an admin
# So we need to set it to nil in order to create a new token for admin user so that we are able to set_application_settings # So we need to set it to nil in order to create a new token for admin user so that we are able to set_application_settings
...@@ -39,7 +39,7 @@ module QA ...@@ -39,7 +39,7 @@ module QA
end end
end end
describe 'standard', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/936' do describe 'standard', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1652' do
context 'when admin approval is not required' do context 'when admin approval is not required' do
before(:all) do before(:all) do
set_require_admin_approval_after_user_signup_via_api(false) set_require_admin_approval_after_user_signup_via_api(false)
...@@ -66,7 +66,7 @@ module QA ...@@ -66,7 +66,7 @@ module QA
end end
end end
it 'allows recreating with same credentials', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/937' do it 'allows recreating with same credentials', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1651' do
expect(Page::Main::Menu.perform(&:signed_in?)).to be_falsy expect(Page::Main::Menu.perform(&:signed_in?)).to be_falsy
Flow::Login.sign_in(as: user, skip_page_validation: true) Flow::Login.sign_in(as: user, skip_page_validation: true)
...@@ -106,7 +106,7 @@ module QA ...@@ -106,7 +106,7 @@ module QA
end end
end end
it 'allows user login after approval', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1076' do it 'allows user login after approval', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1639' do
expect(page).to have_text(signed_up_waiting_approval_text) expect(page).to have_text(signed_up_waiting_approval_text)
Flow::Login.sign_in(as: @user, skip_page_validation: true) Flow::Login.sign_in(as: @user, skip_page_validation: true)
......
...@@ -7,7 +7,7 @@ module QA ...@@ -7,7 +7,7 @@ module QA
Runtime::Feature.enable(:invite_members_group_modal) Runtime::Feature.enable(:invite_members_group_modal)
end end
it 'user adds project member', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/482' do it 'user adds project member', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1543' do
Flow::Login.sign_in Flow::Login.sign_in
user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1)
......
...@@ -21,7 +21,7 @@ module QA ...@@ -21,7 +21,7 @@ module QA
project project
end end
context 'in group', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1857' do context 'in group', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1620' do
let(:project_name) { "project-in-group-#{SecureRandom.hex(8)}" } let(:project_name) { "project-in-group-#{SecureRandom.hex(8)}" }
let(:project) do let(:project) do
Resource::Project.fabricate_via_browser_ui! do |project| Resource::Project.fabricate_via_browser_ui! do |project|
...@@ -33,7 +33,7 @@ module QA ...@@ -33,7 +33,7 @@ module QA
it_behaves_like 'successful project creation' it_behaves_like 'successful project creation'
end end
context 'in personal namespace', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1888' do context 'in personal namespace', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1914' do
let(:project_name) { "project-in-personal-namespace-#{SecureRandom.hex(8)}" } let(:project_name) { "project-in-personal-namespace-#{SecureRandom.hex(8)}" }
let(:project) do let(:project) do
Resource::Project.fabricate_via_browser_ui! do |project| Resource::Project.fabricate_via_browser_ui! do |project|
......
...@@ -39,13 +39,13 @@ module QA ...@@ -39,13 +39,13 @@ module QA
end end
end end
context 'when logged in as a new user', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1693' do context 'when logged in as a new user', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1549' do
it_behaves_like 'loads all images' do it_behaves_like 'loads all images' do
let(:new_user) { @new_user } let(:new_user) { @new_user }
end end
end end
context 'when logged in as a new admin', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1727' do context 'when logged in as a new admin', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1550' do
it_behaves_like 'loads all images' do it_behaves_like 'loads all images' do
let(:new_user) { @new_admin } let(:new_user) { @new_admin }
end end
......
...@@ -40,7 +40,7 @@ module QA ...@@ -40,7 +40,7 @@ module QA
user.remove_via_api! user.remove_via_api!
end end
it 'imports a GitHub repo', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1762' do it 'imports a GitHub repo', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1607' do
Page::Project::Import::Github.perform do |import_page| Page::Project::Import::Github.perform do |import_page|
import_page.add_personal_access_token(Runtime::Env.github_access_token) import_page.add_personal_access_token(Runtime::Env.github_access_token)
import_page.import!(github_repo, group.full_path, imported_project_name) import_page.import!(github_repo, group.full_path, imported_project_name)
......
...@@ -5,7 +5,7 @@ module QA ...@@ -5,7 +5,7 @@ module QA
describe 'Project access tokens' do describe 'Project access tokens' do
let(:project_access_token) {QA::Resource::ProjectAccessToken.fabricate_via_browser_ui!} let(:project_access_token) {QA::Resource::ProjectAccessToken.fabricate_via_browser_ui!}
it 'can be created and revoked via the UI' do it 'can be created and revoked via the UI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1832' do
expect(project_access_token.token).not_to be_nil expect(project_access_token.token).not_to be_nil
project_access_token.revoke_via_ui! project_access_token.revoke_via_ui!
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Manage' do RSpec.describe 'Manage' do
describe 'Project activity' do describe 'Project activity' do
it 'user creates an event in the activity page upon Git push', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/407' do it 'user creates an event in the activity page upon Git push', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1591' do
Flow::Login.sign_in Flow::Login.sign_in
project = Resource::Repository::ProjectPush.fabricate! do |push| project = Resource::Repository::ProjectPush.fabricate! do |push|
......
...@@ -61,7 +61,7 @@ module QA ...@@ -61,7 +61,7 @@ module QA
user_api_client.personal_access_token user_api_client.personal_access_token
end end
it 'can be followed and their activity seen', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1773' do it 'can be followed and their activity seen', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1842' do
Flow::Login.sign_in Flow::Login.sign_in
page.visit Runtime::Scenario.gitlab_address + "/#{user.username}" page.visit Runtime::Scenario.gitlab_address + "/#{user.username}"
Page::User::Show.perform(&:click_follow_user_link) Page::User::Show.perform(&:click_follow_user_link)
......
...@@ -39,7 +39,7 @@ module QA ...@@ -39,7 +39,7 @@ module QA
end end
end end
it 'is not allowed to edit the project files', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1663' do it 'is not allowed to edit the project files', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1709' do
Flow::Login.sign_in(as: user) Flow::Login.sign_in(as: user)
project.visit! project.visit!
......
...@@ -20,7 +20,7 @@ module QA ...@@ -20,7 +20,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'is received by a user for project invitation', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/676' do it 'is received by a user for project invitation', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1448' do
project.visit! project.visit!
Page::Project::Menu.perform(&:click_members) Page::Project::Menu.perform(&:click_members)
......
...@@ -33,7 +33,7 @@ module QA ...@@ -33,7 +33,7 @@ module QA
user&.remove_via_api! user&.remove_via_api!
end end
it 'mentions a user in a comment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/452' do it 'mentions a user in a comment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1559' do
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter show.select_all_activities_filter
show.comment("cc-ing you here @#{user.username}") show.comment("cc-ing you here @#{user.username}")
......
...@@ -13,7 +13,7 @@ module QA ...@@ -13,7 +13,7 @@ module QA
issue.visit! issue.visit!
end end
it 'collapses and expands reply for comments in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1163' do it 'collapses and expands reply for comments in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1189' do
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter show.select_all_activities_filter
show.start_discussion('My first discussion') show.start_discussion('My first discussion')
......
...@@ -9,7 +9,7 @@ module QA ...@@ -9,7 +9,7 @@ module QA
Resource::Issue.fabricate_via_api!.visit! Resource::Issue.fabricate_via_api!.visit!
end end
it 'comments on an issue and edits the comment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1151' do it 'comments on an issue and edits the comment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1200' do
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
first_version_of_comment = 'First version of the comment' first_version_of_comment = 'First version of the comment'
second_version_of_comment = 'Second version of the comment' second_version_of_comment = 'Second version of the comment'
......
...@@ -9,7 +9,7 @@ module QA ...@@ -9,7 +9,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'creates an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1793' do it 'creates an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1185' do
issue = Resource::Issue.fabricate_via_browser_ui! issue = Resource::Issue.fabricate_via_browser_ui!
Page::Project::Menu.perform(&:click_issues) Page::Project::Menu.perform(&:click_issues)
...@@ -19,7 +19,7 @@ module QA ...@@ -19,7 +19,7 @@ module QA
end end
end end
it 'closes an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1792' do it 'closes an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1222' do
closed_issue.visit! closed_issue.visit!
Page::Project::Issue::Show.perform do |issue_page| Page::Project::Issue::Show.perform do |issue_page|
...@@ -51,7 +51,7 @@ module QA ...@@ -51,7 +51,7 @@ module QA
# The following example is excluded from running in `review-qa-smoke` job # The following example is excluded from running in `review-qa-smoke` job
# as it proved to be flaky when running against Review App # as it proved to be flaky when running against Review App
# See https://gitlab.com/gitlab-com/www-gitlab-com/-/issues/11568#note_621999351 # See https://gitlab.com/gitlab-com/www-gitlab-com/-/issues/11568#note_621999351
it 'comments on an issue with an attachment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1742', except: { job: 'review-qa-smoke' } do it 'comments on an issue with an attachment', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1599', except: { job: 'review-qa-smoke' } do
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
show.comment('See attached image for scale', attachment: file_to_attach) show.comment('See attached image for scale', attachment: file_to_attach)
......
...@@ -28,7 +28,7 @@ module QA ...@@ -28,7 +28,7 @@ module QA
end end
end end
it 'creates an issue via custom template', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1229' do it 'creates an issue via custom template', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1612' do
Resource::Issue.fabricate_via_browser_ui! do |issue| Resource::Issue.fabricate_via_browser_ui! do |issue|
issue.project = template_project issue.project = template_project
issue.template = template_name issue.template = template_name
......
...@@ -22,7 +22,7 @@ module QA ...@@ -22,7 +22,7 @@ module QA
Page::Project::Menu.perform(&:click_issues) Page::Project::Menu.perform(&:click_issues)
end end
it 'successfully exports issues list as CSV', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1141' do it 'successfully exports issues list as CSV', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1210' do
Page::Project::Issue::Index.perform do |index| Page::Project::Issue::Index.perform do |index|
index.click_export_as_csv_button index.click_export_as_csv_button
......
...@@ -9,7 +9,7 @@ module QA ...@@ -9,7 +9,7 @@ module QA
Resource::Issue.fabricate_via_api!.visit! Resource::Issue.fabricate_via_api!.visit!
end end
it 'filters comments and activities in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/425' do it 'filters comments and activities in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1577' do
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
my_own_comment = "My own comment" my_own_comment = "My own comment"
made_the_issue_confidential = "made the issue confidential" made_the_issue_confidential = "made the issue confidential"
......
...@@ -13,7 +13,7 @@ module QA ...@@ -13,7 +13,7 @@ module QA
end.project.visit! end.project.visit!
end end
it 'shows issue suggestions when creating a new issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1175' do it 'shows issue suggestions when creating a new issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1179' do
Page::Project::Show.perform(&:go_to_new_issue) Page::Project::Show.perform(&:go_to_new_issue)
Page::Project::Issue::New.perform do |new_page| Page::Project::Issue::New.perform do |new_page|
new_page.fill_title("issue") new_page.fill_title("issue")
......
...@@ -14,7 +14,7 @@ module QA ...@@ -14,7 +14,7 @@ module QA
end end
end end
it 'imports issues from Jira', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/896' do it 'imports issues from Jira', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1321' do
set_up_jira_integration set_up_jira_integration
import_jira_issues import_jira_issues
......
...@@ -23,7 +23,7 @@ module QA ...@@ -23,7 +23,7 @@ module QA
end.visit! end.visit!
end end
it 'mentions another user in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1166' do it 'mentions another user in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1186' do
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
at_username = "@#{user.username}" at_username = "@#{user.username}"
......
...@@ -28,7 +28,7 @@ module QA ...@@ -28,7 +28,7 @@ module QA
Runtime::Feature.disable(:invite_members_group_modal, project: project) Runtime::Feature.disable(:invite_members_group_modal, project: project)
end end
it 'update without refresh', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1048' do it 'update without refresh', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1644' do
issue = Resource::Issue.fabricate_via_api! do |issue| issue = Resource::Issue.fabricate_via_api! do |issue|
issue.project = project issue.project = project
issue.assignee_ids = [user1.id] issue.assignee_ids = [user1.id]
......
...@@ -13,7 +13,7 @@ module QA ...@@ -13,7 +13,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'focuses on issue board', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1176' do it 'focuses on issue board', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1178' do
project.visit! project.visit!
Page::Project::Menu.perform(&:go_to_boards) Page::Project::Menu.perform(&:go_to_boards)
......
...@@ -14,7 +14,7 @@ module QA ...@@ -14,7 +14,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'creates a group milestone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1148' do it 'creates a group milestone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1203' do
group_milestone = Resource::GroupMilestone.fabricate_via_browser_ui! do |milestone| group_milestone = Resource::GroupMilestone.fabricate_via_browser_ui! do |milestone|
milestone.title = title milestone.title = title
milestone.description = description milestone.description = description
......
...@@ -14,7 +14,7 @@ module QA ...@@ -14,7 +14,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'creates a project milestone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1165' do it 'creates a project milestone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1187' do
project_milestone = Resource::ProjectMilestone.fabricate_via_browser_ui! do |milestone| project_milestone = Resource::ProjectMilestone.fabricate_via_browser_ui! do |milestone|
milestone.title = title milestone.title = title
milestone.description = description milestone.description = description
......
...@@ -25,7 +25,7 @@ module QA ...@@ -25,7 +25,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'relates and unrelates one issue to/from another', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1172' do it 'relates and unrelates one issue to/from another', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1180' do
issue_1.visit! issue_1.visit!
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
......
...@@ -16,7 +16,7 @@ module QA ...@@ -16,7 +16,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'comments with mention on a discussion in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1753' do it 'comments with mention on a discussion in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1816' do
Runtime::Env.transient_trials.times do |i| Runtime::Env.transient_trials.times do |i|
QA::Runtime::Logger.info("Transient bug test action - Trial #{i}") QA::Runtime::Logger.info("Transient bug test action - Trial #{i}")
......
...@@ -12,7 +12,7 @@ module QA ...@@ -12,7 +12,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'user adds a design and annotates it', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1692' do it 'user adds a design and annotates it', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1290' do
issue.visit! issue.visit!
Page::Project::Issue::Show.perform do |issue| Page::Project::Issue::Show.perform do |issue|
......
...@@ -23,7 +23,7 @@ module QA ...@@ -23,7 +23,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'user archives a design', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1761' do it 'user archives a design', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1812' do
third_design.issue.visit! third_design.issue.visit!
Page::Project::Issue::Show.perform do |issue| Page::Project::Issue::Show.perform do |issue|
......
...@@ -13,7 +13,7 @@ module QA ...@@ -13,7 +13,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'user adds a design and modifies it', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1760' do it 'user adds a design and modifies it', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1813' do
design.issue.visit! design.issue.visit!
Page::Project::Issue::Show.perform do |issue| Page::Project::Issue::Show.perform do |issue|
......
...@@ -25,7 +25,7 @@ module QA ...@@ -25,7 +25,7 @@ module QA
setup_jenkins setup_jenkins
end end
it 'integrates and displays build status for MR pipeline in GitLab', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/719' do it 'integrates and displays build status for MR pipeline in GitLab', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1410' do
login_to_gitlab login_to_gitlab
setup_project_integration_with_jenkins setup_project_integration_with_jenkins
......
...@@ -36,7 +36,7 @@ module QA ...@@ -36,7 +36,7 @@ module QA
expect(page).not_to have_text("Requests to the local network are not allowed") expect(page).not_to have_text("Requests to the local network are not allowed")
end end
it 'closes an issue via pushing a commit', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/827' do it 'closes an issue via pushing a commit', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1362' do
issue_key = Vendor::Jira::JiraAPI.perform do |jira_api| issue_key = Vendor::Jira::JiraAPI.perform do |jira_api|
jira_api.create_issue(jira_project_key) jira_api.create_issue(jira_project_key)
end end
...@@ -46,7 +46,7 @@ module QA ...@@ -46,7 +46,7 @@ module QA
expect_issue_done(issue_key) expect_issue_done(issue_key)
end end
it 'closes an issue via a merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/828' do it 'closes an issue via a merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1361' do
issue_key = Vendor::Jira::JiraAPI.perform do |jira_api| issue_key = Vendor::Jira::JiraAPI.perform do |jira_api|
jira_api.create_issue(jira_project_key) jira_api.create_issue(jira_project_key)
end end
......
...@@ -22,7 +22,7 @@ module QA ...@@ -22,7 +22,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'creates a merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1616' do it 'creates a merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1836' do
feature_mr.visit! feature_mr.visit!
Page::MergeRequest::Show.perform do |merge_request| Page::MergeRequest::Show.perform do |merge_request|
......
...@@ -29,7 +29,7 @@ module QA ...@@ -29,7 +29,7 @@ module QA
commit.visit! commit.visit!
end end
it 'creates a merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1752' do it 'creates a merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1817' do
Page::Project::Commit::Show.perform(&:cherry_pick_commit) Page::Project::Commit::Show.perform(&:cherry_pick_commit)
Page::MergeRequest::New.perform(&:create_merge_request) Page::MergeRequest::New.perform(&:create_merge_request)
......
...@@ -19,7 +19,7 @@ module QA ...@@ -19,7 +19,7 @@ module QA
it( it(
'creates a basic merge request', 'creates a basic merge request',
:smoke, :smoke,
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1850' testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1590'
) do ) do
Resource::MergeRequest.fabricate_via_browser_ui! do |merge_request| Resource::MergeRequest.fabricate_via_browser_ui! do |merge_request|
merge_request.project = project merge_request.project = project
...@@ -35,7 +35,7 @@ module QA ...@@ -35,7 +35,7 @@ module QA
it( it(
'creates a merge request with a milestone and label', 'creates a merge request with a milestone and label',
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/514' testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1542'
) do ) do
gitlab_account_username = "@#{Runtime::User.username}" gitlab_account_username = "@#{Runtime::User.username}"
......
...@@ -29,7 +29,7 @@ module QA ...@@ -29,7 +29,7 @@ module QA
end end
end end
it 'creates a merge request via custom template', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1230' do it 'creates a merge request via custom template', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1680' do
Resource::MergeRequest.fabricate_via_browser_ui! do |merge_request| Resource::MergeRequest.fabricate_via_browser_ui! do |merge_request|
merge_request.project = template_project merge_request.project = template_project
merge_request.title = merge_request_title merge_request.title = merge_request_title
......
...@@ -4,7 +4,7 @@ module QA ...@@ -4,7 +4,7 @@ module QA
RSpec.describe 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/332588', type: :investigating } do RSpec.describe 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/332588', type: :investigating } do
describe 'Merge request creation from fork' do describe 'Merge request creation from fork' do
# TODO: Please add this back to :smoke suite as soon as https://gitlab.com/gitlab-org/gitlab/-/issues/332588 is addressed # TODO: Please add this back to :smoke suite as soon as https://gitlab.com/gitlab-org/gitlab/-/issues/332588 is addressed
it 'can merge feature branch fork to mainline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1701' do it 'can merge feature branch fork to mainline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1305' do
merge_request = Resource::MergeRequestFromFork.fabricate_via_browser_ui! do |merge_request| merge_request = Resource::MergeRequestFromFork.fabricate_via_browser_ui! do |merge_request|
merge_request.fork_branch = 'feature-branch' merge_request.fork_branch = 'feature-branch'
end end
......
...@@ -87,11 +87,11 @@ module QA ...@@ -87,11 +87,11 @@ module QA
end end
end end
context 'when merging once', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1684' do context 'when merging once', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1834' do
it_behaves_like 'merge when pipeline succeeds' it_behaves_like 'merge when pipeline succeeds'
end end
context 'when merging several times', :transient, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1684' do context 'when merging several times', :transient, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1917' do
it_behaves_like 'merge when pipeline succeeds', repeat: Runtime::Env.transient_trials it_behaves_like 'merge when pipeline succeeds', repeat: Runtime::Env.transient_trials
end end
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
RSpec.describe 'Create', quarantine: { only: { subdomain: :staging }, issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/323990', type: :flaky } do RSpec.describe 'Create', quarantine: { only: { subdomain: :staging }, issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/323990', type: :flaky } do
describe 'Merge request rebasing' do describe 'Merge request rebasing' do
it 'user rebases source branch of merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1800' do it 'user rebases source branch of merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1596' do
Flow::Login.sign_in Flow::Login.sign_in
project = Resource::Project.fabricate_via_api! do |project| project = Resource::Project.fabricate_via_api! do |project|
......
...@@ -27,7 +27,7 @@ module QA ...@@ -27,7 +27,7 @@ module QA
commit.visit! commit.visit!
end end
it 'creates a merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1784' do it 'creates a merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1807' do
Page::Project::Commit::Show.perform(&:revert_commit) Page::Project::Commit::Show.perform(&:revert_commit)
Page::MergeRequest::New.perform(&:create_merge_request) Page::MergeRequest::New.perform(&:create_merge_request)
......
...@@ -23,7 +23,7 @@ module QA ...@@ -23,7 +23,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'can be reverted', :can_use_large_setup, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1745' do it 'can be reverted', :can_use_large_setup, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1818' do
revertable_merge_request.visit! revertable_merge_request.visit!
Page::MergeRequest::Show.perform do |merge_request| Page::MergeRequest::Show.perform do |merge_request|
......
...@@ -31,7 +31,7 @@ module QA ...@@ -31,7 +31,7 @@ module QA
merge_request.visit! merge_request.visit!
end end
it 'user squashes commits while merging', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/418' do it 'user squashes commits while merging', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1583' do
Page::MergeRequest::Show.perform do |merge_request_page| Page::MergeRequest::Show.perform do |merge_request_page|
merge_request_page.retry_on_exception(reload: true) do merge_request_page.retry_on_exception(reload: true) do
expect(merge_request_page).to have_text('to be squashed') expect(merge_request_page).to have_text('to be squashed')
......
...@@ -46,7 +46,7 @@ module QA ...@@ -46,7 +46,7 @@ module QA
merge_request.visit! merge_request.visit!
end end
it 'applies multiple suggestions', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1177' do it 'applies multiple suggestions', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1838' do
Page::MergeRequest::Show.perform do |merge_request| Page::MergeRequest::Show.perform do |merge_request|
merge_request.click_diffs_tab merge_request.click_diffs_tab
4.times { merge_request.add_suggestion_to_batch } 4.times { merge_request.add_suggestion_to_batch }
......
...@@ -43,7 +43,7 @@ module QA ...@@ -43,7 +43,7 @@ module QA
merge_request.visit! merge_request.visit!
end end
it 'applies a single suggestion with a custom message' do it 'applies a single suggestion with a custom message', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1815' do
Page::MergeRequest::Show.perform do |merge_request| Page::MergeRequest::Show.perform do |merge_request|
merge_request.click_diffs_tab merge_request.click_diffs_tab
merge_request.apply_suggestion_with_message(commit_message) merge_request.apply_suggestion_with_message(commit_message)
......
...@@ -15,7 +15,7 @@ module QA ...@@ -15,7 +15,7 @@ module QA
merge_request.visit! merge_request.visit!
end end
it 'views the merge request email patches', :can_use_large_setup, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1689' do it 'views the merge request email patches', :can_use_large_setup, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1585' do
Page::MergeRequest::Show.perform(&:view_email_patches) Page::MergeRequest::Show.perform(&:view_email_patches)
expect(page.text).to start_with('From') expect(page.text).to start_with('From')
...@@ -23,7 +23,7 @@ module QA ...@@ -23,7 +23,7 @@ module QA
expect(page).to have_content("diff --git a/#{merge_request.file_name} b/#{merge_request.file_name}") expect(page).to have_content("diff --git a/#{merge_request.file_name} b/#{merge_request.file_name}")
end end
it 'views the merge request plain diff', :can_use_large_setup, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/417' do it 'views the merge request plain diff', :can_use_large_setup, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1584' do
Page::MergeRequest::Show.perform(&:view_plain_diff) Page::MergeRequest::Show.perform(&:view_plain_diff)
expect(page.text).to start_with('diff') expect(page.text).to start_with('diff')
......
...@@ -32,7 +32,7 @@ module QA ...@@ -32,7 +32,7 @@ module QA
merge_request.visit! merge_request.visit!
end end
it 'views the merge-ref diff by default' do it 'views the merge-ref diff by default', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1902' do
Page::MergeRequest::Show.perform do |mr_page| Page::MergeRequest::Show.perform do |mr_page|
mr_page.click_diffs_tab mr_page.click_diffs_tab
mr_page.click_target_version_dropdown mr_page.click_target_version_dropdown
...@@ -57,7 +57,7 @@ module QA ...@@ -57,7 +57,7 @@ module QA
merge_request.visit! merge_request.visit!
end end
it 'views the merge-base diff by default' do it 'views the merge-base diff by default', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1903' do
Page::MergeRequest::Show.perform do |mr_page| Page::MergeRequest::Show.perform do |mr_page|
mr_page.click_diffs_tab mr_page.click_diffs_tab
mr_page.click_target_version_dropdown mr_page.click_target_version_dropdown
......
...@@ -61,7 +61,7 @@ module QA ...@@ -61,7 +61,7 @@ module QA
project.visit! project.visit!
end end
it 'lists branches correctly after CRUD operations', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1688' do it 'lists branches correctly after CRUD operations', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1588' do
Page::Project::Menu.perform(&:go_to_repository_branches) Page::Project::Menu.perform(&:go_to_repository_branches)
expect(page).to have_content(master_branch) expect(page).to have_content(master_branch)
......
...@@ -16,7 +16,7 @@ module QA ...@@ -16,7 +16,7 @@ module QA
end end
context 'when branch name contains slash, hash, double dash, and capital letter' do context 'when branch name contains slash, hash, double dash, and capital letter' do
it 'renders repository file tree correctly', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1780' do it 'renders repository file tree correctly', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1809' do
Resource::Repository::Commit.fabricate_via_api! do |commit| Resource::Repository::Commit.fabricate_via_api! do |commit|
commit.project = project commit.project = project
commit.branch = branch_name commit.branch = branch_name
......
...@@ -28,7 +28,7 @@ module QA ...@@ -28,7 +28,7 @@ module QA
project.wait_for_push_new_branch project.wait_for_push_new_branch
end end
it 'user performs a deep clone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/475' do it 'user performs a deep clone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1546' do
Git::Repository.perform do |repository| Git::Repository.perform do |repository|
repository.uri = project.repository_http_location.uri repository.uri = project.repository_http_location.uri
repository.use_default_credentials repository.use_default_credentials
...@@ -39,7 +39,7 @@ module QA ...@@ -39,7 +39,7 @@ module QA
end end
end end
it 'user performs a shallow clone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/411' do it 'user performs a shallow clone', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1589' do
Git::Repository.perform do |repository| Git::Repository.perform do |repository|
repository.uri = project.repository_http_location.uri repository.uri = project.repository_http_location.uri
repository.use_default_credentials repository.use_default_credentials
......
...@@ -11,7 +11,7 @@ module QA ...@@ -11,7 +11,7 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'user creates a file via the Web', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1093' do it 'user creates a file via the Web', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1633' do
Resource::File.fabricate_via_browser_ui! do |file| Resource::File.fabricate_via_browser_ui! do |file|
file.name = file_name file.name = file_name
file.content = file_content file.content = file_content
......
...@@ -12,7 +12,7 @@ module QA ...@@ -12,7 +12,7 @@ module QA
file.visit! file.visit!
end end
it 'user deletes a file via the Web', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1095' do it 'user deletes a file via the Web', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1631' do
Page::File::Show.perform do |file| Page::File::Show.perform do |file|
file.click_delete file.click_delete
file.add_commit_message(commit_message_for_delete) file.add_commit_message(commit_message_for_delete)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment