playgrounds: Rename name field to playground_name.

The browser seems to autofill the `Name` field of the add-playground
form. Most likely this behavior is a result of  value of the `name`
input field being `name`, causing the browser do to something weird
here. This name is now changed to `playground_name`.
This commit is contained in:
Sumanth V Rao
2021-05-10 21:59:56 +05:30
committed by Tim Abbott
parent b15941610d
commit 72ead6e097
3 changed files with 11 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ import type {Page} from "puppeteer";
import common from "../puppeteer_lib/common";
type Playground = {
name: string;
playground_name: string;
pygments_language: string;
url_prefix: string;
};
@@ -34,7 +34,7 @@ async function _add_playground_and_return_status(page: Page, payload: Playground
async function test_successful_playground_creation(page: Page): Promise<void> {
const payload = {
pygments_language: "Python",
name: "Python3 playground",
playground_name: "Python3 playground",
url_prefix: "https://python.example.com",
};
const status = await _add_playground_and_return_status(page, payload);
@@ -60,7 +60,7 @@ async function test_successful_playground_creation(page: Page): Promise<void> {
async function test_invalid_playground_parameters(page: Page): Promise<void> {
const payload = {
pygments_language: "Python",
name: "Python3 playground",
playground_name: "Python3 playground",
url_prefix: "not_a_url",
};
let status = await _add_playground_and_return_status(page, payload);