Skip to content

🎥 Make videos programmatically with React

Merge remote-tracking branch 'origin/main' into HEAD

Jonny Burger45a888fe79ce
diff --cc packages/example/e2e/studio.test.mts
index 3efe674915,6b130e51dd..807e50ccb7
--- a/packages/example/e2e/studio.test.mts
+++ b/packages/example/e2e/studio.test.mts
@@@ -2177,6 -1580,6 +1580,95 @@@ test.describe('visual mode', () =>
}
});
++ test('installs skills from settings and keeps progress when reopened', async ({
++ page,
++ }) => {
++ const skillsInfo = {
++ remotionUpgradeSkillAvailable: false,
++ remotionInteractivitySkillAvailable: false,
++ skills: ['remotion-captions', 'remotion-create'].map((name) => ({
++ name,
++ installedInProject: false,
++ installedGlobally: false,
++ })),
++ };
++ await page.route('**/api/remotion-skills-info', (route) =>
++ route.fulfill({json: {success: true, data: skillsInfo}}),
++ );
++ // The server integration test covers the real installer boundary and filesystem.
++ let installAttempts = 0;
++ let finishInstall: () => void = () => undefined;
++ const installFinished = new Promise<void>((resolve) => {
++ finishInstall = resolve;
++ });
++ await page.route('**/api/install-remotion-skill', async (route) => {
++ expect(route.request().postDataJSON()).toEqual({
++ skill: 'remotion-captions',
++ });
++ if (++installAttempts === 1) {
++ await route.fulfill({
++ json: {success: false, error: 'Could not download skills'},
++ });
++ return;
++ }
++ await installFinished;
++ skillsInfo.skills[0].installedInProject = true;
++ await route.fulfill({json: {success: true, data: skillsInfo}});
++ });
++ await page.goto(`${STUDIO_URL}/schema-test`);
++ const openSkills = async () => {
++ await page.getByRole('button', {name: /Search\.\.\./}).click();
++ const dialog = page.getByRole('dialog');
++ await dialog.getByRole('textbox').fill('> Settings');
++ await dialog.getByText('Settings...', {exact: true}).click();
++ await dialog.getByText('Skills', {exact: true}).click();
++ };
++ await openSkills();
++ const dialog = page.getByRole('dialog');
++ const captionsSkill = dialog
++ .getByRole('listitem')
++ .filter({hasText: '/remotion-captions'});
++ const installButton = captionsSkill.getByRole('button', {
++ name: 'Install',
++ exact: true,
++ });
++ await expect(installButton).toBeVisible();
++ await expect(
++ captionsSkill.getByText('Not installed', {exact: true}),
++ ).toHaveCount(0);
++ await installButton.click();
++ await expect(
++ dialog.getByText('Could not download skills', {exact: true}),
++ ).toBeVisible();
++ await installButton.click();
++ await expect(
++ captionsSkill.getByRole('button', {name: 'Installing…'}),
++ ).toBeDisabled();
++ await expect(
++ dialog
++ .getByRole('listitem')
++ .filter({hasText: '/remotion-create'})
++ .getByRole('button'),
++ ).toBeDisabled();
++ await page.keyboard.press('Escape');
++ await openSkills();
++ await expect(
++ captionsSkill.getByRole('button', {name: 'Installing…'}),
++ ).toBeDisabled();
++ finishInstall();
++ await expect(
++ captionsSkill.getByText('Project', {exact: true}),
++ ).toBeVisible();
++ await expect(
++ dialog.getByText('Could not download skills', {exact: true}),
++ ).toBeHidden();
++ await page.keyboard.press('Escape');
++ await openSkills();
++ await expect(
++ captionsSkill.getByText('Project', {exact: true}),
++ ).toBeVisible();
++ });
++
test('should collapse programmatically duplicated timeline rows', async ({
page,
}) => {