From 04fe42bd38c85123cc9677bd0c5f1e98bcd41065 Mon Sep 17 00:00:00 2001
From: Paul Kaplan <pkaplan@media.mit.edu>
Date: Wed, 7 Nov 2018 09:10:42 -0500
Subject: [PATCH] Use path.resolve the same way the build is loaded

---
 test/integration/costumes.test.js | 4 ++--
 test/integration/sprites.test.js  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/integration/costumes.test.js b/test/integration/costumes.test.js
index 1985d2c8d..78c7b911e 100644
--- a/test/integration/costumes.test.js
+++ b/test/integration/costumes.test.js
@@ -139,7 +139,7 @@ describe('Working with costumes', () => {
             .perform();
         await driver.sleep(500); // Wait for thermometer menu to come up
         const input = await findByXpath('//input[@type="file"]');
-        await input.sendKeys(path.join(process.cwd(), 'test', 'integration', 'fixtures', '100-100.svg'));
+        await input.sendKeys(path.resolve(__dirname, '../fixtures/100-100.svg'));
         await clickText('100-100', scope.costumesTab); // Name from filename
         await clickText('100 x 100', scope.costumesTab); // Size is right
         const logs = await getLogs();
@@ -155,7 +155,7 @@ describe('Working with costumes', () => {
             .perform();
         await driver.sleep(500); // Wait for thermometer menu to come up
         const input = await findByXpath('//input[@type="file"]');
-        await input.sendKeys(path.join(process.cwd(), 'test', 'integration', 'fixtures', 'gh-3582-png.png'));
+        await input.sendKeys(path.resolve(__dirname, '../fixtures/gh-3582-png.png'));
         await clickText('gh-3582-png', scope.costumesTab);
         const logs = await getLogs();
         await expect(logs).toEqual([]);
diff --git a/test/integration/sprites.test.js b/test/integration/sprites.test.js
index cdc234795..ca6a84eba 100644
--- a/test/integration/sprites.test.js
+++ b/test/integration/sprites.test.js
@@ -83,7 +83,7 @@ describe('Working with sprites', () => {
             .perform();
         await driver.sleep(500); // Wait for thermometer menu to come up
         const input = await findByXpath('//input[@type="file"]');
-        await input.sendKeys(path.join(process.cwd(), 'test', 'fixtures', 'gh-3582-png.png'));
+        await input.sendKeys(path.resolve(__dirname, '../fixtures/gh-3582-png.png'));
         await clickText('gh-3582-png', scope.spriteTile);
         const logs = await getLogs();
         await expect(logs).toEqual([]);
@@ -99,7 +99,7 @@ describe('Working with sprites', () => {
             .perform();
         await driver.sleep(500); // Wait for thermometer menu to come up
         const input = await findByXpath('//input[@type="file"]');
-        await input.sendKeys(path.join(process.cwd(), 'test', 'fixtures', '100-100.svg'));
+        await input.sendKeys(path.resolve(__dirname, '../fixtures/100-100.svg'));
         await clickText('100-100', scope.spriteTile); // Sprite is named for costume filename
 
         // Check to make sure the size is right
-- 
GitLab