Skip to content

Commit

Permalink
Remove increased default timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Aug 31, 2023
1 parent ff3ab67 commit d50d6a7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
1 change: 0 additions & 1 deletion tests/cypress/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = defineConfig({
runMode: 2,
openMode: 0
},
defaultCommandTimeout: 10000,
reporter: 'mochawesome',
reporterOptions: {
mochaFile: "mochawesome-[name]",
Expand Down
28 changes: 16 additions & 12 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,24 @@ Cypress.Commands.add(

if (true === check) {
cy.get(checkboxSelector).first().check({ force: true });
cy.wait(1000);
if (checkboxSelector === '#autoshare-for-twitter-enable') {
cy.get('#publish').should('not.be.disabled');
} else {
cy.get('button.editor-post-publish-button').should(
'not.be.disabled'
);
cy.get(
'.editor-post-publish-panel__header-publish-button button.editor-post-publish-button'
).should('not.be.disabled');
}
cy.get(checkboxSelector).first().should('be.checked');
} else {
cy.get(checkboxSelector).first().uncheck({ force: true });
cy.wait(1000);
if (checkboxSelector === '#autoshare-for-twitter-enable') {
cy.get('#publish').should('not.be.disabled');
} else {
cy.get('button.editor-post-publish-button').should(
'not.be.disabled'
);
cy.get(
'.editor-post-publish-panel__header-publish-button button.editor-post-publish-button'
).should('not.be.disabled');
}
cy.get(checkboxSelector).first().should('not.be.checked');
}
Expand Down Expand Up @@ -137,22 +139,24 @@ Cypress.Commands.add('enableTweetAccount', (selector, check = true) => {
checkbox.should('exist');
if (true === check) {
checkbox.check({ force: true });
cy.wait(1000);
if (selector === 'input.autoshare-for-twitter-account-checkbox') {
cy.get('#publish').should('not.be.disabled');
} else {
cy.get('button.editor-post-publish-button').should(
'not.be.disabled'
);
cy.get(
'.editor-post-publish-panel__header-publish-button button.editor-post-publish-button'
).should('not.be.disabled');
}
cy.get(selector).first().should('be.checked');
} else {
checkbox.uncheck({ force: true });
cy.wait(1000);
if (selector === 'input.autoshare-for-twitter-account-checkbox') {
cy.get('#publish').should('not.be.disabled');
} else {
cy.get('button.editor-post-publish-button').should(
'not.be.disabled'
);
cy.get(
'.editor-post-publish-panel__header-publish-button button.editor-post-publish-button'
).should('not.be.disabled');
}
cy.get(selector).first().should('not.be.checked');
}
Expand Down

0 comments on commit d50d6a7

Please sign in to comment.