Update share modal dropdown with a description for reviewers in a free project (#24571)
* Update collaborator select dropdown with a description for reviewers in free project * Update share-project-modal test * Fix saas-e2e tests * fix server pro tests * fix cypress multiple inputs selection * fix testid case GitOrigin-RevId: 5369828334596d80988aba168385f0a51eea998f
This commit is contained in:
committed by
Copybot
parent
830d0daa38
commit
f36c87b301
@@ -95,7 +95,9 @@ describe('Project creation and compilation', function () {
|
||||
|
||||
cy.findByText('Share').click()
|
||||
cy.findByRole('dialog').within(() => {
|
||||
cy.get('input').type('collaborator@example.com,')
|
||||
cy.findByTestId('collaborator-email-input').type(
|
||||
'collaborator@example.com,'
|
||||
)
|
||||
cy.findByText('Invite').click({ force: true })
|
||||
cy.findByText('Invite not yet accepted.')
|
||||
})
|
||||
|
||||
@@ -136,7 +136,7 @@ describe('git-bridge', function () {
|
||||
shareProjectByEmailAndAcceptInviteViaDash(
|
||||
projectName,
|
||||
'collaborator-rw@example.com',
|
||||
'Can edit'
|
||||
'Editor'
|
||||
)
|
||||
maybeClearAllTokens()
|
||||
openProjectByName(projectName)
|
||||
@@ -147,7 +147,7 @@ describe('git-bridge', function () {
|
||||
shareProjectByEmailAndAcceptInviteViaDash(
|
||||
projectName,
|
||||
'collaborator-ro@example.com',
|
||||
'Can view'
|
||||
'Viewer'
|
||||
)
|
||||
maybeClearAllTokens()
|
||||
openProjectByName(projectName)
|
||||
|
||||
@@ -100,7 +100,7 @@ export function openProjectViaInviteNotification(projectName: string) {
|
||||
function shareProjectByEmail(
|
||||
projectName: string,
|
||||
email: string,
|
||||
level: 'Can view' | 'Can edit'
|
||||
level: 'Viewer' | 'Editor'
|
||||
) {
|
||||
openProjectByName(projectName)
|
||||
cy.findByText('Share').click()
|
||||
@@ -108,7 +108,13 @@ function shareProjectByEmail(
|
||||
cy.findByLabelText('Add people', { selector: 'input' }).type(`${email},`)
|
||||
cy.findByLabelText('Add people', { selector: 'input' })
|
||||
.parents('form')
|
||||
.within(() => cy.findByText('Can edit').parent().select(level))
|
||||
.within(() => {
|
||||
cy.findByTestId('add-collaborator-select')
|
||||
.click()
|
||||
.then(() => {
|
||||
cy.findByText(level).click()
|
||||
})
|
||||
})
|
||||
cy.findByText('Invite').click({ force: true })
|
||||
cy.findByText('Invite not yet accepted.')
|
||||
})
|
||||
@@ -117,7 +123,7 @@ function shareProjectByEmail(
|
||||
export function shareProjectByEmailAndAcceptInviteViaDash(
|
||||
projectName: string,
|
||||
email: string,
|
||||
level: 'Can view' | 'Can edit'
|
||||
level: 'Viewer' | 'Editor'
|
||||
) {
|
||||
shareProjectByEmail(projectName, email, level)
|
||||
|
||||
@@ -128,7 +134,7 @@ export function shareProjectByEmailAndAcceptInviteViaDash(
|
||||
export function shareProjectByEmailAndAcceptInviteViaEmail(
|
||||
projectName: string,
|
||||
email: string,
|
||||
level: 'Can view' | 'Can edit'
|
||||
level: 'Viewer' | 'Editor'
|
||||
) {
|
||||
shareProjectByEmail(projectName, email, level)
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ describe('Project Sharing', function () {
|
||||
|
||||
beforeEach(function () {
|
||||
login('user@example.com')
|
||||
shareProjectByEmailAndAcceptInviteViaEmail(projectName, email, 'Can view')
|
||||
shareProjectByEmailAndAcceptInviteViaEmail(projectName, email, 'Viewer')
|
||||
})
|
||||
|
||||
it('should grant the collaborator read access', () => {
|
||||
@@ -169,7 +169,7 @@ describe('Project Sharing', function () {
|
||||
|
||||
beforeWithReRunOnTestRetry(function () {
|
||||
login('user@example.com')
|
||||
shareProjectByEmailAndAcceptInviteViaDash(projectName, email, 'Can view')
|
||||
shareProjectByEmailAndAcceptInviteViaDash(projectName, email, 'Viewer')
|
||||
})
|
||||
|
||||
it('should grant the collaborator read access', () => {
|
||||
@@ -186,7 +186,7 @@ describe('Project Sharing', function () {
|
||||
|
||||
beforeWithReRunOnTestRetry(function () {
|
||||
login('user@example.com')
|
||||
shareProjectByEmailAndAcceptInviteViaDash(projectName, email, 'Can edit')
|
||||
shareProjectByEmailAndAcceptInviteViaDash(projectName, email, 'Editor')
|
||||
})
|
||||
|
||||
it('should grant the collaborator write access', () => {
|
||||
|
||||
Reference in New Issue
Block a user