Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
* limitations under the License.
*/

import { expect, Page } from '@playwright/test';
import { redirectToHomePage } from '../../utils/common';
import { expect } from '@playwright/test';
import { performAdminLogin } from '../../utils/admin';
import { redirectToExplorePage } from '../../utils/common';
import { waitForAllLoadersToDisappear } from '../../utils/entity';
import {
countCsvResponseRows,
Expand All @@ -22,15 +23,29 @@ import {
} from '../../utils/explore';
import { test } from '../fixtures/pages';

const navigateToExplorePage = async (page: Page) => {
await redirectToHomePage(page);
await page.getByTestId('app-bar-item-explore').click();
await expect(page.getByTestId('explore-page')).toBeVisible();
};

test.describe('Search Export', { tag: ['@Features', '@Discovery'] }, () => {
test.beforeAll(async ({ browser }) => {
const { apiContext, afterAction } = await performAdminLogin(browser);

const serviceRes = await apiContext.get(
'/api/v1/services/databaseServices/name/sample_data'
);
const service = await serviceRes.json();
if (service.displayName) {
await apiContext.patch(
`/api/v1/services/databaseServices/${service.id}`,
{
data: [{ op: 'replace', path: '/displayName', value: 'sample_data' }],
headers: { 'Content-Type': 'application/json-patch+json' },
}
);

await afterAction();
}
});

test.beforeEach(async ({ page }) => {
await navigateToExplorePage(page);
await redirectToExplorePage(page);
});

test('Export button opens scope modal with correct options', async ({
Expand Down
Loading