-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eschweitzer78/update-2024-06-19-2300 (#373)
* fix issue #372 * NSW DS: style omniscript action buttons * VIC2DS: Enabled to remove primary logo override * VIC2DS changes to hero header and demo mode for footer and header * version
- Loading branch information
1 parent
29b7fb9
commit 1d215bb
Showing
19 changed files
with
505 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
161 changes: 161 additions & 0 deletions
161
sfGpsDs/main/default/classes/SfGpsDsEncodingOF_Test.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
@isTest | ||
public class SfGpsDsEncodingOF_Test { | ||
final static String OP_URL_ENCODE = 'UrlEncode'; | ||
final static String OP_URL_DECODE = 'UrlDecode'; | ||
|
||
@isTest | ||
static void urlEncodeShouldCatchSpecialChars() { | ||
SfGpsDsEncodingOF r = new SfGpsDsEncodingOF(); | ||
Map<String, Object> output = new Map<String, Object>(); | ||
Map<String, Object> args = new Map<String, Object>{ | ||
'input' => new Map<String, Object>{ | ||
'arguments' => new List<String>{ 'Do you like this #urlstring?' } | ||
}, | ||
'output' => output, | ||
'options' => new Map<String, Object>() | ||
}; | ||
|
||
Test.startTest(); | ||
Boolean rv = (Boolean) r.call(OP_URL_ENCODE, args); | ||
Test.stopTest(); | ||
|
||
System.assertEquals(true, rv, 'UrlEncode should be successful.'); | ||
System.assertEquals( | ||
'Do+you+like+this+%23urlstring%3F', | ||
output.get('result'), | ||
'UrlEncode should catch special characters' | ||
); | ||
} | ||
|
||
@isTest | ||
static void urlEncodeShouldEncodeIntegers() { | ||
SfGpsDsEncodingOF r = new SfGpsDsEncodingOF(); | ||
Map<String, Object> output = new Map<String, Object>(); | ||
Map<String, Object> args = new Map<String, Object>{ | ||
'input' => new Map<String, Object>{ | ||
'arguments' => new List<Integer>{ 1120 } | ||
}, | ||
'output' => output, | ||
'options' => new Map<String, Object>() | ||
}; | ||
|
||
Test.startTest(); | ||
Boolean rv = (Boolean) r.call(OP_URL_ENCODE, args); | ||
Test.stopTest(); | ||
|
||
System.assertEquals(true, rv, 'UrlEncode should be successful.'); | ||
System.assertEquals( | ||
'1120', | ||
output.get('result'), | ||
'UrlEncode should encode integers' | ||
); | ||
} | ||
|
||
@isTest | ||
static void urlEncodeShouldFailWithoutArgs() { | ||
SfGpsDsEncodingOF r = new SfGpsDsEncodingOF(); | ||
Map<String, Object> output = new Map<String, Object>(); | ||
Map<String, Object> args = new Map<String, Object>{ | ||
'input' => new Map<String, Object>{ 'arguments' => new List<String>() }, | ||
'output' => output, | ||
'options' => new Map<String, Object>() | ||
}; | ||
|
||
Test.startTest(); | ||
Boolean rv = (Boolean) r.call(OP_URL_ENCODE, args); | ||
Test.stopTest(); | ||
|
||
System.assertEquals(false, rv, 'UrlEncode should fail.'); | ||
} | ||
|
||
@isTest | ||
static void urlDecodeShouldCatchSpecialChars1() { | ||
SfGpsDsEncodingOF r = new SfGpsDsEncodingOF(); | ||
Map<String, Object> output = new Map<String, Object>(); | ||
Map<String, Object> args = new Map<String, Object>{ | ||
'input' => new Map<String, Object>{ | ||
'arguments' => new List<String>{ 'Do+you+like+this+%23urlstring%3F' } | ||
}, | ||
'output' => output, | ||
'options' => new Map<String, Object>() | ||
}; | ||
|
||
Test.startTest(); | ||
Boolean rv = (Boolean) r.call(OP_URL_DECODE, args); | ||
Test.stopTest(); | ||
|
||
System.assertEquals(true, rv, 'UrlDecode should be successful.'); | ||
System.assertEquals( | ||
'Do you like this #urlstring?', | ||
output.get('result'), | ||
'UrlDecode should catch special characters' | ||
); | ||
} | ||
|
||
@isTest | ||
static void urlDecodeShouldCatchSpecialChars2() { | ||
SfGpsDsEncodingOF r = new SfGpsDsEncodingOF(); | ||
Map<String, Object> output = new Map<String, Object>(); | ||
Map<String, Object> args = new Map<String, Object>{ | ||
'input' => new Map<String, Object>{ | ||
'arguments' => new List<String>{ | ||
'Do%20you%20like%20this%20%23urlstring%3F' | ||
} | ||
}, | ||
'output' => output, | ||
'options' => new Map<String, Object>() | ||
}; | ||
|
||
Test.startTest(); | ||
Boolean rv = (Boolean) r.call(OP_URL_DECODE, args); | ||
Test.stopTest(); | ||
|
||
System.assertEquals(true, rv, 'UrlDecode should be successful.'); | ||
System.assertEquals( | ||
'Do you like this #urlstring?', | ||
output.get('result'), | ||
'UrlDecode should catch special characters incl %20' | ||
); | ||
} | ||
|
||
@isTest | ||
static void urlDecodeShouldEncodeIntegers() { | ||
SfGpsDsEncodingOF r = new SfGpsDsEncodingOF(); | ||
Map<String, Object> output = new Map<String, Object>(); | ||
Map<String, Object> args = new Map<String, Object>{ | ||
'input' => new Map<String, Object>{ | ||
'arguments' => new List<Integer>{ 1120 } | ||
}, | ||
'output' => output, | ||
'options' => new Map<String, Object>() | ||
}; | ||
|
||
Test.startTest(); | ||
Boolean rv = (Boolean) r.call(OP_URL_DECODE, args); | ||
Test.stopTest(); | ||
|
||
System.assertEquals(true, rv, 'UrlDecode should be successful.'); | ||
System.assertEquals( | ||
'1120', | ||
output.get('result'), | ||
'UrlDecode should decode integers' | ||
); | ||
} | ||
|
||
@isTest | ||
static void urlDecodeShouldFailWithoutArgs() { | ||
SfGpsDsEncodingOF r = new SfGpsDsEncodingOF(); | ||
Map<String, Object> output = new Map<String, Object>(); | ||
Map<String, Object> args = new Map<String, Object>{ | ||
'input' => new Map<String, Object>{ 'arguments' => new List<String>() }, | ||
'output' => output, | ||
'options' => new Map<String, Object>() | ||
}; | ||
|
||
Test.startTest(); | ||
Boolean rv = (Boolean) r.call(OP_URL_DECODE, args); | ||
Test.stopTest(); | ||
|
||
System.assertEquals(false, rv, 'UrlDecode should fail.'); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
sfGpsDs/main/default/classes/SfGpsDsEncodingOF_Test.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>60.0</apiVersion> | ||
Enco<status>Active</status> | ||
</ApexClass> |
2 changes: 1 addition & 1 deletion
2
sfGpsDsAuNsw/main/default/staticresources/sfGpsDsAuNsw/byo_aura-min-show-omni.css
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
sfGpsDsAuNsw/main/default/staticresources/sfGpsDsAuNsw/byo_aura-min.css
Large diffs are not rendered by default.
Oops, something went wrong.
128 changes: 128 additions & 0 deletions
128
sfGpsDsAuNsw/main/default/staticresources/sfGpsDsAuNsw/byo_aura_omnistudio-base.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
.omniscript-article.slds-card { | ||
border: none; | ||
} | ||
|
||
.omniscript-body { | ||
padding: 0 !important; | ||
} | ||
|
||
.slds-omniscript_stepform { | ||
padding-right: 0 !important; | ||
padding-left: 0 !important; | ||
} | ||
|
||
.omniscript-body { | ||
border-right: 0 !important; | ||
} | ||
|
||
omnistudio-omniscript-calculation-action, | ||
omnistudio-omniscript-delete-action, | ||
omnistudio-omniscript-docusign-envelope-action, | ||
omnistudio-omniscript-docusign-signature-action, | ||
omnistudio-omniscript-dr-extract-action, | ||
omnistudio-omniscript-dr-post-action, | ||
omnistudio-omniscript-dr-turbo-action, | ||
omnistudio-omniscript-dr-transform-action, | ||
omnistudio-omniscript-http-action, | ||
omnistudio-omniscript-ip-action, | ||
omnistudio-omniscript-matrix-action, | ||
c-navigate-action, | ||
omnistudio-omniscript-pdf-action, | ||
omnistudio-omniscript-remote-action, | ||
omnistudio-omniscript-set-values, | ||
omnistudio-omniscript-set-errors { | ||
.slds-button { | ||
--lwc-borderWidthThin: 2px; | ||
--lwc-border-radius: var(--nsw-border-radius); | ||
--slds-c-button-radius-border: var(--nsw-border-radius); | ||
--slds-c-button-text-color-hover: var(--nsw-brand-dark); | ||
|
||
border-color: var(--nsw-brand-dark); | ||
color: var(--nsw-brand-dark); | ||
|
||
font-size: var(--nsw-font-size-sm-mobile); | ||
font-weight: var(--nsw-font-bold); | ||
line-height: var(--nsw-line-height-sm-mobile); | ||
min-height: calc(var(--nsw-line-height-sm-mobile) * var(--nsw-font-size-sm-mobile) + 2 * 0.625rem + 4px); | ||
padding: .625rem 1.375rem; | ||
|
||
@media (min-width: 62rem) { | ||
font-size: var(--nsw-font-size-sm-desktop); | ||
line-height: var(--nsw-line-height-sm-desktop); | ||
min-height: calc(var(--nsw-line-height-sm-desktop) * var(--nsw-font-size-sm-desktop) + 2 * 0.625rem + 4px); | ||
} | ||
|
||
&:focus { | ||
background-color: var(--nsw-white); | ||
box-shadow: none; | ||
outline: 3px solid var(--nsw-focus); | ||
outline-offset: 3px; | ||
} | ||
|
||
&:hover { | ||
background-color: var(--nsw-brand-dark); | ||
border-color: transparent; | ||
color: var(--nsw-text-light); | ||
} | ||
|
||
&.slds-button--neutral, | ||
&.slds-button_neutral { | ||
background-color: var(--nsw-white); | ||
border-color: var(--nsw-brand-dark); | ||
color: var(--nsw-brand-dark); | ||
|
||
&:hover { | ||
background-color: var(--nsw-brand-dark); | ||
border-color: transparent; | ||
color: var(--nsw-text-light); | ||
} | ||
} | ||
|
||
&.slds-button--brand, | ||
&.slds-button_brand { | ||
background-color: var(--nsw-brand-dark); | ||
border-color: transparent; | ||
color: var(--nsw-text-light); | ||
|
||
&:focus { | ||
background-color: var(--nsw-brand-dark); | ||
box-shadow: none; | ||
outline: 3px solid var(--nsw-focus); | ||
outline-offset: 3px; | ||
} | ||
|
||
&:hover { | ||
background-image: linear-gradient(rgba(var(--nsw-white-rgb), .15), | ||
rgba(var(--nsw-white-rgb), .15)); | ||
border-color: transparent; | ||
color: var(--nsw-text-light); | ||
} | ||
} | ||
|
||
& .slds-button__icon { | ||
line-height: 0.625rem; | ||
} | ||
} | ||
|
||
a { | ||
div { | ||
color: var(--nsw-text-link); | ||
font-weight: var(--nsw-font-bold); | ||
text-decoration: underline; | ||
} | ||
|
||
&:visited div { | ||
color: var(--nsw-text-visited); | ||
} | ||
|
||
&:hover div { | ||
background-color: var(--nsw-text-link-hover); | ||
outline: 2px solid var(--nsw-text-link-hover); | ||
} | ||
|
||
&:focus div { | ||
outline: solid 3px var(--nsw-focus); | ||
outline-offset: 0; | ||
} | ||
} | ||
} |
17 changes: 1 addition & 16 deletions
17
sfGpsDsAuNsw/main/default/staticresources/sfGpsDsAuNsw/byo_aura_omnistudio-show-omni.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1 @@ | ||
.omniscript-article.slds-card { | ||
border: none; | ||
} | ||
|
||
.omniscript-body { | ||
padding: 0 !important; | ||
} | ||
|
||
.slds-omniscript_stepform { | ||
padding-right: 0 !important; | ||
padding-left: 0 !important; | ||
} | ||
|
||
.omniscript-body { | ||
border-right: 0 !important; | ||
} | ||
@import "./byo_aura_omnistudio-base"; |
19 changes: 2 additions & 17 deletions
19
sfGpsDsAuNsw/main/default/staticresources/sfGpsDsAuNsw/byo_aura_omnistudio.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,9 @@ | ||
@import "./byo_aura_omnistudio-base"; | ||
|
||
.omniscript-sfl-actions, | ||
.omniscript-button-position, | ||
.omniscript-btn-next, | ||
.omniscript-btn-previous, | ||
.omniscript-btn-save-for-later { | ||
display: none !important; | ||
} | ||
|
||
.omniscript-article.slds-card { | ||
border: none; | ||
} | ||
|
||
.omniscript-body { | ||
padding: 0 !important; | ||
} | ||
|
||
.slds-omniscript_stepform { | ||
padding-right: 0 !important; | ||
padding-left: 0 !important; | ||
} | ||
|
||
.omniscript-body { | ||
border-right: 0 !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.