1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- require 'browser_test_helper'
- class UserSwitchCache < TestCase
- def test_re_login
- # login as agent and create one ticket
- @browser = browser_instance
- login(
- username: 'agent1@example.com',
- password: 'test',
- url: browser_url,
- )
- tasks_close_all()
- ticket1 = ticket_create(
- data: {
- customer: 'nico',
- group: 'Users',
- title: 'some subject 123äöü - reply test',
- body: 'some body 123äöü - reply test',
- },
- )
- logout()
- # login as customer and verify ticket create screen
- login(
- username: 'nicole.braun@zammad.org',
- password: 'test',
- url: browser_url,
- )
- click(css: 'a[href="#new"]', only_if_exists: true)
- click(css: 'a[href="#customer_ticket_new"]')
- sleep 4
- match(
- css: '#content',
- value: 'Priority',
- should_not_match: true,
- )
- match(
- css: '#content',
- value: 'Owner',
- should_not_match: true,
- )
- match(
- css: '#content',
- value: 'State',
- )
- logout()
- # login again as customer and verify ticket create screen
- login(
- username: 'nicole.braun@zammad.org',
- password: 'test',
- url: browser_url,
- )
- click(css: 'a[href="#new"]', only_if_exists: true)
- click(css: 'a[href="#customer_ticket_new"]')
- sleep 4
- match(
- css: '#content',
- value: 'Priority',
- should_not_match: true,
- )
- match(
- css: '#content',
- value: 'Owner',
- should_not_match: true,
- )
- match(
- css: '#content',
- value: 'State',
- )
- end
- end
|