diff --git a/server-ce/test/admin.spec.ts b/server-ce/test/admin.spec.ts index 8020deeb4b..9031e21b68 100644 --- a/server-ce/test/admin.spec.ts +++ b/server-ce/test/admin.spec.ts @@ -294,7 +294,7 @@ describe('admin panel', function () { cy.log('navigate to thrashed projects and delete the project') cy.get('.project-list-sidebar-scroll').within(() => { - cy.findByText('Trashed Projects').click() + cy.findByText('Trashed projects').click() }) findProjectRow(deletedProjectName).within(() => cy.findByRole('button', { name: 'Delete' }).click() @@ -319,7 +319,7 @@ describe('admin panel', function () { login(user1) cy.visit('/project') cy.get('.project-list-sidebar-scroll').within(() => { - cy.findByText('Trashed Projects').click() + cy.findByText('Trashed projects').click() }) cy.findByText(`${deletedProjectName} (Restored)`) }) diff --git a/server-ce/test/create-and-compile-project.spec.ts b/server-ce/test/create-and-compile-project.spec.ts index 2be4f208e2..959a3be107 100644 --- a/server-ce/test/create-and-compile-project.spec.ts +++ b/server-ce/test/create-and-compile-project.spec.ts @@ -51,7 +51,7 @@ describe('Project creation and compilation', function () { login('user@example.com') createProject(sourceProjectName, { - type: 'Example Project', + type: 'Example project', open: false, }).as('sourceProjectId') createProject(targetProjectName) @@ -79,7 +79,7 @@ describe('Project creation and compilation', function () { const targetProjectName = `${sourceProjectName}-target` login('user@example.com') createProject(sourceProjectName, { - type: 'Example Project', + type: 'Example project', open: false, }).as('sourceProjectId') createProject(targetProjectName).as('targetProjectId') diff --git a/server-ce/test/editor.spec.ts b/server-ce/test/editor.spec.ts index 62eeeda26b..7a34f26573 100644 --- a/server-ce/test/editor.spec.ts +++ b/server-ce/test/editor.spec.ts @@ -22,7 +22,7 @@ describe('editor', () => { beforeWithReRunOnTestRetry(function () { projectName = `project-${uuid()}` login('user@example.com') - createProject(projectName, { type: 'Example Project', open: false }).then( + createProject(projectName, { type: 'Example project', open: false }).then( id => (projectId = id) ) ;({ recompile, waitForCompileRateLimitCoolOff } = @@ -62,7 +62,7 @@ describe('editor', () => { cy.log('add word to dictionary') cy.get('.ol-cm-spelling-error').contains(word).rightclick() - cy.findByText('Add to Dictionary').click() + cy.findByText('Add to dictionary').click() cy.get('.ol-cm-spelling-error').should('not.exist') cy.log('remove word from dictionary') diff --git a/server-ce/test/git-bridge.spec.ts b/server-ce/test/git-bridge.spec.ts index 67a09b3409..447f28bfd2 100644 --- a/server-ce/test/git-bridge.spec.ts +++ b/server-ce/test/git-bridge.spec.ts @@ -46,7 +46,7 @@ describe('git-bridge', function () { function maybeClearAllTokens() { cy.visit('/user/settings') - cy.findByText('Git Integration') + cy.findByText('Git integration') cy.get('button') .contains(/Generate token|Add another token/) .then(btn => { @@ -63,7 +63,7 @@ describe('git-bridge', function () { it('should render the git-bridge UI in the settings', () => { maybeClearAllTokens() cy.visit('/user/settings') - cy.findByText('Git Integration') + cy.findByText('Git integration') cy.get('button').contains('Generate token').click() cy.get('code') .contains(/olp_[a-zA-Z0-9]{16}/) @@ -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/) + cy.findByText(/generate a new one in Account settings/i) cy.findByText('Go to settings') .should('have.attr', 'target', '_blank') .and('have.attr', 'href', '/user/settings') @@ -365,7 +365,7 @@ Hello world it('should not render the git-bridge UI in the settings', () => { login('user@example.com') cy.visit('/user/settings') - cy.findByText('Git Integration').should('not.exist') + cy.findByText('Git integration').should('not.exist') }) it('should not render the git-bridge UI in the editor', function () { login('user@example.com') diff --git a/server-ce/test/helpers/project.ts b/server-ce/test/helpers/project.ts index 6a2cd74e4a..8fb6aa2404 100644 --- a/server-ce/test/helpers/project.ts +++ b/server-ce/test/helpers/project.ts @@ -5,11 +5,11 @@ import { v4 as uuid } from 'uuid' export function createProject( name: string, { - type = 'Blank Project', + type = 'Blank project', newProjectButtonMatcher = /new project/i, open = true, }: { - type?: 'Blank Project' | 'Example Project' + type?: 'Blank project' | 'Example project' newProjectButtonMatcher?: RegExp open?: boolean } = {} @@ -37,7 +37,7 @@ export function createProject( } cy.findAllByRole('button').contains(newProjectButtonMatcher).click() // FIXME: This should only look in the left menu - cy.findAllByText(type).first().click() + cy.findAllByText(new RegExp(type, 'i')).first().click() cy.findByRole('dialog').within(() => { cy.get('input').type(name) cy.findByText('Create').click() diff --git a/server-ce/test/project-list.spec.ts b/server-ce/test/project-list.spec.ts index 3056242a0f..6b038f320c 100644 --- a/server-ce/test/project-list.spec.ts +++ b/server-ce/test/project-list.spec.ts @@ -32,7 +32,7 @@ describe('Project List', () => { before(() => { login(REGULAR_USER) - createProject(projectName, { type: 'Example Project', open: false }) + createProject(projectName, { type: 'Example project', open: false }) }) beforeEach(function () { login(REGULAR_USER)