Skip to content

Commit

Permalink
Use tag3 for tests instead
Browse files Browse the repository at this point in the history
  • Loading branch information
hop-dev committed Aug 11, 2022
1 parent acb9a78 commit c2b0b5a
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions x-pack/test/saved_object_tagging/functional/tests/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,37 +144,36 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

describe('Disabling save button', () => {
const tag1Unmodified = {
name: 'tag-1',
description: 'My first tag!',
color: '#FF00FF',
const tag3Unmodified = {
name: 'tag-3',
description: 'Last but not least',
color: '#000000',
};
it('should disable save button if no property is changed', async () => {
await tagModal.openEdit('tag-1');
await tagModal.openEdit('tag-3');

// unmodified tag-1 attributes
await tagModal.fillForm(tag1Unmodified, { submit: false });
await tagModal.fillForm(tag3Unmodified, { submit: false });
expect(await tagModal.isConfirmDisabled()).to.be(true);
});
it('should enable save button if name is changed', async () => {
await tagModal.openEdit('tag-1');
await tagModal.openEdit('tag-3');

await tagModal.fillForm({ ...tag1Unmodified, name: 'changed name' }, { submit: false });
await tagModal.fillForm({ ...tag3Unmodified, name: 'changed name' }, { submit: false });
expect(await tagModal.isConfirmDisabled()).to.be(false);
});
it('should enable save button if description is changed', async () => {
await tagModal.openEdit('tag-1');
await tagModal.openEdit('tag-3');

await tagModal.fillForm(
{ ...tag1Unmodified, description: 'changed description' },
{ ...tag3Unmodified, description: 'changed description' },
{ submit: false }
);
expect(await tagModal.isConfirmDisabled()).to.be(false);
});
it('should enable save button if color is changed', async () => {
await tagModal.openEdit('tag-1');
await tagModal.openEdit('tag-3');

await tagModal.fillForm({ ...tag1Unmodified, color: '#FF0000' }, { submit: false });
await tagModal.fillForm({ ...tag3Unmodified, color: '#FF0000' }, { submit: false });
expect(await tagModal.isConfirmDisabled()).to.be(false);
});
});
Expand Down

0 comments on commit c2b0b5a

Please sign in to comment.