feat(client): conditionally hide preview for new js project (#54416)

This commit is contained in:
Naomi
2024-04-18 02:05:32 -07:00
committed by GitHub
parent 5abe02725d
commit a3cd1f19e6
5 changed files with 70 additions and 26 deletions
+10
View File
@@ -125,3 +125,13 @@ test('Clicking Preview Portal button opens the preview in a new tab', async ({
await newPage.close();
});
test('Preview Buttons should not appear when preview is disabled', async ({
page
}) => {
await page.goto(
'/learn/javascript-algorithms-and-data-structures-v8/learn-introductory-javascript-by-building-a-pyramid-generator/step-1'
);
const previewButton = page.getByTestId('preview-pane-button');
await expect(previewButton).toHaveCount(0);
});