-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update/tests #324
Update/tests #324
Conversation
combine test sections and cli commands and enable test isolation lint cleanup
combine tests and implement testIsolation option lint cleanup
* trunk: Verifying Id instead of text remove unused variable change in before block syntax chnages Codes are added to check after continue with store setup click Added cy.reload to see if help-center option shows up Removed unnecessary codes Changes on Help-Center code Added Site capabilities code timeout increased for 15seconds Written separate it blocks for update name server, connect domain and continue with store setup Post Migration scripts
* trunk: (51 commits) Ecommerce version bump 1.3.32 load ecomdash only for ecommerce plus bug fix press0-1375 Remove unused thumbnail service code fix : screen size view fix code reviews PRESS0-1430 round 2 fixes Added .mo file PRESS0-1429, PRESS0-1430 PRESS0-1429, PRESS0-1430 PRESS0-1427 fix PRESS0-1397 PRESS0-1267 PRESS0-1267 PRESS0-1267 undo incorrect condition check code change for testing PRESS0-1396 auto redirect wondercart on install fix ecomdash PRESS0-1394 ... # Conflicts: # src/components/WooCommerceUnavailable.js
* trunk: ecommerce version bump 1.3.33 skip one failing test, bug raised for same try with old locators linting fix deactivate woo in previous steps deactivate woo and enabled homewithwoo tests skip woo tests and correct migration tests remove skip skip to check if next specs passes remove skip for now test skipping test PRESS0-1497 | Fix failures in plugin workflow # Conflicts: # tests/cypress/integration/Home/migration.cy.js # tests/cypress/integration/Site-Capabilities/siteCapabilities.cy.js # tests/cypress/integration/Store/storePage.cy.js
…traneous cli command
for some reason the runner stalls out on the install and the site is stuck, verify the plugin is installed via cli command instead
These are now finally passing tests. I converted all but one of the tests to use Friendly reminder that new features should have new tests and PRs shouldn't be merged unless tests pass. We certainly should not release a module with failing tests because that cascades to every other module and plugin displaying failing tests. |
beforeEach( () => { | ||
cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/home' ); | ||
} ); | ||
before( () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HG run has a syntax error, please fix it @circlecube
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks for pointing it out.
|
||
export const wpLogin = () => { | ||
cy.login( Cypress.env( 'wpUsername' ), Cypress.env( 'wpPassword' ) ); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a line break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, thanks for the callout. This is updated.
Proposed changes
This updates the tests that have been failing. It should speed them up as well.
I've implemented the
testIsolation
flag so each test is expected to be more independent, and combined tests that were not independent to run in the sameit
. (We are working through all tests to use this recommended setting so I went ahead and added while I was working on these.)I combined some cli commands too so they should run faster. These were eating up a lot of time running on and before each test step and many were repeated so I was able to combine test steps and cli commands.
I also started adding some data testid attributes to elements which can be used once they are included in the build, I didn't switch to those yet though they are commented out for selecting the nowoo-store-title and description, they should be a faster and clearer way to select elements on the page.
This also includes some lint fixes my IDE changed, I hope it doesn't make review confusing.
Type of Change
Checklist
Further comments