Skip to content

Commit

Permalink
#99 Add tab that displays the logs and its components
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and santiagoparradev committed Feb 9, 2024
1 parent 81dd985 commit 005be52
Show file tree
Hide file tree
Showing 13 changed files with 327 additions and 25 deletions.
59 changes: 34 additions & 25 deletions force-app/main/default/applications/Spotify.app-meta.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
<actionOverrides>
<actionName>View</actionName>
<comment>Action override created by Lightning App Builder during activation.</comment>
<comment
>Action override created by Lightning App Builder during activation.</comment>
<content>Album_Record_Page</content>
<formFactor>Large</formFactor>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
Expand All @@ -11,7 +12,8 @@
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<comment>Action override created by Lightning App Builder during activation.</comment>
<comment
>Action override created by Lightning App Builder during activation.</comment>
<content>Album_Record_Page</content>
<formFactor>Small</formFactor>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
Expand All @@ -20,57 +22,63 @@
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<comment>Action override created by Lightning App Builder during activation.</comment>
<content>Playlist_Record_Page</content>
<formFactor>Small</formFactor>
<comment
>Action override created by Lightning App Builder during activation.</comment>
<content>Artist_Record_Page1</content>
<formFactor>Large</formFactor>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
<type>Flexipage</type>
<pageOrSobjectType>Playlist__c</pageOrSobjectType>
<pageOrSobjectType>Artist__c</pageOrSobjectType>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<comment>Action override created by Lightning App Builder during activation.</comment>
<content>Playlist_Record_Page</content>
<formFactor>Large</formFactor>
<comment
>Action override created by Lightning App Builder during activation.</comment>
<content>Artist_Record_Page1</content>
<formFactor>Small</formFactor>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
<type>Flexipage</type>
<pageOrSobjectType>Playlist__c</pageOrSobjectType>
<pageOrSobjectType>Artist__c</pageOrSobjectType>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<comment>Action override created by Lightning App Builder during activation.</comment>
<content>Track_Record_Page</content>
<formFactor>Large</formFactor>
<comment
>Action override created by Lightning App Builder during activation.</comment>
<content>Playlist_Record_Page</content>
<formFactor>Small</formFactor>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
<type>Flexipage</type>
<pageOrSobjectType>Track__c</pageOrSobjectType>
<pageOrSobjectType>Playlist__c</pageOrSobjectType>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<comment>Action override created by Lightning App Builder during activation.</comment>
<content>Track_Record_Page</content>
<formFactor>Small</formFactor>
<comment
>Action override created by Lightning App Builder during activation.</comment>
<content>Playlist_Record_Page</content>
<formFactor>Large</formFactor>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
<type>Flexipage</type>
<pageOrSobjectType>Track__c</pageOrSobjectType>
<pageOrSobjectType>Playlist__c</pageOrSobjectType>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<comment>Action override created by Lightning App Builder during activation.</comment>
<content>Artist_Record_Page</content>
<comment
>Action override created by Lightning App Builder during activation.</comment>
<content>Track_Record_Page</content>
<formFactor>Large</formFactor>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
<type>Flexipage</type>
<pageOrSobjectType>Artist__c</pageOrSobjectType>
<pageOrSobjectType>Track__c</pageOrSobjectType>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<comment>Action override created by Lightning App Builder during activation.</comment>
<content>Artist_Record_Page</content>
<comment
>Action override created by Lightning App Builder during activation.</comment>
<content>Track_Record_Page</content>
<formFactor>Small</formFactor>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
<type>Flexipage</type>
<pageOrSobjectType>Artist__c</pageOrSobjectType>
<pageOrSobjectType>Track__c</pageOrSobjectType>
</actionOverrides>
<brand>
<headerColor>#20D860</headerColor>
Expand All @@ -90,6 +98,7 @@
<tabs>Playlist__c</tabs>
<tabs>Album__c</tabs>
<tabs>ClientCredential__c</tabs>
<tabs>Log__c</tabs>
<uiType>Lightning</uiType>
<utilityBar>Spotify_UtilityBar</utilityBar>
</CustomApplication>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@isTest
private class SpotifyRequestLogTriggerTest {
@isTest static void spotifyRequestLogTriggerTest() {
// prepare data
Spotify_Request_Log__e errorEvent = new Spotify_Request_Log__e(ApexError__c = 'error');
// test
Test.startTest();
EventBus.publish(errorEvent);
Test.stopTest();
//assert
List<Log__c> error = [SELECT ApexError__c FROM Log__c WHERE ApexError__c =: errorEvent.ApexError__c];
Assert.isFalse(error.isEmpty());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<status>Active</status>
</ApexClass>
167 changes: 167 additions & 0 deletions force-app/main/default/objects/Log__c/Log__c.object-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<actionOverrides>
<actionName>Accept</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Accept</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Accept</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>CancelEdit</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>CancelEdit</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>CancelEdit</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Clone</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Clone</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Clone</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Delete</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Delete</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Delete</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Edit</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Edit</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Edit</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>List</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>List</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>List</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>New</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>New</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>New</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>SaveEdit</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>SaveEdit</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>SaveEdit</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Tab</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Tab</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>Tab</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<formFactor>Large</formFactor>
<type>Default</type>
</actionOverrides>
<actionOverrides>
<actionName>View</actionName>
<formFactor>Small</formFactor>
<type>Default</type>
</actionOverrides>
<allowInChatterGroups>false</allowInChatterGroups>
<compactLayoutAssignment>SYSTEM</compactLayoutAssignment>
<deploymentStatus>Deployed</deploymentStatus>
<enableActivities>false</enableActivities>
<enableBulkApi>true</enableBulkApi>
<enableFeeds>false</enableFeeds>
<enableHistory>false</enableHistory>
<enableLicensing>false</enableLicensing>
<enableReports>false</enableReports>
<enableSearch>false</enableSearch>
<enableSharing>true</enableSharing>
<enableStreamingApi>true</enableStreamingApi>
<externalSharingModel>Private</externalSharingModel>
<gender>Feminine</gender>
<label>Log</label>
<nameField>
<displayFormat>LE-{000000}</displayFormat>
<label>Log Name</label>
<type>AutoNumber</type>
</nameField>
<pluralLabel>Logs</pluralLabel>
<searchLayouts />
<sharingModel>ReadWrite</sharingModel>
<visibility>Public</visibility>
</CustomObject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>ApexError__c</fullName>
<externalId>false</externalId>
<label>ApexError</label>
<length>255</length>
<required>false</required>
<trackTrending>false</trackTrending>
<type>Text</type>
<unique>false</unique>
</CustomField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Endpoint__c</fullName>
<externalId>false</externalId>
<label>Endpoint</label>
<length>255</length>
<required>false</required>
<trackTrending>false</trackTrending>
<type>Text</type>
<unique>false</unique>
</CustomField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Message__c</fullName>
<externalId>false</externalId>
<label>Message</label>
<length>255</length>
<required>false</required>
<trackTrending>false</trackTrending>
<type>Text</type>
<unique>false</unique>
</CustomField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Status__c</fullName>
<externalId>false</externalId>
<label>Status</label>
<precision>3</precision>
<required>false</required>
<scale>0</scale>
<trackTrending>false</trackTrending>
<type>Number</type>
<unique>false</unique>
</CustomField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ListView xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>All</fullName>
<filterScope>Everything</filterScope>
<label>All</label>
</ListView>
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,33 @@
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
<hasActivationRequired>false</hasActivationRequired>
<label>Spotify Admin</label>
<fieldPermissions>
<editable>true</editable>
<field>Log__c.ApexError__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Log__c.Endpoint__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Log__c.Message__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Log__c.Status__c</field>
<readable>true</readable>
</fieldPermissions>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>true</allowDelete>
<allowEdit>true</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>false</modifyAllRecords>
<object>Log__c</object>
<viewAllRecords>false</viewAllRecords>
</objectPermissions>
</PermissionSet>
Loading

0 comments on commit 005be52

Please sign in to comment.