1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- require 'browser_test_helper'
- class AgentTicketUpdateWithAttachmentRefreshTest < TestCase
- def test_attachment_after_refresh
- @browser = browser_instance
- login(
- username: 'agent1@example.com',
- password: 'test',
- url: browser_url,
- )
-
-
-
-
- ticket_create(
- data: {
- customer: 'nico',
- group: 'Users',
- title: 'test 6 - ticket 1',
- body: 'test 6 - ticket 1 body',
- },
- )
- sleep 1
-
- ticket_update(
- data: {
- body: 'keep me',
- },
- do_not_submit: true,
- )
-
-
- return if browser == 'firefox'
-
- file_upload(
- css: '.content.active .attachmentPlaceholder-inputHolder input',
- files: ['test/data/upload/upload1.txt'],
- )
- sleep 2
-
- match(
- css: '.content.active .ticketZoom .attachments .attachment:nth-child(1) .attachment-name',
- value: 'upload1.txt'
- )
- @browser.navigate.refresh
- sleep 1
-
- match(
- css: '.content.active .ticketZoom .attachments .attachment:nth-child(1) .attachment-name',
- value: 'upload1.txt'
- )
- end
- end
|