mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 01:55:40 +00:00
removelevelbutton tests
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import getNumLevels from './levels/getNumLevels';
|
||||
import {getAddForm, addLevel} from './setupTests';
|
||||
import {getAddForm, trim, addLevel} from './setupTests';
|
||||
|
||||
document.body.innerHTML = getAddForm();
|
||||
|
||||
@@ -43,7 +43,6 @@ it('addLevelButton works', () => {
|
||||
expect(trim(a)).toBe(trim(finalHtml()));
|
||||
});
|
||||
|
||||
const trim = (s: string) => s.replace(/\s/g, '');
|
||||
|
||||
const finalHtml = () => {
|
||||
return `
|
||||
@@ -59,7 +58,7 @@ const finalHtml = () => {
|
||||
name="description"
|
||||
id="description"
|
||||
required=""
|
||||
value=""
|
||||
|
||||
>
|
||||
</label>
|
||||
|
||||
@@ -86,7 +85,7 @@ const finalHtml = () => {
|
||||
class="sitekey-form__level-input"
|
||||
type="number"
|
||||
name="visitor1"
|
||||
value=""
|
||||
|
||||
id="visitor1"
|
||||
>
|
||||
</label>
|
||||
@@ -97,7 +96,7 @@ const finalHtml = () => {
|
||||
type="number"
|
||||
name="difficulty1"
|
||||
class="sitekey-form__level-input"
|
||||
value=""
|
||||
|
||||
id="difficulty1"
|
||||
>
|
||||
</label>
|
||||
@@ -122,7 +121,7 @@ const finalHtml = () => {
|
||||
class="sitekey-form__level-input"
|
||||
type="number"
|
||||
name="visitor2"
|
||||
value=""
|
||||
|
||||
id="visitor2"
|
||||
>
|
||||
</label>
|
||||
@@ -133,7 +132,7 @@ const finalHtml = () => {
|
||||
type="number"
|
||||
name="difficulty2"
|
||||
class="sitekey-form__level-input"
|
||||
value=""
|
||||
|
||||
id="difficulty2"
|
||||
>
|
||||
</label>
|
||||
@@ -158,7 +157,7 @@ const finalHtml = () => {
|
||||
class="sitekey-form__level-input"
|
||||
type="number"
|
||||
name="visitor3"
|
||||
value=""
|
||||
|
||||
id="visitor3"
|
||||
>
|
||||
</label>
|
||||
@@ -169,7 +168,7 @@ const finalHtml = () => {
|
||||
type="number"
|
||||
name="difficulty3"
|
||||
class="sitekey-form__level-input"
|
||||
value=""
|
||||
|
||||
id="difficulty3"
|
||||
>
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user