Skip to content

Commit

Permalink
fix screenshot script
Browse files Browse the repository at this point in the history
  • Loading branch information
cars10 committed Dec 8, 2024
1 parent 21d984e commit 601fbb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions scripts/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,11 @@ exports.mock = async page => {
json: []
},
shardShards: {
url: 'http://localhost:9200/_cat/shards/?h=index%2Cshard%2Cprirep%2Cstate%2Cnode',
url: 'http://localhost:9200/_cat/shards/?h=index%2Cshard%2Cprirep%2Cstate%2Cnode%2Cdocs%2Cstore%2Cip%2Cnode%2Cunassigned.reason',
json: []
},
indexIndices: {
url: 'http://localhost:9200/_cat/indices/?h=index%2Chealth%2Cstatus%2Cuuid%2Cpri%2Crep%2Cdocs.count%2Cstore.size%2Csc&bytes=b',
url: 'http://localhost:9200/_cat/indices/?h=index%2Chealth%2Cstatus%2Cuuid%2Cpri%2Crep%2Cdocs.count%2Cstore.size%2Csc%2Ccd&bytes=b',
json: []
},
flush: {
Expand Down
8 changes: 3 additions & 5 deletions scripts/website_screenshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const screenshotIndexAliases = async page => {
}
const screenshotSearch = async page => (await navAndScreenshot(page, '#search', 'search', true))
const screenshotEditDocument = async page => {
await page.locator('body').dblclick()
await navAndScreenshot(page, 'body', 'document')
await page.locator('#close').click()
}
Expand All @@ -52,7 +53,8 @@ const screenshotRest = async page => {
const screenshotSettings = async page => (await navAndScreenshot(page, '#settings', 'settings'))

const toggleTheme = async page => {
await page.locator('#change_theme').click()
await page.locator('[data-testid="change-theme-button"]').click()
await page.locator('[data-testid="change-theme__dark"]').click()
}

const connectWithServer = async page => {
Expand All @@ -66,10 +68,6 @@ const navAndScreenshot = async (page, selector, name, persisted) => {
await screenshot(page, name, persisted)
}

const closeSnackbar = async page => {
await page.locator('#close_snackbar').click()
}

let counter = 1
const screenshot = async (page, name, persisted) => {
if (!persisted) await page.locator('body').click()
Expand Down

0 comments on commit 601fbb3

Please sign in to comment.