فهرست منبع

[web] update e2e tests to look for new strings (#23425)

GitOrigin-RevId: 62c513369adcd003db0aac6a3777eb0a98bf3289
Kristina 1 سال پیش
والد
کامیت
ac15073a52

+ 1 - 1
server-ce/test/create-and-compile-project.spec.ts

@@ -101,7 +101,7 @@ describe('Project creation and compilation', function () {
     cy.findByText('Share').click()
     cy.findByRole('dialog').within(() => {
       cy.get('input').type('collaborator@example.com,')
-      cy.findByText('Share').click({ force: true })
+      cy.findByText('Invite').click({ force: true })
     })
 
     cy.visit('/project')

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

@@ -86,7 +86,7 @@ describe('editor', () => {
               const linkSharingReadAndWrite = el.text()
               login('collaborator@example.com')
               cy.visit(linkSharingReadAndWrite)
-              cy.get('button').contains('Join Project').click()
+              cy.get('button').contains('OK, join project').click()
               cy.log(
                 'navigate to project dashboard to avoid cross session requests from editor'
               )

+ 3 - 3
server-ce/test/git-bridge.spec.ts

@@ -148,7 +148,7 @@ describe('git-bridge', function () {
         shareProjectByEmailAndAcceptInviteViaDash(
           projectName,
           'collaborator-ro@example.com',
-          'Read only'
+          'Can view'
         )
         maybeClearAllTokens()
         cy.visit('/project')
@@ -162,7 +162,7 @@ describe('git-bridge', function () {
           maybeClearAllTokens()
           cy.visit(linkSharingReadAndWrite)
           cy.findByText(projectName) // wait for lazy loading
-          cy.findByText('Join Project').click()
+          cy.findByText('OK, join project').click()
           checkGitAccess('readAndWrite')
         })
       })
@@ -173,7 +173,7 @@ describe('git-bridge', function () {
           maybeClearAllTokens()
           cy.visit(linkSharingReadOnly)
           cy.findByText(projectName) // wait for lazy loading
-          cy.findByText('Join Project').click()
+          cy.findByText('OK, join project').click()
           checkGitAccess('readOnly')
         })
       })

+ 4 - 4
server-ce/test/helpers/project.ts

@@ -27,7 +27,7 @@ export function createProject(
 function shareProjectByEmail(
   projectName: string,
   email: string,
-  level: 'Read only' | 'Can edit'
+  level: 'Can view' | 'Can edit'
 ) {
   cy.visit('/project')
   cy.findByText(projectName).click()
@@ -37,14 +37,14 @@ function shareProjectByEmail(
     cy.get('input')
       .parents('form')
       .within(() => cy.findByText('Can edit').parent().select(level))
-    cy.findByText('Share').click({ force: true })
+    cy.findByText('Invite').click({ force: true })
   })
 }
 
 export function shareProjectByEmailAndAcceptInviteViaDash(
   projectName: string,
   email: string,
-  level: 'Read only' | 'Can edit'
+  level: 'Can view' | 'Can edit'
 ) {
   shareProjectByEmail(projectName, email, level)
 
@@ -61,7 +61,7 @@ export function shareProjectByEmailAndAcceptInviteViaDash(
 export function shareProjectByEmailAndAcceptInviteViaEmail(
   projectName: string,
   email: string,
-  level: 'Read only' | 'Can edit'
+  level: 'Can view' | 'Can edit'
 ) {
   shareProjectByEmail(projectName, email, level)
 

+ 4 - 8
server-ce/test/project-sharing.spec.ts

@@ -152,11 +152,7 @@ describe('Project Sharing', function () {
 
     beforeEach(function () {
       login('user@example.com')
-      shareProjectByEmailAndAcceptInviteViaEmail(
-        projectName,
-        email,
-        'Read only'
-      )
+      shareProjectByEmailAndAcceptInviteViaEmail(projectName, email, 'Can view')
     })
 
     it('should grant the collaborator read access', () => {
@@ -173,7 +169,7 @@ describe('Project Sharing', function () {
 
     beforeWithReRunOnTestRetry(function () {
       login('user@example.com')
-      shareProjectByEmailAndAcceptInviteViaDash(projectName, email, 'Read only')
+      shareProjectByEmailAndAcceptInviteViaDash(projectName, email, 'Can view')
     })
 
     it('should grant the collaborator read access', () => {
@@ -214,7 +210,7 @@ describe('Project Sharing', function () {
           login(email)
           cy.visit(linkSharingReadOnly)
           cy.findByText(projectName) // wait for lazy loading
-          cy.findByText('Join Project').click()
+          cy.findByText('OK, join project').click()
           expectRestrictedReadOnlyAccess()
           expectProjectDashboardEntry()
         })
@@ -228,7 +224,7 @@ describe('Project Sharing', function () {
           login(email)
           cy.visit(linkSharingReadAndWrite)
           cy.findByText(projectName) // wait for lazy loading
-          cy.findByText('Join Project').click()
+          cy.findByText('OK, join project').click()
           expectReadAndWriteAccess()
           expectEditAuthoredAs('You')
           expectProjectDashboardEntry()