mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-06-12 23:47:29 +01:00
Run npm format
This commit is contained in:
@@ -48,7 +48,7 @@ test.describe("Test Mongo Pagination", () => {
|
|||||||
// Get initial results
|
// Get initial results
|
||||||
const resultText = await queryTab.resultsEditor.text();
|
const resultText = await queryTab.resultsEditor.text();
|
||||||
|
|
||||||
if (!resultText || resultText.trim() === '' || resultText.trim() === '[]') {
|
if (!resultText || resultText.trim() === "" || resultText.trim() === "[]") {
|
||||||
throw new Error("Query returned no results - the collection appears to be empty");
|
throw new Error("Query returned no results - the collection appears to be empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,9 @@ test.describe("Test Mongo Pagination", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const beforeClickText = await queryTab.resultsEditor.text();
|
const beforeClickText = await queryTab.resultsEditor.text();
|
||||||
const beforeClickHash = Buffer.from(beforeClickText || "").toString('base64').substring(0, 50);
|
const beforeClickHash = Buffer.from(beforeClickText || "")
|
||||||
|
.toString("base64")
|
||||||
|
.substring(0, 50);
|
||||||
|
|
||||||
await loadMoreButton.click();
|
await loadMoreButton.click();
|
||||||
|
|
||||||
@@ -90,7 +92,9 @@ test.describe("Test Mongo Pagination", () => {
|
|||||||
await page.waitForTimeout(2000);
|
await page.waitForTimeout(2000);
|
||||||
|
|
||||||
const currentEditorText = await queryTab.resultsEditor.text();
|
const currentEditorText = await queryTab.resultsEditor.text();
|
||||||
const currentHash = Buffer.from(currentEditorText || "").toString('base64').substring(0, 50);
|
const currentHash = Buffer.from(currentEditorText || "")
|
||||||
|
.toString("base64")
|
||||||
|
.substring(0, 50);
|
||||||
|
|
||||||
if (currentHash !== beforeClickHash) {
|
if (currentHash !== beforeClickHash) {
|
||||||
editorContentChanged = true;
|
editorContentChanged = true;
|
||||||
@@ -109,7 +113,7 @@ test.describe("Test Mongo Pagination", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Final verification
|
// Final verification
|
||||||
const finalIndicator = queryTab.resultsView.locator('text=/\\d+ - \\d+/');
|
const finalIndicator = queryTab.resultsView.locator("text=/\\d+ - \\d+/");
|
||||||
const finalIndicatorText = await finalIndicator.textContent();
|
const finalIndicatorText = await finalIndicator.textContent();
|
||||||
|
|
||||||
if (finalIndicatorText) {
|
if (finalIndicatorText) {
|
||||||
@@ -125,4 +129,4 @@ test.describe("Test Mongo Pagination", () => {
|
|||||||
expect(totalPagesLoaded).toBe(5);
|
expect(totalPagesLoaded).toBe(5);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user