Commit 79086ede authored by Victor Wu's avatar Victor Wu Committed by Annabel Dunstone Gray

`None` for assignees

Update assignees_spec.js

Update sidebar_spec.rb

Update issues_spec.rb
parent 232a8f75
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
data-placement="left" data-placement="left"
data-boundary="viewport" data-boundary="viewport"
> >
<i v-if="hasNoUsers" aria-label="No Assignee" class="fa fa-user"> </i> <i v-if="hasNoUsers" aria-label="None" class="fa fa-user"> </i>
<button <button
v-for="(user, index) in users" v-for="(user, index) in users"
v-if="shouldRenderCollapsedAssignee(index)" v-if="shouldRenderCollapsedAssignee(index)"
...@@ -185,7 +185,7 @@ export default { ...@@ -185,7 +185,7 @@ export default {
</span> </span>
<template v-if="hasNoUsers"> <template v-if="hasNoUsers">
<span class="assign-yourself no-value"> <span class="assign-yourself no-value">
No assignee None
<template v-if="editable"> <template v-if="editable">
- <button type="button" class="btn-link" @click="assignSelf">assign yourself</button> - <button type="button" class="btn-link" @click="assignSelf">assign yourself</button>
</template> </template>
......
...@@ -133,7 +133,7 @@ describe 'Issue Boards', :js do ...@@ -133,7 +133,7 @@ describe 'Issue Boards', :js do
close_dropdown_menu_if_visible close_dropdown_menu_if_visible
wait_for_requests wait_for_requests
expect(page).to have_content('No assignee') expect(page).to have_content('None')
end end
expect(card_two).not_to have_selector('.avatar') expect(card_two).not_to have_selector('.avatar')
...@@ -143,7 +143,7 @@ describe 'Issue Boards', :js do ...@@ -143,7 +143,7 @@ describe 'Issue Boards', :js do
click_card(card) click_card(card)
page.within(find('.assignee')) do page.within(find('.assignee')) do
expect(page).to have_content('No assignee') expect(page).to have_content('None')
click_button 'assign yourself' click_button 'assign yourself'
......
...@@ -91,7 +91,7 @@ describe 'Issues' do ...@@ -91,7 +91,7 @@ describe 'Issues' do
click_button 'Save changes' click_button 'Save changes'
page.within('.assignee') do page.within('.assignee') do
expect(page).to have_content 'No assignee - assign yourself' expect(page).to have_content 'None - assign yourself'
end end
expect(issue.reload.assignees).to be_empty expect(issue.reload.assignees).to be_empty
...@@ -465,7 +465,7 @@ describe 'Issues' do ...@@ -465,7 +465,7 @@ describe 'Issues' do
click_link 'Edit' click_link 'Edit'
click_link 'Unassigned' click_link 'Unassigned'
first('.title').click first('.title').click
expect(page).to have_content 'No assignee' expect(page).to have_content 'None'
end end
# wait_for_requests does not work with vue-resource at the moment # wait_for_requests does not work with vue-resource at the moment
...@@ -479,7 +479,7 @@ describe 'Issues' do ...@@ -479,7 +479,7 @@ describe 'Issues' do
visit project_issue_path(project, issue2) visit project_issue_path(project, issue2)
page.within('.assignee') do page.within('.assignee') do
expect(page).to have_content "No assignee" expect(page).to have_content "None"
end end
page.within '.assignee' do page.within '.assignee' do
...@@ -522,7 +522,7 @@ describe 'Issues' do ...@@ -522,7 +522,7 @@ describe 'Issues' do
close_dropdown_menu_if_visible close_dropdown_menu_if_visible
page.within '.value .assign-yourself' do page.within '.value .assign-yourself' do
expect(page).to have_content "No assignee" expect(page).to have_content "None"
end end
end end
end end
......
...@@ -24,12 +24,12 @@ describe('Assignee component', () => { ...@@ -24,12 +24,12 @@ describe('Assignee component', () => {
const collapsed = component.$el.querySelector('.sidebar-collapsed-icon'); const collapsed = component.$el.querySelector('.sidebar-collapsed-icon');
expect(collapsed.childElementCount).toEqual(1); expect(collapsed.childElementCount).toEqual(1);
expect(collapsed.children[0].getAttribute('aria-label')).toEqual('No Assignee'); expect(collapsed.children[0].getAttribute('aria-label')).toEqual('None');
expect(collapsed.children[0].classList.contains('fa')).toEqual(true); expect(collapsed.children[0].classList.contains('fa')).toEqual(true);
expect(collapsed.children[0].classList.contains('fa-user')).toEqual(true); expect(collapsed.children[0].classList.contains('fa-user')).toEqual(true);
}); });
it('displays only "No assignee" when no users are assigned and the issue is read-only', () => { it('displays only "None" when no users are assigned and the issue is read-only', () => {
component = new AssigneeComponent({ component = new AssigneeComponent({
propsData: { propsData: {
rootPath: 'http://localhost:3000', rootPath: 'http://localhost:3000',
...@@ -39,11 +39,11 @@ describe('Assignee component', () => { ...@@ -39,11 +39,11 @@ describe('Assignee component', () => {
}).$mount(); }).$mount();
const componentTextNoUsers = component.$el.querySelector('.assign-yourself').innerText.trim(); const componentTextNoUsers = component.$el.querySelector('.assign-yourself').innerText.trim();
expect(componentTextNoUsers).toBe('No assignee'); expect(componentTextNoUsers).toBe('None');
expect(componentTextNoUsers.indexOf('assign yourself')).toEqual(-1); expect(componentTextNoUsers.indexOf('assign yourself')).toEqual(-1);
}); });
it('displays only "No assignee" when no users are assigned and the issue can be edited', () => { it('displays only "None" when no users are assigned and the issue can be edited', () => {
component = new AssigneeComponent({ component = new AssigneeComponent({
propsData: { propsData: {
rootPath: 'http://localhost:3000', rootPath: 'http://localhost:3000',
...@@ -53,7 +53,7 @@ describe('Assignee component', () => { ...@@ -53,7 +53,7 @@ describe('Assignee component', () => {
}).$mount(); }).$mount();
const componentTextNoUsers = component.$el.querySelector('.assign-yourself').innerText.trim(); const componentTextNoUsers = component.$el.querySelector('.assign-yourself').innerText.trim();
expect(componentTextNoUsers.indexOf('No assignee')).toEqual(0); expect(componentTextNoUsers.indexOf('None')).toEqual(0);
expect(componentTextNoUsers.indexOf('assign yourself')).toBeGreaterThan(0); expect(componentTextNoUsers.indexOf('assign yourself')).toBeGreaterThan(0);
}); });
......
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