boards_spec.rb 18.4 KB
Newer Older
P
Phil Hughes 已提交
1 2 3
require 'rails_helper'

describe 'Issue Boards', feature: true, js: true do
P
Phil Hughes 已提交
4
  include WaitForVueResource
P
Phil Hughes 已提交
5
  include DragTo
6

7 8
  let(:project) { create(:empty_project, :public) }
  let(:board)   { create(:board, project: project) }
9 10
  let(:user)    { create(:user) }
  let!(:user2)  { create(:user) }
P
Phil Hughes 已提交
11 12 13

  before do
    project.team << [user, :master]
P
Phil Hughes 已提交
14
    project.team << [user2, :master]
15

P
Phil Hughes 已提交
16 17 18
    login_as(user)
  end

P
Phil Hughes 已提交
19 20
  context 'no lists' do
    before do
21
      visit namespace_project_board_path(project.namespace, project, board)
P
Phil Hughes 已提交
22
      wait_for_vue_resource
23
      expect(page).to have_selector('.board', count: 2)
P
Phil Hughes 已提交
24
    end
P
Phil Hughes 已提交
25

P
Phil Hughes 已提交
26 27
    it 'shows blank state' do
      expect(page).to have_content('Welcome to your Issue Board!')
P
Phil Hughes 已提交
28 29
    end

P
Phil Hughes 已提交
30
    it 'shows tooltip on add issues button' do
31
      button = page.find('.filter-dropdown-container button', text: 'Add issues')
P
Phil Hughes 已提交
32

P
Phil Hughes 已提交
33
      expect(button[:"data-original-title"]).to eq("Please add a list to your board first")
P
Phil Hughes 已提交
34 35
    end

36
    it 'hides the blank state when clicking nevermind button' do
P
Phil Hughes 已提交
37
      page.within(find('.board-blank-state')) do
P
Phil Hughes 已提交
38
        click_button("Nevermind, I'll use my own")
P
Phil Hughes 已提交
39
      end
40
      expect(page).to have_selector('.board', count: 1)
P
Phil Hughes 已提交
41 42
    end

P
Phil Hughes 已提交
43
    it 'creates default lists' do
44
      lists = ['To Do', 'Doing', 'Closed']
P
Phil Hughes 已提交
45

P
Phil Hughes 已提交
46
      page.within(find('.board-blank-state')) do
P
Phil Hughes 已提交
47 48
        click_button('Add default lists')
      end
P
Phil Hughes 已提交
49 50
      wait_for_vue_resource

51
      expect(page).to have_selector('.board', count: 3)
P
Phil Hughes 已提交
52 53 54 55 56

      page.all('.board').each_with_index do |list, i|
        expect(list.find('.board-title')).to have_content(lists[i])
      end
    end
P
Phil Hughes 已提交
57 58
  end

P
Phil Hughes 已提交
59
  context 'with lists' do
60
    let(:milestone) { create(:milestone, project: project) }
P
Phil Hughes 已提交
61

62
    let(:planning)    { create(:label, project: project, name: 'Planning', description: 'Test') }
P
Phil Hughes 已提交
63 64
    let(:development) { create(:label, project: project, name: 'Development') }
    let(:testing)     { create(:label, project: project, name: 'Testing') }
P
Phil Hughes 已提交
65
    let(:bug)         { create(:label, project: project, name: 'Bug') }
66
    let!(:backlog)    { create(:label, project: project, name: 'Backlog') }
67
    let!(:closed)       { create(:label, project: project, name: 'Closed') }
68
    let!(:accepting)  { create(:label, project: project, name: 'Accepting Merge Requests') }
P
Phil Hughes 已提交
69

70 71
    let!(:list1) { create(:list, board: board, label: planning, position: 0) }
    let!(:list2) { create(:list, board: board, label: development, position: 1) }
P
Phil Hughes 已提交
72

P
Phil Hughes 已提交
73
    let!(:confidential_issue) { create(:labeled_issue, :confidential, project: project, author: user, labels: [planning], relative_position: 9) }
74
    let!(:issue1) { create(:labeled_issue, project: project, assignees: [user], labels: [planning], relative_position: 8) }
