Skip to content

Commit 606b20a

Browse files
committed
PB-2064: fix report problem cypress test
1 parent 22a206d commit 606b20a

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

packages/viewer/tests/cypress/tests-e2e/reportProblem.cy.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -326,26 +326,19 @@ describe('Testing the report problem form', () => {
326326
cy.log('Select category')
327327
cy.get('[data-cy="report-problem-category"] [data-cy="dropdown-main-button"]')
328328
.as('categoryDropdown')
329-
.scrollIntoView()
330-
cy.get('@categoryDropdown').should('be.visible')
331329
cy.get('@categoryDropdown').click()
332-
cy.get('[data-cy="dropdown-item-other"]:visible').click()
330+
cy.get('[data-cy="dropdown-item-other"]').click()
333331

334332
cy.log('Write description and email')
335333
cy.get('[data-cy="report-problem-text-area"] [data-cy="text-area-input"]')
336334
.as('textArea')
337-
.scrollIntoView()
338-
cy.get('@textArea').should('be.visible')
339335
cy.get('@textArea').type(text)
340336

341337
cy.get('[data-cy="report-problem-email"] [data-cy="email-input"]')
342338
.as('emailInput')
343-
.scrollIntoView()
344-
cy.get('@emailInput').should('be.visible')
345339
cy.get('@emailInput').type(validEmail)
346340

347-
cy.get('@emailInput').should('be.visible').should('have.value', validEmail)
348-
cy.get('[data-cy="report-problem-drawing-added-feedback"]').scrollIntoView()
341+
cy.get('@emailInput').should('have.value', validEmail)
349342
cy.get('[data-cy="report-problem-drawing-added-feedback"]')
350343
.should('be.visible')
351344
.should('have.class', 'valid-feedback')
@@ -358,16 +351,13 @@ describe('Testing the report problem form', () => {
358351
cy.get('[data-cy="drawing-header-close-button"]:visible').click()
359352
cy.viewport('iphone-3')
360353

361-
cy.get('@categoryDropdown').scrollIntoView()
362-
cy.get('@categoryDropdown').should('be.visible')
354+
cy.get('@categoryDropdown').should('exist')
363355
cy.get('[data-cy="drawing-header-title"]').should('not.exist')
364356
cy.get('@textArea').should('have.value', text)
365357
cy.get('@emailInput').should('have.value', validEmail)
366358
cy.get('[data-cy="report-problem-drawing-added-feedback"]').should('not.be.visible')
367359

368360
cy.log('Draw some more features')
369-
cy.get('@reportDrawing').scrollIntoView()
370-
cy.get('@reportDrawing').should('be.visible')
371361
cy.get('@reportDrawing').click()
372362
cy.clickDrawingTool(EditableFeatureTypes.Marker)
373363
cy.get('[data-cy="ol-map"]').click()
@@ -393,12 +383,10 @@ describe('Testing the report problem form', () => {
393383
})
394384

395385
cy.get('[data-cy="drawing-toolbox-close-button"]').should('be.visible').click()
396-
cy.get('@categoryDropdown').scrollIntoView()
397386
cy.get('@reportForm').should('exist')
398387
cy.get('[data-cy="drawing-header-title"]').should('not.exist')
399388
cy.get('@textArea').should('have.value', text)
400389
cy.get('@emailInput').should('have.value', validEmail)
401-
cy.get('[data-cy="report-problem-drawing-added-feedback"]').scrollIntoView()
402390
cy.get('[data-cy="report-problem-drawing-added-feedback"]')
403391
.as('reportDrawingFeedback')
404392
.should('be.visible')

0 commit comments

Comments
 (0)