WIP
This commit is contained in:
parent
784d470ba5
commit
15379cf3a4
|
@ -5,6 +5,7 @@ server/vendor
|
|||
server/files/
|
||||
!server/files/.gitkeep
|
||||
!server/files/.htaccess
|
||||
!server/files/emilia-clarke-profile.jpg
|
||||
server/.dbdata
|
||||
server/.fakemail
|
||||
server/apidoc
|
||||
|
|
|
@ -20,6 +20,8 @@ class AdminPanelMyAccount extends React.Component {
|
|||
}
|
||||
|
||||
getEditorProps() {
|
||||
console.log('ADMIN PROPS: ', this.props);
|
||||
|
||||
return {
|
||||
myAccount: true,
|
||||
staffId: this.props.userId * 1,
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
opensupports_version = '4.11.0';
|
||||
root = "<?=$url ?>";
|
||||
apiRoot = '<?=$url ?>/api';
|
||||
console.log('INIT API ROOT: ', apiRoot);
|
||||
globalIndexPath = "<?=$path ?>";
|
||||
showLogs = false;
|
||||
</script>
|
||||
|
|
|
@ -54,10 +54,12 @@ module.exports = {
|
|||
},
|
||||
|
||||
getAPIUrl() {
|
||||
console.log('apiRoot: ', apiRoot);
|
||||
return apiRoot;
|
||||
},
|
||||
|
||||
getURL() {
|
||||
console.log('root: ', root);
|
||||
return root;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -60,7 +60,7 @@ require './system/delete-api-key.rb'
|
|||
require './system/get-api-keys.rb'
|
||||
require './system/disable-registration.rb'
|
||||
require './system/enable-registration.rb'
|
||||
require './system/file-upload-download.rb'
|
||||
require './system/file-upload-download.rb' # These tests break the profile picture
|
||||
require './system/csv-import.rb'
|
||||
require './ticket/create-tag.rb'
|
||||
require './ticket/edit-tag.rb'
|
||||
|
|
|
@ -55,15 +55,13 @@ describe 'File Upload and Download' do
|
|||
end
|
||||
|
||||
it 'should upload profile picture' do
|
||||
file = File.new('../server/files/profile.jpg', 'w+')
|
||||
file.puts('file content')
|
||||
file.close
|
||||
file = File.open("../server/files/emilia-clarke-profile.jpg")
|
||||
|
||||
request('/staff/edit', {
|
||||
'csrf_userid' => $csrf_userid,
|
||||
'csrf_token' => $csrf_token,
|
||||
'staffId' => $csrf_userid,
|
||||
'file' => File.open( "../server/files/profile.jpg")
|
||||
'file' => File.open("../server/files/emilia-clarke-profile.jpg")
|
||||
})
|
||||
|
||||
user = $database.getRow('staff', $csrf_userid)
|
||||
|
@ -75,7 +73,7 @@ describe 'File Upload and Download' do
|
|||
'file' => user['profile_pic']
|
||||
}, 'GET')
|
||||
|
||||
(result.body).should.include('file content')
|
||||
(result['status']).should.equal('success')
|
||||
end
|
||||
|
||||
it 'should add images to ticket content when creating a new ticket' do
|
||||
|
|
Loading…
Reference in New Issue