P
Phil Hughes 已提交
75 76 77 78 79 80
    let!(:issue2) { create(:labeled_issue, project: project, author: user2, labels: [planning], relative_position: 7) }
    let!(:issue3) { create(:labeled_issue, project: project, labels: [planning], relative_position: 6) }
    let!(:issue4) { create(:labeled_issue, project: project, labels: [planning], relative_position: 5) }
    let!(:issue5) { create(:labeled_issue, project: project, labels: [planning], milestone: milestone, relative_position: 4) }
    let!(:issue6) { create(:labeled_issue, project: project, labels: [planning, development], relative_position: 3) }
    let!(:issue7) { create(:labeled_issue, project: project, labels: [development], relative_position: 2) }
81
    let!(:issue8) { create(:closed_issue, project: project) }
P
Phil Hughes 已提交
82
    let!(:issue9) { create(:labeled_issue, project: project, labels: [planning, testing, bug, accepting], relative_position: 1) }
P
Phil Hughes 已提交
83 84

    before do
85
      visit namespace_project_board_path(project.namespace, project, board)
P
Phil Hughes 已提交
86

P
Phil Hughes 已提交
87
      wait_for_vue_resource
P
Phil Hughes 已提交
88

89
      expect(page).to have_selector('.board', count: 3)
90 91 92
      expect(find('.board:nth-child(1)')).to have_selector('.card')
      expect(find('.board:nth-child(2)')).to have_selector('.card')
      expect(find('.board:nth-child(3)')).to have_selector('.card')
P
Phil Hughes 已提交
93 94 95
    end

    it 'shows lists' do
96
      expect(page).to have_selector('.board', count: 3)
P
Phil Hughes 已提交
97 98
    end

99
    it 'shows description tooltip on list title' do
100
      page.within('.board:nth-child(1)') do
101 102 103 104
        expect(find('.board-title span.has-tooltip')[:title]).to eq('Test')
      end
    end

P
Phil Hughes 已提交
105
    it 'shows issues in lists' do
106
      wait_for_board_cards(1, 8)
107
      wait_for_board_cards(2, 2)
P
Phil Hughes 已提交
108
    end
P
Phil Hughes 已提交
109

P
Phil Hughes 已提交
110
    it 'shows confidential issues with icon' do
P
Phil Hughes 已提交
111
      page.within(find('.board', match: :first)) do
P
Phil Hughes 已提交
112 113 114 115
        expect(page).to have_selector('.confidential-icon', count: 1)
      end
    end

116
    it 'search closed list' do
117 118
      find('.filtered-search').set(issue8.title)
      find('.filtered-search').native.send_keys(:enter)
119 120 121 122 123

      wait_for_vue_resource

      expect(find('.board:nth-child(1)')).to have_selector('.card', count: 0)
      expect(find('.board:nth-child(2)')).to have_selector('.card', count: 0)
124
      expect(find('.board:nth-child(3)')).to have_selector('.card', count: 1)
125 126 127
    end

    it 'search list' do
128 129
      find('.filtered-search').set(issue5.title)
      find('.filtered-search').native.send_keys(:enter)
130 131 132

      wait_for_vue_resource

133 134
      expect(find('.board:nth-child(1)')).to have_selector('.card', count: 1)
      expect(find('.board:nth-child(2)')).to have_selector('.card', count: 0)
135 136 137
      expect(find('.board:nth-child(3)')).to have_selector('.card', count: 0)
    end

P
Phil Hughes 已提交
138
    it 'allows user to delete board' do
139
      page.within(find('.board:nth-child(1)')) do
P
Phil Hughes 已提交
140
        find('.board-delete').click
P
Phil Hughes 已提交
141
      end
P
Phil Hughes 已提交
142 143 144

      wait_for_vue_resource

145
      expect(page).to have_selector('.board', count: 2)
P
Phil Hughes 已提交
146 147
    end

148
    it 'removes checkmark in new list dropdown after deleting' do
149
      click_button 'Add list'
150 151
      wait_for_ajax

152
      page.within(find('.board:nth-child(1)')) do
153 154
        find('.board-delete').click
      end
155

P
Phil Hughes 已提交
156
      wait_for_vue_resource
157

158
      expect(page).to have_selector('.board', count: 2)
159 160
    end

