-
Notifications
You must be signed in to change notification settings - Fork 177
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 #1791 from vansh-codes/testcase
added testcase generator extension: Issue #1737
- Loading branch information
Showing
8 changed files
with
503 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"manifest_version": 3, | ||
"name": "Test Case Generator", | ||
"version": "1.0", | ||
"description": "Generate test cases for various data types for coding purpose.", | ||
"action": { | ||
"default_popup": "popup.html", | ||
"default_icon": { | ||
"16": "icons/icon16.png", | ||
"32": "icons/icon32.png", | ||
"48": "icons/icon48.png", | ||
"128": "icons/icon128.png" | ||
} | ||
}, | ||
"icons": { | ||
"16": "icons/icon128.png", | ||
"32": "icons/icon128.png", | ||
"48": "icons/icon128.png", | ||
"128": "icons/icon128.png" | ||
}, | ||
"permissions": [ | ||
"tabs" | ||
] | ||
} | ||
|
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,130 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 20px; | ||
background-color: #f4f4f9; | ||
} | ||
|
||
h1 { | ||
font-size: 1.5em; | ||
color: #333; | ||
} | ||
|
||
form { | ||
margin-bottom: 20px; | ||
background-color: #fff; | ||
padding: 20px; | ||
border-radius: 8px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
.form-group { | ||
margin-bottom: 25px; | ||
} | ||
|
||
.form-group label { | ||
font-weight: bold; | ||
margin-left: -12px; | ||
margin-top: 3px; | ||
padding: 2px; | ||
} | ||
|
||
.horizontal-group { | ||
display: flex; | ||
gap: 10px; | ||
align-items: center; | ||
} | ||
|
||
#output { | ||
position: relative; | ||
min-height: 30px; | ||
margin-top: 20px; | ||
border: 1px solid #ccc; | ||
background-color: #fff; | ||
padding: 5px 15px; | ||
border-radius: 8px; | ||
white-space: wrap; | ||
margin: 5px 30px; | ||
overflow-wrap: break-word; | ||
white-space: pre-wrap; | ||
} | ||
|
||
#output-container { | ||
position: relative; | ||
margin-top: 20px; | ||
background-color: #fff; | ||
border-radius: 8px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
padding: 10px; | ||
margin: 10px 30px 10px 30px; | ||
overflow-wrap: break-word; | ||
white-space: pre-wrap; | ||
} | ||
|
||
#copyButton { | ||
position: absolute; | ||
top: 4px; | ||
left: 60px; | ||
background: none; | ||
border: none; | ||
cursor: pointer; | ||
font-size: 1.2em; | ||
color: #007bff; | ||
} | ||
|
||
#copyButton:hover { | ||
color: #0056b3; | ||
} | ||
|
||
|
||
input[type="number"] { | ||
width: 60px; | ||
padding: 5px; | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
} | ||
|
||
button { | ||
margin-top: 10px; | ||
padding: 10px 20px; | ||
background-color: #007bff; | ||
border: none; | ||
border-radius: 4px; | ||
color: #fff; | ||
cursor: pointer; | ||
} | ||
|
||
button:hover { | ||
background-color: #0056b3; | ||
} | ||
|
||
.hidden { | ||
display: none; | ||
} | ||
|
||
#output-container button{ | ||
color: #ccc; | ||
} | ||
|
||
#output-container button:hover{ | ||
color: #b0b0b0; | ||
} | ||
|
||
.footer { | ||
position: fixed; | ||
padding: 10px; | ||
bottom: 0; | ||
width: 100%; | ||
background: rgb(212, 218, 214); | ||
text-align: center; | ||
color: white; | ||
} | ||
|
||
.footer a { | ||
color: white; | ||
text-decoration: none; | ||
} | ||
|
||
.footer a:hover{ | ||
color: #5ca7f8df; | ||
text-decoration: underline; | ||
} |
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,62 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Test Case Generator</title> | ||
<link rel="stylesheet" type="text/css" href="popup.css"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> | ||
</head> | ||
<body> | ||
<h1>Test Case Generator</h1> | ||
<form id="testCaseForm"> | ||
<div class="form-group"> | ||
<label>Select Data Type:</label> | ||
<div class="horizontal-group"> | ||
<input type="radio" name="datatype" value="int" id="int"><label for="int">Integer</label> | ||
<input type="radio" name="datatype" value="float" id="float"> <label for="float">Float</label> | ||
<input type="radio" name="datatype" value="char" id="char"><label for="char">Char</label> | ||
<input type="radio" name="datatype" value="string" id="string"><label for="string">String</label> | ||
<input type="radio" name="datatype" value="long" id="long"><label for="long">Long</label> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label>Select Test Case Type:</label> | ||
<div class="horizontal-group"> | ||
<input type="radio" name="testtype" value="simple" id="simple" disabled> <label for="simlpe"> Single Test Case</label> | ||
<input type="radio" name="testtype" value="array" id="array" disabled><label for="array"> Array of Data Type</label> | ||
<input type="radio" name="testtype" value="sentence" id="sentence" disabled><label for="sentence"> String Sentence</label> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="length">Test Case Length:</label> | ||
<input type="number" id="length" name="length" value="1" min="1"> | ||
</div> | ||
|
||
<div id="arraySizeContainer" class="form-group hidden"> | ||
<label for="arraySize">Array Size:</label> | ||
<input type="number" id="arraySize" name="arraySize" min="2" value="10"> | ||
</div> | ||
|
||
<div id="floatDecimalContainer" class="form-group hidden"> | ||
<label for="floatDecimalSize">Decimal points:</label> | ||
<input type="number" id="floatDecimalSize" name="floatDecimalSize" min="2"> | ||
</div> | ||
|
||
<button type="button" id="generateButton">Generate Test Cases</button> | ||
<button type="button" id="clearButton">Clear</button> | ||
</form> | ||
|
||
<div id="output-container"> | ||
<b>Output:</b> | ||
<div id="output"></div> | ||
<button type="button" id="copyButton" style="display: none;"><i class="fas fa-copy"></i></button> | ||
</div> | ||
|
||
<div class="footer"> | ||
© <a href="https://github.com/vansh-codes/" target="_blank">vansh-codes</a> 2024 | ||
</div> | ||
|
||
<script src="popup.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.