Fixes e2e test input focus swapping (#262)

* Remove redundant E2E tests

* Remove deps

* Fixes e2e tests hopefully

Co-authored-by: Steve Faulkner <471400+southpolesteve@users.noreply.github.com>
Co-authored-by: Steve Faulkner <southpolesteve@gmail.com>
This commit is contained in:
Zachary Foster
2020-10-07 15:41:38 -04:00
committed by GitHub
parent 7dd046a15d
commit f5ecb8a04f
4 changed files with 29 additions and 83 deletions

View File

@@ -28,15 +28,21 @@ describe("Collection Add and Delete SQL spec", () => {
// type database id
await frame.waitFor('input[data-test="addCollection-newDatabaseId"]');
await frame.type('input[data-test="addCollection-newDatabaseId"]', dbId);
const dbInput = await frame.$('input[data-test="addCollection-newDatabaseId"]');
await dbInput.press("Backspace");
await dbInput.type(dbId);
// type collection id
await frame.waitFor('input[data-test="addCollection-collectionId"]');
await frame.type('input[data-test="addCollection-collectionId"]', collectionId);
const input = await frame.$('input[data-test="addCollection-collectionId"]');
await input.press("Backspace");
await input.type(collectionId);
// type partition key value
await frame.waitFor('input[data-test="addCollection-partitionKeyValue"]');
await frame.type('input[data-test="addCollection-partitionKeyValue"]', sharedKey);
const keyInput = await frame.$('input[data-test="addCollection-partitionKeyValue"]');
await keyInput.press("Backspace");
await keyInput.type(sharedKey);
// click submit
await frame.waitFor("#submitBtnAddCollection");
@@ -44,12 +50,12 @@ describe("Collection Add and Delete SQL spec", () => {
// validate created
// open database menu
await frame.waitFor(`span[title="${dbId}"]`);
await frame.waitForSelector('div[class="splashScreen"] > div[class="title"]', { visible: true });
await frame.waitFor(`div[data-test="${dbId}"]`), { visible: true };
await frame.waitFor(LOADING_STATE_DELAY);
await frame.waitFor(`div[data-test="${dbId}"]`), { visible: true };
await frame.click(`div[data-test="${dbId}"]`);
await frame.waitFor(RENDER_DELAY);
await frame.waitFor(`div[data-test="${collectionId}"]`, { visible: true });
// delete container
@@ -65,7 +71,7 @@ describe("Collection Add and Delete SQL spec", () => {
// confirm delete container
await frame.waitFor('input[data-test="confirmCollectionId"]', { visible: true });
await frame.type('input[data-test="confirmCollectionId"]', collectionId.trim());
await frame.type('input[data-test="confirmCollectionId"]', collectionId);
// click delete
await frame.waitFor('input[data-test="deleteCollection"]', { visible: true });
@@ -82,6 +88,7 @@ describe("Collection Add and Delete SQL spec", () => {
await button.asElement().click();
// click delete database
await frame.waitFor(RENDER_DELAY);
await frame.waitFor('span[class="treeComponentMenuItemLabel deleteDatabaseMenuItemLabel"]');
await frame.click('span[class="treeComponentMenuItemLabel deleteDatabaseMenuItemLabel"]');