161 162
    it 'infinite scrolls list' do
      50.times do
163
        create(:labeled_issue, project: project, labels: [planning])
164 165
      end

166
      visit namespace_project_board_path(project.namespace, project, board)
P
Phil Hughes 已提交
167
      wait_for_vue_resource
168

P
Phil Hughes 已提交
169
      page.within(find('.board', match: :first)) do
170
        expect(page.find('.board-header')).to have_content('58')
171
        expect(page).to have_selector('.card', count: 20)
172
        expect(page).to have_content('Showing 20 of 58 issues')
173 174

        evaluate_script("document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight")
P
Phil Hughes 已提交
175
        wait_for_vue_resource
176 177

        expect(page).to have_selector('.card', count: 40)
178
        expect(page).to have_content('Showing 40 of 58 issues')
P
Phil Hughes 已提交
179 180

        evaluate_script("document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight")
P
Phil Hughes 已提交
181
        wait_for_vue_resource
P
Phil Hughes 已提交
182

183
        expect(page).to have_selector('.card', count: 58)
P
Phil Hughes 已提交
184
        expect(page).to have_content('Showing all issues')
185 186 187
      end
    end

188 189
    context 'closed' do
      it 'shows list of closed issues' do
190
        wait_for_board_cards(3, 1)
191
        wait_for_ajax
P
Phil Hughes 已提交
192 193
      end

194
      it 'moves issue to closed' do
P
Phil Hughes 已提交
195
        drag(list_from_index: 0, list_to_index: 2)
P
Phil Hughes 已提交
196

197
        wait_for_board_cards(1, 7)
198 199 200 201
        wait_for_board_cards(2, 2)
        wait_for_board_cards(3, 2)

        expect(find('.board:nth-child(1)')).not_to have_content(issue9.title)
202 203 204
        expect(find('.board:nth-child(3)')).to have_selector('.card', count: 2)
        expect(find('.board:nth-child(3)')).to have_content(issue9.title)
        expect(find('.board:nth-child(3)')).not_to have_content(planning.title)
P
Phil Hughes 已提交
205 206
      end

207
      it 'removes all of the same issue to closed' do
P
Phil Hughes 已提交
208
        drag(list_from_index: 0, list_to_index: 2)
P
Phil Hughes 已提交
209

210 211 212
        wait_for_board_cards(1, 7)
        wait_for_board_cards(2, 2)
        wait_for_board_cards(3, 2)
213

214 215 216
        expect(find('.board:nth-child(1)')).not_to have_content(issue9.title)
        expect(find('.board:nth-child(3)')).to have_content(issue9.title)
        expect(find('.board:nth-child(3)')).not_to have_content(planning.title)
P
Phil Hughes 已提交
217 218 219 220
      end
    end

    context 'lists' do
P
Phil Hughes 已提交
221
      it 'changes position of list' do
P
Phil Hughes 已提交
222
        drag(list_from_index: 1, list_to_index: 0, selector: '.board-header')
P
Phil Hughes 已提交
223

224 225 226
        wait_for_board_cards(1, 2)
        wait_for_board_cards(2, 8)
        wait_for_board_cards(3, 1)
227

228 229
        expect(find('.board:nth-child(1)')).to have_content(development.title)
        expect(find('.board:nth-child(1)')).to have_content(planning.title)
P
Phil Hughes 已提交
230 231
      end

P
Phil Hughes 已提交
232
      it 'issue moves between lists' do
P
Phil Hughes 已提交
233
        drag(list_from_index: 0, from_index: 1, list_to_index: 1)
P
Phil Hughes 已提交
234

235 236 237
        wait_for_board_cards(1, 7)
        wait_for_board_cards(2, 2)
        wait_for_board_cards(3, 1)
238

239 240
        expect(find('.board:nth-child(2)')).to have_content(issue6.title)
        expect(find('.board:nth-child(2)').all('.card').last).not_to have_content(development.title)
P
Phil Hughes 已提交
241 242
      end

P
Phil Hughes 已提交
243
      it 'issue moves between lists' do
P
Phil Hughes 已提交
244
        drag(list_from_index: 1, list_to_index: 0)
P
Phil Hughes 已提交
245

246 247
        wait_for_board_cards(1, 9)
        wait_for_board_cards(2, 1)
