mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-18 16:31:31 +00:00
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:
@@ -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"]');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user