Commit b7512b41 authored by Miguel Rincon's avatar Miguel Rincon

Merge branch '238418-fix-approval-rules-bursting-layout' into 'master'

Make approval rule paths break line when needed

Closes #238418

See merge request gitlab-org/gitlab!39753
parents e8a8fe8a b85df409
......@@ -46,7 +46,7 @@ export default {
rules: orderBy(
this.approvalRules
.filter(rule => rule.rule_type === RULE_TYPE_CODE_OWNER)
.map(rule => ({ ...rule, nameClass: 'monospace' })),
.map(rule => ({ ...rule, nameClass: 'gl-font-monospace gl-word-break-all' })),
[o => o.section === 'codeowners', 'name', 'section'],
['desc', 'asc', 'asc'],
),
......
---
title: Fix Approval Rules table in Merge Requests bursting out of the layout in some
scenarios
merge_request: 39753
author:
type: fixed
......@@ -99,7 +99,7 @@ RSpec.describe 'Merge request > User sees approval widget', :js do
click_on 'View eligible approvers'
wait_for_requests
within('.mr-widget-workflow table .monospace') do
within('.mr-widget-workflow table .gl-font-monospace') do
code_owner_row = find(:xpath, "//tr[td[contains(.,'#{code_owner_rule.name}')]]")
expect(code_owner_row).to have_content('Optional')
......@@ -123,7 +123,7 @@ RSpec.describe 'Merge request > User sees approval widget', :js do
click_on 'View eligible approvers'
wait_for_requests
within('.mr-widget-workflow table .monospace') do
within('.mr-widget-workflow table .gl-font-monospace') do
code_owner_row = find(:xpath, "//tr[td[contains(.,'#{code_owner_rule.name}')]]")
expect(code_owner_row).to have_content('0 of 1')
......
......@@ -350,7 +350,7 @@ describe('EE MRWidget approvals list', () => {
it('renders the name in a monospace font', () => {
const codeOwnerRow = findRowElement(row, 'name');
expect(codeOwnerRow.find('.monospace').exists()).toEqual(true);
expect(codeOwnerRow.find('.gl-font-monospace').exists()).toEqual(true);
expect(codeOwnerRow.text()).toContain(rule.name);
});
......
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