|
@@ -205,6 +205,9 @@ describe('<ReviewPanel />', function () {
|
|
|
</TestContainer>
|
|
</TestContainer>
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+ // Wait for the editor to be ready before interacting with it
|
|
|
|
|
+ cy.get('.cm-content').should('have.css', 'opacity', '1')
|
|
|
|
|
+
|
|
|
// Open the review panel with keyboard shortcut
|
|
// Open the review panel with keyboard shortcut
|
|
|
cy.findByText('contentLine 0').type('{command}j', { scrollBehavior: false })
|
|
cy.findByText('contentLine 0').type('{command}j', { scrollBehavior: false })
|
|
|
cy.findByText('contentLine 1').type('{ctrl}j', { scrollBehavior: false })
|
|
cy.findByText('contentLine 1').type('{ctrl}j', { scrollBehavior: false })
|
|
@@ -726,7 +729,7 @@ describe('<ReviewPanel /> in mini mode', function () {
|
|
|
},
|
|
},
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
- cy.intercept('GET', '/project/*/threads', threads)
|
|
|
|
|
|
|
+ cy.intercept('GET', '/project/*/threads', threads).as('loadThreads')
|
|
|
|
|
|
|
|
cy.intercept('POST', `/project/*/doc/${docId}/metadata`, {})
|
|
cy.intercept('POST', `/project/*/doc/${docId}/metadata`, {})
|
|
|
|
|
|
|
@@ -745,6 +748,10 @@ describe('<ReviewPanel /> in mini mode', function () {
|
|
|
// Wait for editor
|
|
// Wait for editor
|
|
|
cy.get('.cm-content').should('have.css', 'opacity', '1')
|
|
cy.get('.cm-content').should('have.css', 'opacity', '1')
|
|
|
|
|
|
|
|
|
|
+ // Wait for the threads to load, since mini mode renders conditionally on
|
|
|
|
|
+ // the threads/ranges data being present
|
|
|
|
|
+ cy.wait('@loadThreads')
|
|
|
|
|
+
|
|
|
// Toggle the review panel twice to ensure data is loaded
|
|
// Toggle the review panel twice to ensure data is loaded
|
|
|
cy.findByText('contentLine 0').type('{command}jj', {
|
|
cy.findByText('contentLine 0').type('{command}jj', {
|
|
|
scrollBehavior: false,
|
|
scrollBehavior: false,
|
|
@@ -882,6 +889,9 @@ describe('<ReviewPanel /> for free users', function () {
|
|
|
</TestContainer>
|
|
</TestContainer>
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+ // Wait for the editor to be ready before interacting with it
|
|
|
|
|
+ cy.get('.cm-content').should('have.css', 'opacity', '1')
|
|
|
|
|
+
|
|
|
cy.findByLabelText('Editing').click()
|
|
cy.findByLabelText('Editing').click()
|
|
|
cy.findByRole('menu').within(() => {
|
|
cy.findByRole('menu').within(() => {
|
|
|
cy.findByText(/Reviewing/).click()
|
|
cy.findByText(/Reviewing/).click()
|