✅(frontend) assert DocToolBox depends the licence
Thanks to Vitest we can now assert more complicated parts of the code without too much mocking.
This commit is contained in:
@@ -25,7 +25,7 @@ test.describe('Doc Export', () => {
|
||||
await createDoc(page, 'doc-editor', browserName, 1);
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'download',
|
||||
name: 'Export the document',
|
||||
})
|
||||
.click();
|
||||
|
||||
@@ -78,8 +78,7 @@ test.describe('Doc Export', () => {
|
||||
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'download',
|
||||
exact: true,
|
||||
name: 'Export the document',
|
||||
})
|
||||
.click();
|
||||
|
||||
@@ -130,8 +129,7 @@ test.describe('Doc Export', () => {
|
||||
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'download',
|
||||
exact: true,
|
||||
name: 'Export the document',
|
||||
})
|
||||
.click();
|
||||
|
||||
@@ -200,7 +198,7 @@ test.describe('Doc Export', () => {
|
||||
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'download',
|
||||
name: 'Export the document',
|
||||
})
|
||||
.click();
|
||||
|
||||
@@ -277,7 +275,7 @@ test.describe('Doc Export', () => {
|
||||
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'download',
|
||||
name: 'Export the document',
|
||||
})
|
||||
.click();
|
||||
|
||||
@@ -327,8 +325,7 @@ test.describe('Doc Export', () => {
|
||||
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'download',
|
||||
exact: true,
|
||||
name: 'Export the document',
|
||||
})
|
||||
.click();
|
||||
|
||||
@@ -390,8 +387,7 @@ test.describe('Doc Export', () => {
|
||||
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'download',
|
||||
exact: true,
|
||||
name: 'Export the document',
|
||||
})
|
||||
.click();
|
||||
|
||||
@@ -465,8 +461,7 @@ test.describe('Doc Export', () => {
|
||||
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'download',
|
||||
exact: true,
|
||||
name: 'Export the document',
|
||||
})
|
||||
.click();
|
||||
|
||||
@@ -537,8 +532,7 @@ test.describe('Doc Export', () => {
|
||||
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'download',
|
||||
exact: true,
|
||||
name: 'Export the document',
|
||||
})
|
||||
.click();
|
||||
|
||||
|
||||
@@ -44,7 +44,9 @@ test.describe('Doc Header', () => {
|
||||
|
||||
await expect(card.getByText('Owner ·')).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: 'Share' })).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: 'download' })).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Export the document' }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Open the document options' }),
|
||||
).toBeVisible();
|
||||
@@ -115,7 +117,9 @@ test.describe('Doc Header', () => {
|
||||
|
||||
await goToGridDoc(page);
|
||||
|
||||
await expect(page.getByRole('button', { name: 'download' })).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Export the document' }),
|
||||
).toBeVisible();
|
||||
|
||||
await page.getByLabel('Open the document options').click();
|
||||
|
||||
@@ -185,7 +189,9 @@ test.describe('Doc Header', () => {
|
||||
|
||||
await goToGridDoc(page);
|
||||
|
||||
await expect(page.getByRole('button', { name: 'download' })).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Export the document' }),
|
||||
).toBeVisible();
|
||||
await page.getByLabel('Open the document options').click();
|
||||
|
||||
await expect(page.getByLabel('Delete document')).toBeDisabled();
|
||||
@@ -245,7 +251,9 @@ test.describe('Doc Header', () => {
|
||||
|
||||
await goToGridDoc(page);
|
||||
|
||||
await expect(page.getByRole('button', { name: 'download' })).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'Export the document' }),
|
||||
).toBeVisible();
|
||||
await page.getByLabel('Open the document options').click();
|
||||
|
||||
await expect(page.getByLabel('Delete document')).toBeDisabled();
|
||||
|
||||
Reference in New Issue
Block a user