Skip to content
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

Global e2e tests refactoring and improvement #283

Merged
merged 3 commits into from
Jul 20, 2017
Merged

Global e2e tests refactoring and improvement #283

merged 3 commits into from
Jul 20, 2017

Conversation

avozicov
Copy link
Contributor

  • Implemented POMs for:
    • api-page
    • contact-page
    • demo-modal
    • footer
    • header
    • home-page
    • quick-links
    • social-links
  • Refactored all tests scripts to use page objects described in "pages" directory
  • Added new script for "Social Links" validation
  • Added new script for "API page" content assert
  • Fixed const names to provide more context of selectors and actions

const apiPage = new ApiPage();

fixture`Check valid content is displayed on "API" page`
.page`https://www-stage.adtechmedia.io/api/`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use base host (e.g. https://www-stage.adtechmedia.io) from a config.js like this: config.www_base_host

// config.js

export default {
  www_base_host: process.env.WWW_BASE_HOST || 'https://www-test.adtechmedia.io',
}

You can run tests like WWW_BASE_HOST='https://www-stage.adtechmedia.io' recink run e2e

Copy link
Contributor Author

@avozicov avozicov Jul 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got it, thank you.

Latest status: Fixed


test('Check "Mitoc Group" link is displayed on the page footer', async t => {
await t
.resizeWindow(1920, 1080)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try setting default window size from config (see nighmare docs)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got it, thank you.

Latest status: Fixed

.typeText(requestDemoPage.demoFormEmailField, '[email protected]')
.typeText(requestDemoPage.demoFormNamelField, 'Test User')
.click(requestDemoPage.demoFormSubmitButton, { speed: 0.5 });
.typeText(requestDemoForm.demoFormEmailField, '[email protected]')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use http://chancejs.com library for generating random test data

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got it, thank you.

Latest status: Fixed

selectorTimeout: 5000,
visibilityCheck: true,
}).visible).ok()
.expect(Selector(requestDemoPage.demoFormResponseText).innerText).eql('\nThank you for the interest in AdTechMedia WordPress Plugin\nPlease check your inbox to schedule your demo.\n');
.expect(Selector(requestDemoForm.demoFormResponseText).innerText).eql('\nThank you for the interest in AdTechMedia WordPress Plugin\nPlease check your inbox to schedule your demo.\n');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use .contains instead of . eql to avoid spaces matching

Copy link
Contributor Author

@avozicov avozicov Jul 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got it, thank you.

Latest status: Fixed

@AlexanderC
Copy link
Contributor

Please update recink.yml from project root to use the tests and dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants