Skip to content

Commit

Permalink
Fix command-sender playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
jmthomas committed Dec 16, 2023
1 parent a4e439e commit 5b1b5d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -539,14 +539,9 @@ export default {
'#00c7cb',
'#938bdb',
'#4dacff',
'#70dde0',
'#c9c5ed',
'#92cbff',
'#a1e9eb',
'#b7dcff',
'red',
'lime',
'darkorange',
'red',
'gold',
'hotpink',
'tan',
Expand Down
6 changes: 3 additions & 3 deletions playwright/tests/command-sender.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test.use({
// Helper function to select a parameter dropdown
async function selectValue(page, param, value) {
let row = page.locator(`tr:has-text("${param}")`)
await row.getByRole('combobox').click()
await row.getByRole('button').click()
await page.getByRole('option', { name: value }).click()
}

Expand Down Expand Up @@ -272,7 +272,7 @@ test('handles string values', async ({ page, utils }) => {
await expect(page.locator('main')).toContainText('ASCII command')
// The default text 'NOOP' should be selected
let row = page.locator(`tr:has-text("STRING")`)
await expect(row.getByRole('combobox')).toContainText('NOOP')
await expect(row.getByRole('button')).toContainText('NOOP')
await checkValue(page, 'STRING', 'NOOP')
await page.locator('[data-test="select-send"]').click()
await expect(page.locator('main')).toContainText(
Expand Down Expand Up @@ -301,7 +301,7 @@ test('handles string values', async ({ page, utils }) => {
// Manually typing in an existing state value should change the state drop down
await setValue(page, 'STRING', 'FIRE LASER')
await expect(
page.locator('div[role=combobox]:has-text("FIRE LASER")'),
page.locator('div[role=button]:has-text("FIRE LASER")'),
).toBeVisible()
})

Expand Down

0 comments on commit 5b1b5d2

Please sign in to comment.