Bug fix follow-up for create project (#5105)
* fix dumb mistake in command flow for #5083 * Add e2e test for creating projects with the default interpolated name * Drop that number to 12 ain't got all day * Why do I have a kcl-samples submodule hanging around? * Empty commit to remove the submodule
This commit is contained in:
		@ -103,7 +103,7 @@ export class HomePageFixture {
 | 
			
		||||
      .toEqual(expectedState)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  createAndGoToProject = async (projectTitle: string) => {
 | 
			
		||||
  createAndGoToProject = async (projectTitle = 'project-$nnn') => {
 | 
			
		||||
    await expect(this.projectSection).not.toHaveText('Loading your Projects...')
 | 
			
		||||
    await this.projectButtonNew.click()
 | 
			
		||||
    await this.projectTextName.click()
 | 
			
		||||
 | 
			
		||||
@ -1088,6 +1088,25 @@ test.describe(`Project management commands`, () => {
 | 
			
		||||
  })
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
test(`Create a few projects using the default project name`, async ({
 | 
			
		||||
  homePage,
 | 
			
		||||
  toolbar,
 | 
			
		||||
}) => {
 | 
			
		||||
  for (let i = 0; i < 12; i++) {
 | 
			
		||||
    await test.step(`Create project ${i}`, async () => {
 | 
			
		||||
      await homePage.expectState({
 | 
			
		||||
        projectCards: Array.from({ length: i }, (_, i) => ({
 | 
			
		||||
          title: `project-${i.toString().padStart(3, '0')}`,
 | 
			
		||||
          fileCount: 1,
 | 
			
		||||
        })).toReversed(),
 | 
			
		||||
        sortBy: 'last-modified-desc',
 | 
			
		||||
      })
 | 
			
		||||
      await homePage.createAndGoToProject()
 | 
			
		||||
      await toolbar.logoLink.click()
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
test(
 | 
			
		||||
  'File in the file pane should open with a single click',
 | 
			
		||||
  { tag: '@electron' },
 | 
			
		||||
 | 
			
		||||
@ -201,7 +201,7 @@ const ProjectsContextDesktop = ({
 | 
			
		||||
 | 
			
		||||
          return {
 | 
			
		||||
            message: `Successfully created "${uniqueName}"`,
 | 
			
		||||
            name,
 | 
			
		||||
            name: uniqueName,
 | 
			
		||||
          }
 | 
			
		||||
        }),
 | 
			
		||||
        renameProject: fromPromise(async ({ input }) => {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user