blob: 4869fb17d96c7e604ef2944e9997978c11e2b91b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import Vue from 'vue';
import archivedComponent from '~/vue_merge_request_widget/components/states/mr_widget_archived';
describe('MRWidgetArchived', () => {
describe('template', () => {
it('should have correct elements', () => {
const Component = Vue.extend(archivedComponent);
const el = new Component({
el: document.createElement('div'),
}).$el;
expect(el.classList.contains('mr-widget-body')).toBeTruthy();
expect(el.querySelector('button').classList.contains('btn-success')).toBeTruthy();
expect(el.querySelector('button').disabled).toBeTruthy();
expect(el.innerText).toContain('This project is archived, write access has been disabled');
});
});
});
|