248 249
        wait_for_board_cards(3, 1)

250 251
        expect(find('.board:nth-child(1)')).to have_content(issue7.title)
        expect(find('.board:nth-child(1)').all('.card').first).not_to have_content(planning.title)
P
Phil Hughes 已提交
252 253
      end

254
      it 'issue moves from closed' do
P
Phil Hughes 已提交
255
        drag(list_from_index: 2, list_to_index: 1)
P
Phil Hughes 已提交
256

P
Phil Hughes 已提交
257
        expect(find('.board:nth-child(2)')).to have_content(issue8.title)
258

259
        wait_for_board_cards(1, 8)
260
        wait_for_board_cards(2, 3)
261
        wait_for_board_cards(3, 0)
P
Phil Hughes 已提交
262 263 264 265
      end

      context 'issue card' do
        it 'shows assignee' do
P
Phil Hughes 已提交
266
          page.within(find('.board', match: :first)) do
P
Phil Hughes 已提交
267
            expect(page).to have_selector('.avatar', count: 1)
P
Phil Hughes 已提交
268 269 270 271 272 273
          end
        end
      end

      context 'new list' do
        it 'shows all labels in new list dropdown' do
274
          click_button 'Add list'
275
          wait_for_ajax
P
Phil Hughes 已提交
276 277 278 279 280 281 282 283 284

          page.within('.dropdown-menu-issues-board-new') do
            expect(page).to have_content(planning.title)
            expect(page).to have_content(development.title)
            expect(page).to have_content(testing.title)
          end
        end

        it 'creates new list for label' do
285
          click_button 'Add list'
286
          wait_for_ajax
P
Phil Hughes 已提交
287 288 289 290 291

          page.within('.dropdown-menu-issues-board-new') do
            click_link testing.title
          end

292 293
          wait_for_vue_resource

294
          expect(page).to have_selector('.board', count: 4)
P
Phil Hughes 已提交
295 296
        end

297
        it 'creates new list for Backlog label' do
298
          click_button 'Add list'
299
          wait_for_ajax
300 301 302 303 304

          page.within('.dropdown-menu-issues-board-new') do
            click_link backlog.title
          end

305 306
          wait_for_vue_resource

307
          expect(page).to have_selector('.board', count: 4)
308 309
        end

310
        it 'creates new list for Closed label' do
311
          click_button 'Add list'
312
          wait_for_ajax
313 314

          page.within('.dropdown-menu-issues-board-new') do
315
            click_link closed.title
316 317
          end

318 319
          wait_for_vue_resource

320
          expect(page).to have_selector('.board', count: 4)
321 322
        end

323
        it 'keeps dropdown open after adding new list' do
324
          click_button 'Add list'
325 326 327
          wait_for_ajax

          page.within('.dropdown-menu-issues-board-new') do
328
            click_link closed.title
329 330 331 332
          end

          wait_for_vue_resource

333
          expect(page).to have_css('#js-add-list.open')
334 335
        end

P
Phil Hughes 已提交
336
        it 'creates new list from a new label' do
337
          click_button 'Add list'
P
Phil Hughes 已提交
338 339 340 341 342 343 344 345 346 347 348 349 350 351

          wait_for_ajax

          click_link 'Create new label'

          fill_in('new_label_name', with: 'Testing New Label')

          first('.suggest-colors a').click

          click_button 'Create'

          wait_for_ajax
          wait_for_vue_resource

352
          expect(page).to have_selector('.board', count: 4)
P
Phil Hughes 已提交
353
        end
P
Phil Hughes 已提交
354 355 356 357
      end
    end

    context 'filtering' do
P
Phil Hughes 已提交
358
      it 'filters by author' do
P
Phil Hughes 已提交
359 360 361
        set_filter("author", user2.username)
        click_filter_link(user2.username)
        submit_filter
P
Phil Hughes 已提交
362

P
Phil Hughes 已提交
363
        wait_for_vue_resource
364
        wait_for_board_cards(1, 1)
365
        wait_for_empty_boards((2..3))
P
Phil Hughes 已提交
366 367 368
      end

      it 'filters by assignee' do
P
Phil Hughes 已提交
369 370 371
        set_filter("assignee", user.username)
        click_filter_link(user.username)
        submit_filter
