Revert case-insensitivity in e2e tests (#25828)

* Revert case-insensitivity in e2e tests

* Use `{ exact: false }` to filter createProject type

* Update server-ce/test/helpers/project.ts

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: b8b2f8439a55e9527358b13d9292779dc3509e9d
This commit is contained in:
Antoine Clausse
2025-05-27 10:03:06 +02:00
committed by Copybot
parent 2ce9b399cb
commit 02edb433f2
2 changed files with 3 additions and 2 deletions

View File

@@ -107,7 +107,7 @@ describe('git-bridge', function () {
cy.get('code').contains(`git clone ${gitURL(id.toString())}`)
})
cy.findByText('Generate token').should('not.exist')
cy.findByText(/generate a new one in Account settings/i)
cy.findByText(/generate a new one in Account settings/)
cy.findByText('Go to settings')
.should('have.attr', 'target', '_blank')
.and('have.attr', 'href', '/user/settings')

View File

@@ -37,7 +37,8 @@ export function createProject(
}
cy.findAllByRole('button').contains(newProjectButtonMatcher).click()
// FIXME: This should only look in the left menu
cy.findAllByText(new RegExp(type, 'i')).first().click()
// The upgrading tests create projects in older versions of Server Pro which used different casing of the project type. Use case-insensitive match.
cy.findAllByText(type, { exact: false }).first().click()
cy.findByRole('dialog').within(() => {
cy.get('input').type(name)
cy.findByText('Create').click()