Added a few more UI tests

This commit is contained in:
n1474335 2023-03-22 11:19:01 +00:00
parent 92dada8a80
commit 5d3302f6d7
1 changed files with 75 additions and 62 deletions

View File

@ -38,13 +38,15 @@ module.exports = {
testOp(browser, "Adler-32 Checksum", "test input", "16160411"); testOp(browser, "Adler-32 Checksum", "test input", "16160411");
testOp(browser, "Affine Cipher Decode", "test input", "rcqr glnsr", [1, 2]); testOp(browser, "Affine Cipher Decode", "test input", "rcqr glnsr", [1, 2]);
testOp(browser, "Affine Cipher Encode", "test input", "njln rbfpn", [2, 1]); testOp(browser, "Affine Cipher Encode", "test input", "njln rbfpn", [2, 1]);
testOp(browser, "AMF Decode", "\u000A\u0013\u0001\u0003a\u0006\u0009test", /"\$value": "test"/);
testOp(browser, "AMF Encode", '{"a": "test"}', "\u000A\u0013\u0001\u0003a\u0006\u0009test");
testOp(browser, "Analyse hash", "0123456789abcdef", /CRC-64/); testOp(browser, "Analyse hash", "0123456789abcdef", /CRC-64/);
testOp(browser, "Atbash Cipher", "test input", "gvhg rmkfg"); testOp(browser, "Atbash Cipher", "test input", "gvhg rmkfg");
// testOp(browser, "Avro to JSON", "test input", "test_output"); // testOp(browser, "Avro to JSON", "test input", "test_output");
testOp(browser, "BLAKE2b", "test input", "33ebdc8f38177f3f3f334eeb117a84e11f061bbca4db6b8923e5cec85103f59f415551a5d5a933fdb6305dc7bf84671c2540b463dbfa08ee1895cfaa5bd780b5", ["512", "Hex", { "option": "UTF8", "string": "pass" }]); testOp(browser, "BLAKE2b", "test input", "33ebdc8f38177f3f3f334eeb117a84e11f061bbca4db6b8923e5cec85103f59f415551a5d5a933fdb6305dc7bf84671c2540b463dbfa08ee1895cfaa5bd780b5", ["512", "Hex", { "option": "UTF8", "string": "pass" }]);
testOp(browser, "BLAKE2s", "test input", "defe73d61dfa6e5807e4f9643e159a09ccda6be3c26dcd65f8a9bb38bfc973a7", ["256", "Hex", { "option": "UTF8", "string": "pass" }]); testOp(browser, "BLAKE2s", "test input", "defe73d61dfa6e5807e4f9643e159a09ccda6be3c26dcd65f8a9bb38bfc973a7", ["256", "Hex", { "option": "UTF8", "string": "pass" }]);
// testOp(browser, "BSON deserialise", "test input", "test_output"); testOp(browser, "BSON deserialise", "\u0011\u0000\u0000\u0000\u0002a\u0000\u0005\u0000\u0000\u0000test\u0000\u0000", '{\u000A "a": "test"\u000A}');
// testOp(browser, "BSON serialise", "test input", "test_output"); testOp(browser, "BSON serialise", '{"a":"test"}', "\u0011\u0000\u0000\u0000\u0002a\u0000\u0005\u0000\u0000\u0000test\u0000\u0000");
// testOp(browser, "Bacon Cipher Decode", "test input", "test_output"); // testOp(browser, "Bacon Cipher Decode", "test input", "test_output");
// testOp(browser, "Bacon Cipher Encode", "test input", "test_output"); // testOp(browser, "Bacon Cipher Encode", "test input", "test_output");
testOp(browser, "Bcrypt", "test input", /^\$2a\$06\$.{53}$/, [6]); testOp(browser, "Bcrypt", "test input", /^\$2a\$06\$.{53}$/, [6]);
@ -60,6 +62,8 @@ module.exports = {
testOpHtml(browser, "Bombe", "XTSYN WAEUG EZALY NRQIM AMLZX MFUOD AWXLY LZCUZ QOQBQ JLCPK NDDRW F", "table tr:last-child td:first-child", "ECG", ["3-rotor", "LEYJVCNIXWPBQMDRTAKZGFUHOS", "BDFHJLCPRTXVZNYEIWGAKMUSQO<W", "AJDKSIRUXBLHWTMCQGZNPYFVOE<F", "ESOVPZJAYQUIRHXLNFTGKDCMWB<K", "AY BR CU DH EQ FS GL IP JX KN MO TZ VW", "HELLO CYBER CHEFU SER", 0, true]); testOpHtml(browser, "Bombe", "XTSYN WAEUG EZALY NRQIM AMLZX MFUOD AWXLY LZCUZ QOQBQ JLCPK NDDRW F", "table tr:last-child td:first-child", "ECG", ["3-rotor", "LEYJVCNIXWPBQMDRTAKZGFUHOS", "BDFHJLCPRTXVZNYEIWGAKMUSQO<W", "AJDKSIRUXBLHWTMCQGZNPYFVOE<F", "ESOVPZJAYQUIRHXLNFTGKDCMWB<K", "AY BR CU DH EQ FS GL IP JX KN MO TZ VW", "HELLO CYBER CHEFU SER", 0, true]);
testOp(browser, ["Bzip2 Compress", "To Hex"], "test input", "42 5a 68 39 31 41 59 26 53 59 cf 96 82 1d 00 00 03 91 80 40 00 02 21 4e 00 20 00 21 90 c2 10 c0 88 33 92 8e df 17 72 45 38 50 90 cf 96 82 1d"); testOp(browser, ["Bzip2 Compress", "To Hex"], "test input", "42 5a 68 39 31 41 59 26 53 59 cf 96 82 1d 00 00 03 91 80 40 00 02 21 4e 00 20 00 21 90 c2 10 c0 88 33 92 8e df 17 72 45 38 50 90 cf 96 82 1d");
testOp(browser, ["From Hex", "Bzip2 Decompress"], "425a68393141592653597b0884b7000003038000008200ce00200021a647a4218013709517c5dc914e14241ec2212dc0", "test_output", [[], [true]]); testOp(browser, ["From Hex", "Bzip2 Decompress"], "425a68393141592653597b0884b7000003038000008200ce00200021a647a4218013709517c5dc914e14241ec2212dc0", "test_output", [[], [true]]);
// testOp(browser, "CBOR Decode", "test input", "test output");
// testOp(browser, "CBOR Encode", "test input", "test output");
testOp(browser, "CRC-16 Checksum", "test input", "77c7"); testOp(browser, "CRC-16 Checksum", "test input", "77c7");
testOp(browser, "CRC-32 Checksum", "test input", "29822bc8"); testOp(browser, "CRC-32 Checksum", "test input", "29822bc8");
testOp(browser, "CRC-8 Checksum", "test input", "9d"); testOp(browser, "CRC-8 Checksum", "test input", "9d");
@ -92,6 +96,7 @@ module.exports = {
// testOp(browser, "Count occurrences", "test input", "test_output"); // testOp(browser, "Count occurrences", "test input", "test_output");
testOpImage(browser, "Cover Image", "files/Hitchhikers_Guide.jpeg"); testOpImage(browser, "Cover Image", "files/Hitchhikers_Guide.jpeg");
testOpImage(browser, "Crop Image", "files/Hitchhikers_Guide.jpeg"); testOpImage(browser, "Crop Image", "files/Hitchhikers_Guide.jpeg");
// testOp(browser, "CSS Selector", "test input", "test output");
// testOp(browser, "DES Decrypt", "test input", "test_output"); // testOp(browser, "DES Decrypt", "test input", "test_output");
// testOp(browser, "DES Encrypt", "test input", "test_output"); // testOp(browser, "DES Encrypt", "test input", "test_output");
// testOp(browser, "DNS over HTTPS", "test input", "test_output"); // testOp(browser, "DNS over HTTPS", "test input", "test_output");
@ -203,8 +208,14 @@ module.exports = {
// testOp(browser, "Jump", "test input", "test_output"); // testOp(browser, "Jump", "test input", "test_output");
// testOp(browser, "Keccak", "test input", "test_output"); // testOp(browser, "Keccak", "test input", "test_output");
// testOp(browser, "Label", "test input", "test_output"); // testOp(browser, "Label", "test input", "test_output");
// testOp(browser, "LM Hash", "test input", "test output");
// testOp(browser, "Lorenz", "test input", "test_output"); // testOp(browser, "Lorenz", "test input", "test_output");
// testOp(browser, "Luhn Checksum", "test input", "test_output"); // testOp(browser, "Luhn Checksum", "test input", "test_output");
// testOp(browser, "LZ String", "test input", "test output");
// testOp(browser, "LZ4 Compress", "test input", "test output");
// testOp(browser, "LZ4 Decompress", "test input", "test output");
// testOp(browser, "LZMA Compress", "test input", "test output");
// testOp(browser, "LZMA Decompress", "test input", "test output");
// testOp(browser, "MD2", "test input", "test_output"); // testOp(browser, "MD2", "test input", "test_output");
// testOp(browser, "MD4", "test input", "test_output"); // testOp(browser, "MD4", "test input", "test_output");
// testOp(browser, "MD5", "test input", "test_output"); // testOp(browser, "MD5", "test input", "test_output");
@ -282,6 +293,7 @@ module.exports = {
testOpImage(browser, "Rotate Image", "files/Hitchhikers_Guide.jpeg"); testOpImage(browser, "Rotate Image", "files/Hitchhikers_Guide.jpeg");
// testOp(browser, "Rotate left", "test input", "test_output"); // testOp(browser, "Rotate left", "test input", "test_output");
// testOp(browser, "Rotate right", "test input", "test_output"); // testOp(browser, "Rotate right", "test input", "test_output");
// testOp(browser, "Scrypt", "test input", "test output");
// testOp(browser, "SHA0", "test input", "test_output"); // testOp(browser, "SHA0", "test input", "test_output");
// testOp(browser, "SHA1", "test input", "test_output"); // testOp(browser, "SHA1", "test input", "test_output");
// testOp(browser, "SHA2", "test input", "test_output"); // testOp(browser, "SHA2", "test input", "test_output");
@ -302,6 +314,7 @@ module.exports = {
testOpHtml(browser, "Show Base64 offsets", "test input", "span:nth-last-of-type(2)", "B"); testOpHtml(browser, "Show Base64 offsets", "test input", "span:nth-last-of-type(2)", "B");
testOpHtml(browser, "Show on map", "51.5007° N, 0.1246° W", "#presentedMap .leaflet-popup-content", "51.5007,-0.1246"); testOpHtml(browser, "Show on map", "51.5007° N, 0.1246° W", "#presentedMap .leaflet-popup-content", "51.5007,-0.1246");
// testOp(browser, "Sleep", "test input", "test_output"); // testOp(browser, "Sleep", "test input", "test_output");
// testOp(browser, "SM3", "test input", "test output");
// testOp(browser, "Snefru", "test input", "test_output"); // testOp(browser, "Snefru", "test input", "test_output");
// testOp(browser, "Sort", "test input", "test_output"); // testOp(browser, "Sort", "test input", "test_output");
// testOp(browser, "Split", "test input", "test_output"); // testOp(browser, "Split", "test input", "test_output");