-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from GoldenLabHuji:ShlomiShitrit/issue15
ShlomiShitrit/issue15 - Add Description
- Loading branch information
Showing
13 changed files
with
301 additions
and
126 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "elp-query-ui", | ||
"name": "dbbot-ui", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
|
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,100 @@ | ||
import "@testing-library/jest-dom/jest-globals"; | ||
import "@testing-library/jest-dom"; | ||
import { render, screen } from "@testing-library/react"; | ||
import { Bot } from "@/app/general/interfaces"; | ||
import { DataType } from "@/app/general/types"; | ||
|
||
export const botMock: Bot = { | ||
dataMap: {}, | ||
_details: { | ||
name: "Bot", | ||
description: "A bot for testing", | ||
}, | ||
_data: { | ||
headers: ["Name", "Age"], | ||
columns: [ | ||
{ | ||
_id: "name", | ||
displayName: "Name", | ||
dataType: DataType.STRING, | ||
operatorsArray: [ | ||
{ | ||
id: "equals", | ||
displayName: "equals", | ||
params: [ | ||
{ | ||
isArray: false, | ||
dataType: DataType.STRING, | ||
name: "cell", | ||
}, | ||
], | ||
}, | ||
{ | ||
id: "contains", | ||
displayName: "contains", | ||
params: [ | ||
{ | ||
isArray: false, | ||
dataType: DataType.STRING, | ||
name: "cell", | ||
}, | ||
], | ||
}, | ||
], | ||
rows: ["Alice", "Bob"], | ||
_description: "The name of the person", | ||
}, | ||
], | ||
}, | ||
_messages: { | ||
customMessages: { | ||
errorMessage: "Invalid input", | ||
attributeMessage: "Please select an attribute", | ||
operatorMessage: "Choose an operator", | ||
continueMessage: "Continue", | ||
resultMessage: "Here is the result", | ||
}, | ||
slots: { | ||
welcomeSlot: ["Welcome to the bot"], | ||
restartSlot: ["Restarting the process"], | ||
}, | ||
}, | ||
currentOperatorIndex: 0, | ||
filePath: "path/to/file", | ||
operatorsData: [ | ||
{ | ||
id: "equals", | ||
displayName: "equals", | ||
params: [ | ||
{ | ||
isArray: false, | ||
dataType: DataType.STRING, | ||
name: "cell", | ||
}, | ||
], | ||
}, | ||
{ | ||
id: "contains", | ||
displayName: "contains", | ||
params: [ | ||
{ | ||
isArray: false, | ||
dataType: DataType.STRING, | ||
name: "cell", | ||
}, | ||
], | ||
}, | ||
], | ||
operatorsFiles: { | ||
functions: { | ||
startsWithBAndEndsWithX: | ||
'\n\n export const startsWithBAndEndsWithX = function (cell, value) {\n return cell.startsWith("B") && cell.endsWith(value);\n };', | ||
}, | ||
main: '\nimport {\n greaterOperator,\n lowerOperator,\n equalOperator,\n rangeOperator,\n startWithOperator,\n endWithOperator,\n containsOperator,\n equalStringOperator,\n chooseOneOperator,\n chooseMultipleOperator, \n} from "@/app/operators";\n\nexport const OPERATORS = {\n greater: greaterOperator,\n lower: lowerOperator,\n equal: equalOperator,\n range: rangeOperator,\n startWith: startWithOperator,\n endWith: endWithOperator,\n contains: containsOperator,\n equalString: equalStringOperator,\n chooseOne: chooseOneOperator,\n chooseMultiple: chooseMultipleOperator,\n};\n\nimport { startsWithBAndEndsWithX } from "@/app/operators/startsWithBAndEndsWithX";\n\nOPERATORS["startsWithBAndEndsWithX" as keyof typeof OPERATORS] = startsWithBAndEndsWithX;', | ||
}, | ||
colors: { bot: "green", user: "blue" }, | ||
}; | ||
|
||
describe("Resources", () => { | ||
it("Test", () => {}); | ||
}); |
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
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 |
---|---|---|
@@ -1,8 +1,27 @@ | ||
export const styles = { | ||
box: { | ||
display: "flex", | ||
backgroundColor: "#f8f9fa", | ||
padding: 2, | ||
textAlign: "center", | ||
justifyContent: "center", | ||
color: "black", | ||
} | ||
} | ||
}, | ||
typContainer: { | ||
width: "34%", | ||
textAlign: "center", | ||
justifyContent: "center", | ||
}, | ||
dataContainer: { | ||
width: "33%", | ||
direction: "rtl", | ||
}, | ||
buttonContainer: { | ||
width: "33%", | ||
}, | ||
attributeButton: { | ||
width: "25%", | ||
}, | ||
dataButton: { | ||
width: "25%", | ||
}, | ||
}; |
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.