Commit 8bf50608 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 1a65b7b4 a560d34d
# frozen_string_literal: true
# rubocop:disable Style/SignalException
CHANGED_SCHEMA_MESSAGE = <<~MSG
Mentioning @gitlab-data/engineers to notify the team about changes to the db/structure.sql file.
MSG
db_schema_updated = !git.modified_files.grep(%r{\Adb/structure\.sql}).empty?
if db_schema_updated
markdown(CHANGED_SCHEMA_MESSAGE)
end
......@@ -141,7 +141,7 @@ export default {
);
},
isSubmitDisabled() {
return this.isPolicyProfile;
return this.formHasErrors || this.requiredFieldEmpty || this.isPolicyProfile;
},
isPolicyProfile() {
return Boolean(this.profile?.referencedInSecurityPolicies?.length);
......
---
title: Always display submit button for DAST Scanner Profile form
merge_request: 56928
author:
type: changed
......@@ -94,18 +94,18 @@ describe('DAST Scanner Profile', () => {
createComponent();
});
describe('is enabled even if', () => {
describe('is disabled if', () => {
it('form contains errors', async () => {
findProfileNameInput().vm.$emit('input', profileName);
await findSpiderTimeoutInput().vm.$emit('input', '12312');
expect(findSubmitButton().props('disabled')).toBe(false);
expect(findSubmitButton().props('disabled')).toBe(true);
});
it('at least one field is empty', async () => {
findProfileNameInput().vm.$emit('input', '');
await findSpiderTimeoutInput().vm.$emit('input', spiderTimeout);
await findTargetTimeoutInput().vm.$emit('input', targetTimeout);
expect(findSubmitButton().props('disabled')).toBe(false);
expect(findSubmitButton().props('disabled')).toBe(true);
});
});
......
......@@ -220,7 +220,7 @@ RSpec.describe Tooling::Danger::ProjectHelper do
describe '.local_warning_message' do
it 'returns an informational message with rules that can run' do
expect(described_class.local_warning_message).to eq('==> Only the following Danger rules can be run locally: changelog, changes_size, commit_messages, database, documentation, duplicate_yarn_dependencies, eslint, karma, pajamas, pipeline, prettier, product_intelligence, utility_css')
expect(described_class.local_warning_message).to eq('==> Only the following Danger rules can be run locally: changelog, changes_size, commit_messages, database, datateam, documentation, duplicate_yarn_dependencies, eslint, karma, pajamas, pipeline, prettier, product_intelligence, utility_css')
end
end
......
......@@ -8,6 +8,7 @@ module Tooling
changes_size
commit_messages
database
datateam
documentation
duplicate_yarn_dependencies
eslint
......
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