P
Phil Hughes 已提交
372

P
Phil Hughes 已提交
373 374
        wait_for_vue_resource

375
        wait_for_board_cards(1, 1)
376
        wait_for_empty_boards((2..3))
P
Phil Hughes 已提交
377 378 379
      end

      it 'filters by milestone' do
P
Phil Hughes 已提交
380 381 382
        set_filter("milestone", "\"#{milestone.title}\"")
        click_filter_link(milestone.title)
        submit_filter
P
Phil Hughes 已提交
383

P
Phil Hughes 已提交
384
        wait_for_vue_resource
385 386
        wait_for_board_cards(1, 1)
        wait_for_board_cards(2, 0)
387
        wait_for_board_cards(3, 0)
P
Phil Hughes 已提交
388 389 390
      end

      it 'filters by label' do
P
Phil Hughes 已提交
391 392 393
        set_filter("label", testing.title)
        click_filter_link(testing.title)
        submit_filter
P
Phil Hughes 已提交
394

P
Phil Hughes 已提交
395
        wait_for_vue_resource
396
        wait_for_board_cards(1, 1)
397
        wait_for_empty_boards((2..3))
P
Phil Hughes 已提交
398 399
      end

400
      it 'filters by label with space after reload' do
P
Phil Hughes 已提交
401 402 403
        set_filter("label", "\"#{accepting.title}\"")
        click_filter_link(accepting.title)
        submit_filter
404 405 406

        # Test after reload
        page.evaluate_script 'window.location.reload()'
P
Phil Hughes 已提交
407 408
        wait_for_board_cards(1, 1)
        wait_for_empty_boards((2..3))
409 410 411 412 413 414 415 416 417 418 419 420 421 422

        wait_for_vue_resource

        page.within(find('.board', match: :first)) do
          expect(page.find('.board-header')).to have_content('1')
          expect(page).to have_selector('.card', count: 1)
        end

        page.within(find('.board:nth-child(2)')) do
          expect(page.find('.board-header')).to have_content('0')
          expect(page).to have_selector('.card', count: 0)
        end
      end

423
      it 'removes filtered labels' do
P
Phil Hughes 已提交
424 425 426
        set_filter("label", testing.title)
        click_filter_link(testing.title)
        submit_filter
427

P
Phil Hughes 已提交
428
        wait_for_board_cards(1, 1)
429

P
Phil Hughes 已提交
430 431
        find('.clear-search').click
        submit_filter
432

P
Phil Hughes 已提交
433
        wait_for_board_cards(1, 8)
434 435
      end

436 437
      it 'infinite scrolls list with label filter' do
        50.times do
438
          create(:labeled_issue, project: project, labels: [planning, testing])
439 440
        end

P
Phil Hughes 已提交
441 442 443
        set_filter("label", testing.title)
        click_filter_link(testing.title)
        submit_filter
444

P
Phil Hughes 已提交
445 446
        wait_for_vue_resource

P
Phil Hughes 已提交
447
        page.within(find('.board', match: :first)) do
448
          expect(page.find('.board-header')).to have_content('51')
449
          expect(page).to have_selector('.card', count: 20)
P
Phil Hughes 已提交
450
          expect(page).to have_content('Showing 20 of 51 issues')
451 452 453 454

          evaluate_script("document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight")

          expect(page).to have_selector('.card', count: 40)
P
Phil Hughes 已提交
455 456 457 458 459 460
          expect(page).to have_content('Showing 40 of 51 issues')

          evaluate_script("document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight")

          expect(page).to have_selector('.card', count: 51)
          expect(page).to have_content('Showing all issues')
461 462 463
        end
      end

P
Phil Hughes 已提交
464
      it 'filters by multiple labels' do
P
Phil Hughes 已提交
465 466
        set_filter("label", testing.title)
        click_filter_link(testing.title)
P
Phil Hughes 已提交
467

P
Phil Hughes 已提交
468 469 470 471
        set_filter("label", bug.title)
        click_filter_link(bug.title)

        submit_filter
P
Phil Hughes 已提交
472

P
Phil Hughes 已提交
473 474
        wait_for_vue_resource

475
        wait_for_board_cards(1, 1)
