Коммит fe5da23b создал по автору sarahghp's avatar sarahghp
Просмотр файлов

Add initial test

владелец 29990e5a
......@@ -3,11 +3,28 @@
describe 'Toolbar', :js do
describe 'injected toolbar' do
add_script = %q(
const scriptEl = document.createElement('script');
scriptEl.setAttribute('src', 'https://host-island.sarahghp.now.sh/review-toolbar.js');
scriptEl.setAttribute('data-project' , '11790219');
scriptEl.setAttribute('data-discussion' , '1');
scriptEl.setAttribute('data-name' , 'ReviewAppToolbar');
scriptEl.setAttribute('data-mr-url' , 'https://gitlab.com');
document.head.appendChild(scriptEl);
)
load_script = %q(
const newLoad = new Event('load');
window.dispatchEvent(newLoad);
)
it 'loads the login screen' do
visit root_path
find('body')
evaluate_script("document.body.innerHTML = 'hi winnie and sarah, but for real'")
live_debug
evaluate_script(add_script)
evaluate_script(load_script)
expect(find('#gitlab-review-container')).to exist
end
end
end
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать