Skip to content

Commit b450f53

Browse files
committed
Ensure tweet panel open prior to assertion.
1 parent 625c60e commit b450f53

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

tests/cypress/e2e/block-editor.test.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('Test Autopost for X with Block Editor.', () => {
4242

4343
// Open pre-publish Panel.
4444
cy.openPrePublishPanel();
45-
45+
4646
// Check enable checkbox for auto-share.
4747
cy.enableCheckbox('.autoshare-for-twitter-toggle-control input:checkbox', defaultBehavior, false);
4848

@@ -162,20 +162,20 @@ describe('Test Autopost for X with Block Editor.', () => {
162162
it('Tweet Now should work fine', () => {
163163
// Start create new post by enter post title
164164
cy.startCreatePost();
165-
165+
166166
// Open pre-publish Panel.
167167
cy.openPrePublishPanel();
168-
168+
169169
// Check enable checkbox for auto-share.
170170
cy.enableCheckbox('.autoshare-for-twitter-toggle-control input:checkbox', defaultBehavior, false);
171-
171+
172172
// Publish
173173
cy.publishPost();
174-
174+
175175
// Post-publish.
176176
cy.get('.autoshare-for-twitter-post-status').should('be.visible');
177177
cy.get('.autoshare-for-twitter-post-status').contains('This post has not been posted to X/Twitter.');
178-
178+
179179
cy.get('.editor-post-publish-panel button[aria-label="Close panel"]').click();
180180
cy.openAutoTweetPanel();
181181
cy.get('.autoshare-for-twitter-editor-panel button.autoshare-for-twitter-tweet-now').click();
@@ -202,6 +202,7 @@ describe('Test Autopost for X with Block Editor.', () => {
202202

203203
// Verify custom tweet message.
204204
cy.reload();
205+
cy.openAutoTweetPanel();
205206
cy.get('.autoshare-for-twitter-tweet-text textarea').should('have.value', customTweetBody);
206207

207208
// Open pre-publish Panel.

0 commit comments

Comments
 (0)