Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more tests for gifs with large number of frames #3

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
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
Binary file added test/fixtures/catshocked.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions test/fixtures/catshocked.gif:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://blobs.gg/
HostUrl=https://cdn.discordapp.com/emojis/403093165348880385.gif?size=128
21 changes: 20 additions & 1 deletion test/integration/costumes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,26 @@ describe('Working with costumes', () => {
const logs = await getLogs();
await expect(logs).toEqual([]);
});


test('Adding a costume from gif with large number of frames', async () => {
await loadUri(uri);
await clickText('Costumes');
const el = await findByXpath('//button[@aria-label="Choose a Costume"]');
await driver.actions().mouseMove(el)
.perform();
await driver.sleep(500); // Wait for thermometer menu to come up
const input = await findByXpath('//input[@type="file"]');
await input.sendKeys(path.resolve(__dirname, '../fixtures/catshocked.gif'));

// Verify all frames (1-45)
for (let i = 1; i <= 45; i++) {
const frameName = i === 1 ? 'catshocked' : `catshocked${i}`;
await findByText(frameName, scope.costumesTab);
}
const logs = await getLogs();
await expect(logs).toEqual([]);
});

test('Adding a letter costume through the Letters filter in the library', async () => {
await loadUri(uri);
await driver.manage()
Expand Down