-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(opentrons-ai-client): update api call functions for simulator api
update api call functions for simulator api close AUTH-388
- Loading branch information
Showing
8 changed files
with
55 additions
and
8 deletions.
There are no files selected for viewing
Binary file modified
BIN
-7.25 KB
(41%)
opentrons-ai-client/src/assets/images/favicon/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-26.5 KB
(35%)
opentrons-ai-client/src/assets/images/favicon/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-6.63 KB
(40%)
opentrons-ai-client/src/assets/images/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-152 Bytes
(75%)
opentrons-ai-client/src/assets/images/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-449 Bytes
(67%)
opentrons-ai-client/src/assets/images/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,22 @@ | ||
import { describe, it, expect } from 'vitest' | ||
import { detectSimulate } from '../utils' | ||
|
||
describe('detectSimulate', () => { | ||
it('should return true', () => { | ||
expect(detectSimulate('simulate')).toBeTruthy() | ||
expect(detectSimulate('simulate the above protocol')).toBeTruthy() | ||
expect(detectSimulate('simulates the above protocol')).toBeTruthy() | ||
expect(detectSimulate('I want to simulate the above protocol')).toBeTruthy() | ||
expect(detectSimulate('Simulate')).toBeTruthy() | ||
expect(detectSimulate('Simulates')).toBeTruthy() | ||
expect(detectSimulate('SIMULATE')).toBeTruthy() | ||
expect(detectSimulate('SIMULATES')).toBeTruthy() | ||
expect(detectSimulate('please simulate the above protocol')).toBeTruthy() | ||
}) | ||
|
||
it('should return false', () => { | ||
expect(detectSimulate('simulator')).toBeFalsy() | ||
expect(detectSimulate('run a simulator')).toBeFalsy() | ||
expect(detectSimulate('test')).toBeFalsy() | ||
}) | ||
}) |
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,12 @@ | ||
/** | ||
* This function checks if the input string contains the word 'simulate'. | ||
* It uses a global, case-insensitive, multiline regular expression to search for the word. | ||
* | ||
* @param {string} input - The string to be tested. | ||
* @returns {boolean} - Returns true if 'simulate' is found in the input string, false otherwise. | ||
*/ | ||
|
||
export const detectSimulate = (input: string): boolean => { | ||
const regex = /simulate/gim | ||
return regex.test(input) | ||
} |