ソースを参照

[web] Fix zip name in e2e tests (#26888)

GitOrigin-RevId: d0efd0f09af04ea5039d0f5335f8d1a776dcf3a3
Mathias Jakobsen 1 年間 前
コミット
2cacf8f645
2 ファイル変更4 行追加2 行削除
  1. 2 1
      server-ce/test/editor.spec.ts
  2. 2 1
      server-ce/test/project-list.spec.ts

+ 2 - 1
server-ce/test/editor.spec.ts

@@ -147,8 +147,9 @@ describe('editor', () => {
 
     it('can download project sources', () => {
       cy.get('a').contains('Source').click()
+      const zipName = projectName.replaceAll('-', '_')
       cy.task('readFileInZip', {
-        pathToZip: `cypress/downloads/${projectName}.zip`,
+        pathToZip: `cypress/downloads/${zipName}.zip`,
         fileToRead: 'main.tex',
       }).should('contain', 'Your introduction goes here')
     })

+ 2 - 1
server-ce/test/project-list.spec.ts

@@ -44,8 +44,9 @@ describe('Project List', () => {
         cy.findByRole('button', { name: 'Download .zip file' }).click()
       )
 
+      const zipName = projectName.replaceAll('-', '_')
       cy.task('readFileInZip', {
-        pathToZip: `cypress/downloads/${projectName}.zip`,
+        pathToZip: `cypress/downloads/${zipName}.zip`,
         fileToRead: 'main.tex',
       }).should('contain', 'Your introduction goes here')
     })