Skip to content

Commit

Permalink
fix: e2e multiple buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
robot9706 committed Dec 2, 2024
1 parent 8c6c722 commit 88db92e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ test.describe('Deployment Copy', () => {
await copyButton.click()

const newPrefix = 'dcpy-second'
await page.locator(`button:has-text("${DAGENT_NODE}")`).click()
await page.locator(`button:has-text("${DAGENT_NODE}")`).first().click()
await fillDeploymentPrefix(page, newPrefix)

const currentUrl = page.url()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ test.describe('Versioned Project', () => {
const copyButton = await page.locator('button:has-text("Copy")')
await copyButton.click()

await page.locator(`button:has-text("${nodeName}")`).click()
await page.locator(`button:has-text("${nodeName}")`).first().click()
await fillDeploymentPrefix(page, `${prefix}-new-prefix`)

const currentUrl = page.url()
Expand All @@ -102,7 +102,7 @@ test.describe('Versioned Project', () => {
const copyButton = await page.locator(`[alt="Copy"]:right-of(:has-text("${projectName}"))`).first()
await copyButton.click()

await page.locator(`button:has-text("${nodeName}")`).click()
await page.locator(`button:has-text("${nodeName}")`).first().click()
await fillDeploymentPrefix(page, prefix)
await page.locator('button:has-text("Copy")').click()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test.describe('Versionless Project', () => {
const copyButton = await page.locator(`[alt="Copy"]:right-of(:has-text("${projectName}"))`).first()
await copyButton.click()

await page.locator(`button:has-text("${nodeName}")`).click()
await page.locator(`button:has-text("${nodeName}")`).first().click()
await fillDeploymentPrefix(page, prefix)
await page.locator('button:has-text("Copy")').click()

Expand Down Expand Up @@ -96,7 +96,7 @@ test.describe('Versionless Project', () => {
const copyButton = page.locator('button:has-text("Copy")')
await copyButton.click()

await page.locator(`button:has-text("${nodeName}")`).click()
await page.locator(`button:has-text("${nodeName}")`).first().click()
await fillDeploymentPrefix(page, `${prefix}-new-prefix`)

const currentUrl = page.url()
Expand Down
2 changes: 1 addition & 1 deletion web/crux-ui/e2e/with-login/deployment/deployment.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ test('Can create from deployments page', async ({ page }) => {
await page.locator('button:has-text("Add")').click()
await expect(page.locator('h4:has-text("Add")')).toBeVisible()

await page.locator(`button:has-text("${DAGENT_NODE}")`).click()
await page.locator(`button:has-text("${DAGENT_NODE}")`).first().click()
await page.locator(`button:has-text("${projectName}")`).click()
await page.locator(`button:has-text("${versionName}")`).click()
await fillDeploymentPrefix(page, projectName.toLowerCase())
Expand Down
2 changes: 1 addition & 1 deletion web/crux-ui/e2e/with-login/resource-copy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ test.describe("Deleting copied deployment's parent", () => {
const copyButton = page.locator('button:has-text("Copy")')
await copyButton.click()

await page.locator(`button:has-text("${DAGENT_NODE}")`).click()
await page.locator(`button:has-text("${DAGENT_NODE}")`).first().click()
await fillDeploymentPrefix(page, `${prefix}-other`)

const currentUrl = page.url()
Expand Down

0 comments on commit 88db92e

Please sign in to comment.