Commit a9618849 authored by Bryce Johnson's avatar Bryce Johnson

Use a fixture to force phantom to emit click event.

parent e7fa794c
Pipeline #8102071 passed with stages
in 70 minutes and 38 seconds
......@@ -3,11 +3,6 @@ import IntervalPatternInput from '~/pipeline_schedules/components/interval_patte
const IntervalPatternInputComponent = Vue.extend(IntervalPatternInput);
const inputNameAttribute = 'schedule[cron]';
const dataDefaults = {
inputNameAttribute,
cronSyntaxUrl: 'https://en.wikipedia.org/wiki/Cron',
customInputEnabled: false,
};
const cronIntervalPresets = {
everyDay: '0 4 * * *',
......@@ -142,12 +137,17 @@ describe('Interval Pattern Input Component', function () {
describe('User Actions', function () {
beforeEach(function () {
// For an unknown reason, Phantom.js doesn't trigger click events
// on radio buttons in a way Vue can register. So, we have to mount
// to a fixture.
setFixtures('<div id="my-mount"></div>');
this.initialCronInterval = '1 2 3 4 5';
this.intervalPatternComponent = new IntervalPatternInputComponent({
propsData: {
initialCronInterval: this.initialCronInterval,
},
}).$mount();
}).$mount('#my-mount');
});
it('cronInterval is updated when everyday preset interval is selected', function (done) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment