example.e2e.js 503 B

123456789101112131415
  1. const LoginPage = require('../pageobjects/login.page');
  2. const SecurePage = require('../pageobjects/secure.page');
  3. describe('My Login application', () => {
  4. it('should login with valid credentials', async () => {
  5. await LoginPage.open();
  6. await LoginPage.login('tomsmith', 'SuperSecretPassword!');
  7. await expect(SecurePage.flashAlert).toBeExisting();
  8. await expect(SecurePage.flashAlert).toHaveTextContaining(
  9. 'You logged into a secure area!');
  10. });
  11. });