Skip to content

Commit

Permalink
fix: always run e2e tests in development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed Jun 10, 2022
1 parent 452178c commit 9b028e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions tests/e2e/helpers/loadExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ export const delay = async (time) => {
});
};

export const loadExtension = async () => {
const extensionPath = process.env.CI
export const loadExtension = async (production?) => {
if(typeof production=="undefined")production=process.env.CI;
const extensionPath = production
? "./dist/production/chrome"
: "./dist/development/chrome";

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/testBatteries.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ const loginToInstagram = async(page)=>{
test.describe("Test Batteries", () => {
for (const [unitName, unitData] of Object.entries(Units)) {
test(unitName, async () => {
const { page, browser } = await loadExtension();
const { page, browser } = await loadExtension(false);
if (unitName == "instagram") {
if(!await loginToInstagram(page)){
await page.close();
Expand Down

0 comments on commit 9b028e0

Please sign in to comment.