CodeMirror debounce wait for smoke tests (#2644)

This commit is contained in:
Opender Singh 2020-09-21 18:17:31 +12:00 committed by GitHub
parent 21ee2ae790
commit 2132e59f2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,14 +29,17 @@ const createNewRequest = async (app, name = undefined) => {
const typeUrl = async (app, url) => {
const urlEditor = await app.client.$('.urlbar .editor .input');
await typeCodeMirror(urlEditor, url);
await typeCodeMirror(app, urlEditor, url, 150);
};
const typeCodeMirror = async (element, value) => {
const typeCodeMirror = async (app, element, value, debounceWait) => {
await element.click();
const cm = await element.$('.CodeMirror');
await cm.waitForExist();
await cm.keys(value);
// Wait for the code-editor debounce
await app.client.pause(debounceWait);
};
const clickSendRequest = async app => {