476
        wait_for_empty_boards((2..3))
P
Phil Hughes 已提交
477
      end
478 479

      it 'filters by clicking label button on issue' do
P
Phil Hughes 已提交
480
        page.within(find('.board', match: :first)) do
481
          expect(page).to have_selector('.card', count: 8)
482
          expect(find('.card', match: :first)).to have_content(bug.title)
P
Phil Hughes 已提交
483
          click_button(bug.title)
P
Phil Hughes 已提交
484
          wait_for_vue_resource
485 486
        end

P
Phil Hughes 已提交
487 488 489 490
        page.within('.tokens-container') do
          expect(page).to have_content(bug.title)
        end

491 492
        wait_for_vue_resource

493
        wait_for_board_cards(1, 1)
494
        wait_for_empty_boards((2..3))
495 496 497
      end

      it 'removes label filter by clicking label button on issue' do
P
Phil Hughes 已提交
498 499
        page.within(find('.board', match: :first)) do
          page.within(find('.card', match: :first)) do
500 501
            click_button(bug.title)
          end
P
Phil Hughes 已提交
502

P
Phil Hughes 已提交
503
          wait_for_vue_resource
504 505 506 507

          expect(page).to have_selector('.card', count: 1)
        end

P
Phil Hughes 已提交
508
        wait_for_vue_resource
509
      end
P
Phil Hughes 已提交
510 511 512
    end
  end

513 514
  context 'keyboard shortcuts' do
    before do
515
      visit namespace_project_board_path(project.namespace, project, board)
516 517 518 519 520 521 522 523 524
      wait_for_vue_resource
    end

    it 'allows user to use keyboard shortcuts' do
      find('.boards-list').native.send_keys('i')
      expect(page).to have_content('New Issue')
    end
  end

525 526 527
  context 'signed out user' do
    before do
      logout
528
      visit namespace_project_board_path(project.namespace, project, board)
529
      wait_for_vue_resource
530 531
    end

532 533 534 535
    it 'displays lists' do
      expect(page).to have_selector('.board')
    end

536 537 538
    it 'does not show create new list' do
      expect(page).not_to have_selector('.js-new-board-list')
    end
539 540 541 542

    it 'does not allow dragging' do
      expect(page).not_to have_selector('.user-can-drag')
    end
543 544 545 546 547 548 549 550 551
  end

  context 'as guest user' do
    let(:user_guest) { create(:user) }

    before do
      project.team << [user_guest, :guest]
      logout
      login_as(user_guest)
552
      visit namespace_project_board_path(project.namespace, project, board)
553
      wait_for_vue_resource
554 555 556 557 558 559 560
    end

    it 'does not show create new list' do
      expect(page).not_to have_selector('.js-new-board-list')
    end
  end

P
Phil Hughes 已提交
561 562 563 564 565 566 567
  def drag(selector: '.board-list', list_from_index: 0, from_index: 0, to_index: 0, list_to_index: 0)
    drag_to(selector: selector,
            scrollable: '#board-app',
            list_from_index: list_from_index,
            from_index: from_index,
            to_index: to_index,
            list_to_index: list_to_index)
P
Phil Hughes 已提交
568
  end
569 570 571 572 573 574 575 576 577 578 579 580 581

  def wait_for_board_cards(board_number, expected_cards)
    page.within(find(".board:nth-child(#{board_number})")) do
      expect(page.find('.board-header')).to have_content(expected_cards.to_s)
      expect(page).to have_selector('.card', count: expected_cards)
    end
  end

  def wait_for_empty_boards(board_numbers)
    board_numbers.each do |board|
      wait_for_board_cards(board, 0)
    end
  end
P
Phil Hughes 已提交
582 583 584 585 586 587 588 589 590 591

  def set_filter(type, text)
    find('.filtered-search').native.send_keys("#{type}:#{text}")
  end

  def submit_filter
    find('.filtered-search').native.send_keys(:enter)
  end

  def click_filter_link(link_text)
E
Eric Eastwood 已提交
592
    page.within('.filtered-search-box') do
P
Phil Hughes 已提交
593 594 595 596 597
      expect(page).to have_button(link_text)

      click_button(link_text)
    end
  end
P
Phil Hughes 已提交
598
end