Skip to content

Instantly share code, notes, and snippets.

@kcmr
Created June 17, 2018 21:20
Show Gist options
  • Save kcmr/b4cef808968c239396b7e1b2982d45d4 to your computer and use it in GitHub Desktop.
Save kcmr/b4cef808968c239396b7e1b2982d45d4 to your computer and use it in GitHub Desktop.
suite('<my-modal>', () => {
suite('setting "opened" as true', () => {
// fixture instancia el componente
const sut = fixture('someId');
// Se ejecuta una vez antes de todos los tests de este bloque
suiteSetup(() => {
sut.opened = true;
});
test('opens the modal', () => {
assert.isTrue(isVisible(sut));
});
test('sets "aria-hidden" attribute to false', () => {
assert.equal(sut.getAttribute('aria-hidden'), 'false');
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment