Skip to content

Instantly share code, notes, and snippets.

@leblancmeneses
Last active October 16, 2020 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leblancmeneses/15e529d8db66fb6af138a2c2b0a93c8d to your computer and use it in GitHub Desktop.
Save leblancmeneses/15e529d8db66fb6af138a2c2b0a93c8d to your computer and use it in GitHub Desktop.
e2e selenium interview question
import {authenticate} from '../utils/authenticator';
import {DetailView} from '../views/detail_view';
describe('comment behavior', () => {
describe('authenticated', () => {
it('should allow user to comment', async() => {
authenticate('username', 'password');
const detailView = new DetailView();
await detailView.navigateTo();
});
});
describe('not authenticated', () => {
it('should prompt user to signin', async() => {
const detailView = new DetailView();
await detailView.navigateTo();
});
});
});
it('should allow user to comment', async() => {
authenticate('username', 'password');
const detailView = new DetailView();
await detailView.navigateTo();
});
it('should prompt user to signin', async() => {
const detailView = new DetailView();
await detailView.navigateTo();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment