Skip to content

Commit

Permalink
fix checkbox (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaviniaStiliadou authored Apr 15, 2024
1 parent bbe7e35 commit 396ccea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function QuantMETab() {
const [qiskitRuntimeHandlerEndpoint, setQiskitRuntimeHandlerEndpoint] =
useState(config.getQiskitRuntimeHandlerEndpoint());
const [hybridRuntimeProvenance, setHybridRuntimeProvenance] = useState(
config.getHybridRuntimeProvenance()
config.getHybridRuntimeProvenance() ? true : false
);
const [awsRuntimeHandlerEndpoint, setAWSRuntimeHandlerEndpoint] = useState(
config.getAWSRuntimeHandlerEndpoint()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export function setScriptSplitterThreshold(threshold) {
/**
* Get the hybrid runtime provenance flag
*
* @return {boolean} the current value of the hybrid runtime provenance flag
* @return {string} the current value of the hybrid runtime provenance flag
*/
export function getHybridRuntimeProvenance() {
if (config.hybridRuntimeProvenance === undefined) {
Expand All @@ -233,9 +233,7 @@ export function setHybridRuntimeProvenance(hybridRuntimeProvenance) {
hybridRuntimeProvenance !== null &&
hybridRuntimeProvenance !== undefined
) {
let hybridRuntimeProvenanceBoolean =
hybridRuntimeProvenance === "true" ? true : false;
config.hybridRuntimeProvenance = hybridRuntimeProvenanceBoolean;
config.hybridRuntimeProvenance = hybridRuntimeProvenance;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("Test QuantME ConfigManager", function () {
"http://test:8891"
);
expect(quantmeConfig.getScriptSplitterThreshold()).to.equal(7);
expect(quantmeConfig.getHybridRuntimeProvenance()).to.equal(true);
expect(quantmeConfig.getHybridRuntimeProvenance()).to.equal("true");
});
});
});

0 comments on commit 396ccea

Please sign in to comment.