Skip to content
Snippets Groups Projects
Commit 99c89368 authored by Eduardo Sanz García's avatar Eduardo Sanz García :zero:
Browse files

Fix flaky frontend test

parent 92097f8d
No related branches found
No related tags found
1 merge request!135886Replace GlFormSelect by GlCollapsibleListbox
This commit is part of merge request !135886. Comments created here will be created in the context of that merge request.
......@@ -149,7 +149,7 @@ describe('EEInviteModalBase', () => {
});
it('emits submit', () => {
expect(wrapper.emitted('submit')).toEqual([[{ accessLevel: 10, expiresAt: undefined }]]);
expect(wrapper.emitted('submit')).toEqual([[{ accessLevel: 20, expiresAt: undefined }]]);
});
});
});
......@@ -267,7 +267,7 @@ describe('EEInviteModalBase', () => {
it('emits submit event', () => {
expect(wrapper.emitted('submit')).toHaveLength(1);
expect(wrapper.emitted('submit')).toEqual([[{ accessLevel: 10, expiresAt: undefined }]]);
expect(wrapper.emitted('submit')).toEqual([[{ accessLevel: 20, expiresAt: undefined }]]);
});
it('shows the initial modal', () => {
......
......@@ -113,9 +113,8 @@ describe('InviteModalBase', () => {
it('sets the default dropdown text to the default access level name', () => {
expect(findListbox().exists()).toBe(true);
const option = findListbox().findByTestId('listbox-item-10');
expect(option.text()).toBe('Guest');
expect(option.attributes('aria-selected')).toBe('true');
const option = findListbox().find('[aria-selected]');
expect(option.text()).toBe('Reporter');
});
it('renders dropdown items for each accessLevel', () => {
......
......@@ -3,7 +3,7 @@ export const propsData = {
modalId: '_modal_id_',
name: '_name_',
accessLevels: { Guest: 10, Reporter: 20, Developer: 30, Maintainer: 40, Owner: 50 },
defaultAccessLevel: 10,
defaultAccessLevel: 20,
helpLink: 'https://example.com',
labelIntroText: '_label_intro_text_',
labelSearchField: '_label_search_field_',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment