From 0a70db812f95b60e67bee31915ac7f81e8d570b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Carden=CC=83a?= <35935591+luisecm@users.noreply.github.com> Date: Tue, 31 Oct 2023 23:14:17 -0600 Subject: [PATCH] chore(appium): craete new config files for accounts --- .github/workflows/ui-automated-tests.yml | 52 +++++- .../{ => macos-chats}/wdio.mac.chatA.conf.ts | 0 .../{ => macos-chats}/wdio.mac.chatB.conf.ts | 0 .../wdio.mac.createAccountA.conf.ts | 149 ++++++++++++++++++ .../wdio.mac.createAccountB.conf.ts | 149 ++++++++++++++++++ config/wdio.mac.app.conf.ts | 3 +- config/wdio.mac.ci.conf.ts | 3 +- package.json | 6 +- ...s.spec.ts => 14-settings-messages.spec.ts} | 0 tests/specs/15-create-first-account.spec.ts | 96 +++++++++++ ...ec.ts => 16-create-second-account.spec.ts} | 46 +----- .../suites/MainTests/01-UplinkTests.suite.ts | 2 +- .../MainTests/02-UplinkWindows.suite.ts | 2 +- .../MainTests/03-CreateAccountA.suite.ts | 6 + .../MainTests/03-CreateAccountTests.suite.ts | 6 - .../MainTests/04-CreateAccountB.suite.ts | 6 + 16 files changed, 460 insertions(+), 66 deletions(-) rename config/{ => macos-chats}/wdio.mac.chatA.conf.ts (100%) rename config/{ => macos-chats}/wdio.mac.chatB.conf.ts (100%) create mode 100644 config/macos-chats/wdio.mac.createAccountA.conf.ts create mode 100644 config/macos-chats/wdio.mac.createAccountB.conf.ts rename tests/specs/{15-settings-messages.spec.ts => 14-settings-messages.spec.ts} (100%) create mode 100644 tests/specs/15-create-first-account.spec.ts rename tests/specs/{14-create-reusable-accounts.spec.ts => 16-create-second-account.spec.ts} (67%) create mode 100644 tests/suites/MainTests/03-CreateAccountA.suite.ts delete mode 100644 tests/suites/MainTests/03-CreateAccountTests.suite.ts create mode 100644 tests/suites/MainTests/04-CreateAccountB.suite.ts diff --git a/.github/workflows/ui-automated-tests.yml b/.github/workflows/ui-automated-tests.yml index f5b2e77781b..77058fbae6e 100644 --- a/.github/workflows/ui-automated-tests.yml +++ b/.github/workflows/ui-automated-tests.yml @@ -164,13 +164,44 @@ jobs: with: name: appium-log-macos path: ./appium.log + + - name: Run Tests on to Create First Account 🧪 + run: npm run mac.createAccountA - - name: Upload test accounts for Chat + - name: Delete data from Friends Tests for artifact of Chat User A + working-directory: ./tests/fixtures/users/mac2/ + run: rm -rf ./FriendsTestUser/ + + - name: List all of the files extracted on Repo After First Account Created + run: | + pwd + ls -R + + - name: Upload test accounts for Chat User A + uses: actions/upload-artifact@v3 + if: always() + with: + name: account-first-user + path: ./tests/fixtures/users/mac2/ + + - name: Run Tests on to Create Second Account 🧪 + run: npm run mac.createAccountB + + - name: Delete data from Friends Tests for artifact of Chat User B + working-directory: ./tests/fixtures/users/mac2/ + run: rm -rf ./FriendsTestUser/ + + - name: List all of the files extracted on Repo After Second Account Created + run: | + pwd + ls -R + + - name: Upload test accounts for Chat User B uses: actions/upload-artifact@v3 if: always() with: - name: test-accounts - path: ./tests/fixtures/users/ + name: account-second-user + path: ./tests/fixtures/users/mac2/ - name: Add label if any of test jobs failed if: failure() @@ -203,11 +234,17 @@ jobs: name: Uplink-macos-latest path: ./apps - - name: Download Test User Accounts 🗳️ + - name: Download Test User Account User A 🗳️ + uses: actions/download-artifact@v3 + with: + name: account-first-user + path: ./tests/fixtures/users/mac2/ + + - name: Download Test User Account User A 🗳️ uses: actions/download-artifact@v3 with: - name: test-accounts - path: ./tests/fixtures/users/ + name: account-second-user + path: ./tests/fixtures/users/mac2/ - name: List all of the files extracted run: | @@ -341,4 +378,5 @@ jobs: test-allure-mac-ci test-allure-mac-chatA test-allure-mac-chatB - test-accounts + account-first-user + account-second-user diff --git a/config/wdio.mac.chatA.conf.ts b/config/macos-chats/wdio.mac.chatA.conf.ts similarity index 100% rename from config/wdio.mac.chatA.conf.ts rename to config/macos-chats/wdio.mac.chatA.conf.ts diff --git a/config/wdio.mac.chatB.conf.ts b/config/macos-chats/wdio.mac.chatB.conf.ts similarity index 100% rename from config/wdio.mac.chatB.conf.ts rename to config/macos-chats/wdio.mac.chatB.conf.ts diff --git a/config/macos-chats/wdio.mac.createAccountA.conf.ts b/config/macos-chats/wdio.mac.createAccountA.conf.ts new file mode 100644 index 00000000000..368ff02c6a9 --- /dev/null +++ b/config/macos-chats/wdio.mac.createAccountA.conf.ts @@ -0,0 +1,149 @@ +import "module-alias/register"; +import allureReporter from '@wdio/allure-reporter' +import { config as sharedConfig } from '@config/wdio.shared.conf'; +import { homedir } from "os"; +import { join } from "path"; +import { MACOS_BUNDLE_ID, MACOS_DRIVER } from "@helpers/constants"; +const fsp = require("fs").promises; +const { readFileSync, rmSync } = require("fs"); + +// @ts-expect-error +export const config: WebdriverIO.Config = { + ...sharedConfig, + ...{ + // + // ================== + // Specify Test Files + // ================== + // Define which test specs should run. The pattern is relative to the directory + // from which `wdio` was called. + // + // The specs are defined as an array of spec files (optionally using wildcards + // that will be expanded). The test for each spec file will be run in a separate + // worker process. In order to have a group of spec files run in the same worker + // process simply enclose them in an array within the specs array. + // + // If you are calling `wdio` from an NPM script (see https://docs.npmjs.com/cli/run-script), + // then the current working directory is where your `package.json` resides, so `wdio` + // will be called from there. + // + maxInstances: 1, + specs: [ + join(process.cwd(), "./tests/suites/MainTests/03-CreateAccountA.suite.ts") + ], + // Patterns to exclude. + exclude: [ + // 'path/to/excluded/files' + ], + // + // ============ + // Capabilities + // ============ + // Define your capabilities here. WebdriverIO can run multiple capabilities at the same + // time. Depending on the number of capabilities, WebdriverIO launches several test + // sessions. Within your capabilities you can overwrite the spec and exclude options in + // order to group specific specs to a specific capability. + // + // + // If you have trouble getting all important capabilities together, check out the + // Sauce Labs platform configurator - a great tool to configure your capabilities: + // https://docs.saucelabs.com/reference/platforms-configurator + // + port: 4723, + path: '/', + capabilities: { + userA: { + capabilities: { + platformName: "mac", + "appium:automationName": MACOS_DRIVER, + "appium:bundleId": MACOS_BUNDLE_ID, + "appium:arguments": ["--path", homedir() + "/.uplink"], + "appium:systemPort": 4724, + "appium:prerun": { + command: 'do shell script "rm -rf ~/.uplink"', + }, + } + }, + } + , + // + // =================== + // Test Configurations + // =================== + // Define all options that are relevant for the WebdriverIO instance here + // + reporters: [ + ["spec", + { + showPreface: false, + }, + ], + ['allure', + { + outputDir: './allure-results', + disableWebdriverStepsReporting: true, + disableWebdriverScreenshotsReporting: false, + } + ], + ['junit', + { + outputDir: './test-report/', + outputFileFormat: function (options) { + return `test-results-macos-app-${options.cid}.xml`; + } + } + ], + ], + // + // ===== + // Hooks + // ===== + // WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance + // it and to build services around it. You can either apply a single function or an array of + // methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got + // resolved to continue. + onPrepare: async function() { + const cacheFolder = homedir() + "/.uplink/.user"; + const allureResultsFolder = join(process.cwd(), "./allure-results"); + const testReportFolder = join(process.cwd(), "./test-report"); + const testResultsFolder = join(process.cwd(), "./test-results"); + try { + await rmSync(allureResultsFolder, { recursive: true, force: true }); + await rmSync(testReportFolder, { recursive: true, force: true }); + await rmSync(testResultsFolder, { recursive: true, force: true }); + console.log("Deleted Artifacts Folders Successfully!"); + } catch (error) { + console.error( + `Got an error trying to delete artifacts folders: ${error.message}` + ); + } + try { + await rmSync(cacheFolder, { recursive: true, force: true }); + console.log("Deleted Cache Folder Successfully!"); + } catch (error) { + console.error( + `Got an error trying to delete Cache Folder: ${error.message}` + ); + } + }, + + afterTest: async function (test, describe, { error }) { + if (error) { + let imageFile = await driver.takeScreenshot(); + const imageFolder = join(process.cwd(), "./test-results/macos-app", test.parent); + const imageTitle = test.title + " - Failed.png" + await fsp.mkdir(imageFolder, {recursive: true}); + await fsp.writeFile( + imageFolder + "/" + imageTitle, + imageFile, + "base64" + ); + + // Add to Screenshot to Allure Reporter + const data = await readFileSync(`${imageFolder}/${imageTitle}`); + allureReporter.addAttachment(imageTitle, data, 'image/png') + } + }, + } + +} \ No newline at end of file diff --git a/config/macos-chats/wdio.mac.createAccountB.conf.ts b/config/macos-chats/wdio.mac.createAccountB.conf.ts new file mode 100644 index 00000000000..42b4b93293e --- /dev/null +++ b/config/macos-chats/wdio.mac.createAccountB.conf.ts @@ -0,0 +1,149 @@ +import "module-alias/register"; +import allureReporter from '@wdio/allure-reporter' +import { config as sharedConfig } from '@config/wdio.shared.conf'; +import { homedir } from "os"; +import { join } from "path"; +import { MACOS_BUNDLE_ID, MACOS_DRIVER } from "@helpers/constants"; +const fsp = require("fs").promises; +const { readFileSync, rmSync } = require("fs"); + +// @ts-expect-error +export const config: WebdriverIO.Config = { + ...sharedConfig, + ...{ + // + // ================== + // Specify Test Files + // ================== + // Define which test specs should run. The pattern is relative to the directory + // from which `wdio` was called. + // + // The specs are defined as an array of spec files (optionally using wildcards + // that will be expanded). The test for each spec file will be run in a separate + // worker process. In order to have a group of spec files run in the same worker + // process simply enclose them in an array within the specs array. + // + // If you are calling `wdio` from an NPM script (see https://docs.npmjs.com/cli/run-script), + // then the current working directory is where your `package.json` resides, so `wdio` + // will be called from there. + // + maxInstances: 1, + specs: [ + join(process.cwd(), "./tests/suites/MainTests/04-CreateAccountB.suite.ts") + ], + // Patterns to exclude. + exclude: [ + // 'path/to/excluded/files' + ], + // + // ============ + // Capabilities + // ============ + // Define your capabilities here. WebdriverIO can run multiple capabilities at the same + // time. Depending on the number of capabilities, WebdriverIO launches several test + // sessions. Within your capabilities you can overwrite the spec and exclude options in + // order to group specific specs to a specific capability. + // + // + // If you have trouble getting all important capabilities together, check out the + // Sauce Labs platform configurator - a great tool to configure your capabilities: + // https://docs.saucelabs.com/reference/platforms-configurator + // + port: 4723, + path: '/', + capabilities: { + userA: { + capabilities: { + platformName: "mac", + "appium:automationName": MACOS_DRIVER, + "appium:bundleId": MACOS_BUNDLE_ID, + "appium:arguments": ["--path", homedir() + "/.uplink"], + "appium:systemPort": 4724, + "appium:prerun": { + command: 'do shell script "rm -rf ~/.uplink"', + }, + } + }, + } + , + // + // =================== + // Test Configurations + // =================== + // Define all options that are relevant for the WebdriverIO instance here + // + reporters: [ + ["spec", + { + showPreface: false, + }, + ], + ['allure', + { + outputDir: './allure-results', + disableWebdriverStepsReporting: true, + disableWebdriverScreenshotsReporting: false, + } + ], + ['junit', + { + outputDir: './test-report/', + outputFileFormat: function (options) { + return `test-results-macos-app-${options.cid}.xml`; + } + } + ], + ], + // + // ===== + // Hooks + // ===== + // WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance + // it and to build services around it. You can either apply a single function or an array of + // methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got + // resolved to continue. + onPrepare: async function() { + const cacheFolder = homedir() + "/.uplink/.user"; + const allureResultsFolder = join(process.cwd(), "./allure-results"); + const testReportFolder = join(process.cwd(), "./test-report"); + const testResultsFolder = join(process.cwd(), "./test-results"); + try { + await rmSync(allureResultsFolder, { recursive: true, force: true }); + await rmSync(testReportFolder, { recursive: true, force: true }); + await rmSync(testResultsFolder, { recursive: true, force: true }); + console.log("Deleted Artifacts Folders Successfully!"); + } catch (error) { + console.error( + `Got an error trying to delete artifacts folders: ${error.message}` + ); + } + try { + await rmSync(cacheFolder, { recursive: true, force: true }); + console.log("Deleted Cache Folder Successfully!"); + } catch (error) { + console.error( + `Got an error trying to delete Cache Folder: ${error.message}` + ); + } + }, + + afterTest: async function (test, describe, { error }) { + if (error) { + let imageFile = await driver.takeScreenshot(); + const imageFolder = join(process.cwd(), "./test-results/macos-app", test.parent); + const imageTitle = test.title + " - Failed.png" + await fsp.mkdir(imageFolder, {recursive: true}); + await fsp.writeFile( + imageFolder + "/" + imageTitle, + imageFile, + "base64" + ); + + // Add to Screenshot to Allure Reporter + const data = await readFileSync(`${imageFolder}/${imageTitle}`); + allureReporter.addAttachment(imageTitle, data, 'image/png') + } + }, + } + +} \ No newline at end of file diff --git a/config/wdio.mac.app.conf.ts b/config/wdio.mac.app.conf.ts index 6f5eb064412..c2275f3c725 100644 --- a/config/wdio.mac.app.conf.ts +++ b/config/wdio.mac.app.conf.ts @@ -29,8 +29,7 @@ export const config: WebdriverIO.Config = { // maxInstances: 1, specs: [ - [join(process.cwd(), "./tests/suites/MainTests/03-CreateAccountTests.suite.ts")], - [join(process.cwd(), "./tests/suites/MainTests/01-UplinkTests.suite.ts")] + join(process.cwd(), "./tests/suites/MainTests/01-UplinkTests.suite.ts") ], // Patterns to exclude. exclude: [ diff --git a/config/wdio.mac.ci.conf.ts b/config/wdio.mac.ci.conf.ts index c3dce3da6a9..a19be70ae96 100644 --- a/config/wdio.mac.ci.conf.ts +++ b/config/wdio.mac.ci.conf.ts @@ -28,8 +28,7 @@ export const config: WebdriverIO.Config = { // will be called from there. maxInstances: 1, specs: [ - [join(process.cwd(), "./tests/suites/MainTests/03-CreateAccountTests.suite.ts")], - [join(process.cwd(), "./tests/suites/MainTests/01-UplinkTests.suite.ts")] + join(process.cwd(), "./tests/suites/MainTests/01-UplinkTests.suite.ts") ], // Patterns to exclude. exclude: [ diff --git a/package.json b/package.json index 20459a6fbaf..a63bd7a3cd4 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,10 @@ "description": "An automation testing framework built with WebdriverIO and Appium to test Uplink Desktop app", "scripts": { "mac.app": "wdio config/wdio.mac.app.conf.ts", - "mac.chatA": "wdio config/wdio.mac.chatA.conf.ts", - "mac.chatB": "wdio config/wdio.mac.chatB.conf.ts", + "mac.chatA": "wdio config/macos-chats/wdio.mac.chatA.conf.ts", + "mac.chatB": "wdio config/macos-chats/wdio.mac.chatB.conf.ts", + "mac.createAccountA": "wdio config/macos-chats/wdio.mac.createAccountA.conf.ts", + "mac.createAccountB": "wdio config/macos-chats/wdio.mac.createAccountB.conf.ts", "mac.ci": "wdio config/wdio.mac.ci.conf.ts", "mac.multiremote": "wdio config/wdio.mac.multiremote.conf.ts", "windows.app": "wdio config/wdio.windows.app.conf.ts", diff --git a/tests/specs/15-settings-messages.spec.ts b/tests/specs/14-settings-messages.spec.ts similarity index 100% rename from tests/specs/15-settings-messages.spec.ts rename to tests/specs/14-settings-messages.spec.ts diff --git a/tests/specs/15-create-first-account.spec.ts b/tests/specs/15-create-first-account.spec.ts new file mode 100644 index 00000000000..b99536dd415 --- /dev/null +++ b/tests/specs/15-create-first-account.spec.ts @@ -0,0 +1,96 @@ +import "module-alias/register"; +import { grabCacheFolder, maximizeWindow, saveTestKeys } from "@helpers/commands"; +import { USER_A_INSTANCE } from "@helpers/constants"; +import CreatePinScreen from "@screenobjects/account-creation/CreatePinScreen"; +import CreateUserScreen from "@screenobjects/account-creation/CreateUserScreen"; +import SettingsProfileScreen from "@screenobjects/settings/SettingsProfileScreen"; +import WelcomeScreen from "@screenobjects/welcome-screen/WelcomeScreen"; +let createPinFirstUser = new CreatePinScreen(USER_A_INSTANCE); +let createUserFirstUser = new CreateUserScreen(USER_A_INSTANCE); +let settingsProfileFirstUser = new SettingsProfileScreen(USER_A_INSTANCE); +let welcomeScreenFirstUser = new WelcomeScreen(USER_A_INSTANCE); + +export default async function createFirstAccount() { + it("Validate warning texts are displayed on screen", async () => { + const unlockWarningHeader = await createPinFirstUser.unlockWarningHeader; + await unlockWarningHeader.waitForExist(); + await expect(unlockWarningHeader).toHaveTextContaining([ + "LET'S CHOOSE YOUR PASSWORD", + "WELCOME BACK,", + ]); + + const unlockWarningParagraph = + await createPinFirstUser.unlockWarningParagraph; + await unlockWarningParagraph.waitForExist(); + await expect(unlockWarningParagraph).toHaveTextContaining( + "(this is used to encrypt all of the data Uplink stores on your computer when you're not using it so nobody can read your data.)" + ); + }); + + it("Unlock Screen - Reset Account is shown after right clicking on Help Button", async () => { + // Right click on Help Button to show the help menu + await createPinFirstUser.openHelpButtonMenu(); + + // Right click again on Help Button to hide the help menu + await createPinFirstUser.openHelpButtonMenu(); + }); + + it("Enter a valid pin and continue creating a username", async () => { + await createPinFirstUser.enterPin("1234"); + const statusOfButton = + await createPinFirstUser.getStatusOfCreateAccountButton(); + await expect(statusOfButton).toEqual("true"); + await createPinFirstUser.clickOnCreateAccount(); + await createUserFirstUser.waitForIsShown(true); + }); + + it("Enter valid username to continue", async () => { + await createUserFirstUser.enterUsername("ChatUserA"); + const statusOfButton = + await createPinFirstUser.getStatusOfCreateAccountButton(); + await expect(statusOfButton).toEqual("true"); + await createUserFirstUser.clickOnCreateAccount(); + await welcomeScreenFirstUser.waitForIsShown(true); + + // Maximize Window on Execution + await maximizeWindow(USER_A_INSTANCE); + }); + + it("Go to Settings with Chat User B", async () => { + // Go to Settings Screen and select the Settings Screen to validate + await welcomeScreenFirstUser.goToSettings(); + await settingsProfileFirstUser.waitForIsShown(true); + }); + + it("Settings Profile - Click On Copy ID Button", async () => { + // Wait for toast notification to be closed before starting test + await settingsProfileFirstUser.waitUntilNotificationIsClosed(); + + // Click on Copy ID button and assert Toast Notification is displayed + await settingsProfileFirstUser.clickOnCopyIDButton(); + + // Wait for toast notification to be closed + await settingsProfileFirstUser.waitUntilNotificationIsClosed(); + }); + + it("Settings Profile - Copied ID can be placed on any text field", async () => { + // Paste copied DID Key into Status Input + await settingsProfileFirstUser.pasteUserKeyInStatus(); + + // Ensure that value placed in Status is the did key from the user + const statusInputText = + await settingsProfileFirstUser.getStatusInputElement(); + await expect(statusInputText).toHaveTextContaining("did:key:"); + + const didkey = await settingsProfileFirstUser.getCopiedDidFromStatusInput(); + const username = "ChatUserA"; + // Grab cache folder and restart + await saveTestKeys(username, didkey, USER_A_INSTANCE); + + // Update banner picture from user A + await grabCacheFolder(username, USER_A_INSTANCE); + + // Clear value from status input + await settingsProfileFirstUser.deleteStatus(); + }); +} diff --git a/tests/specs/14-create-reusable-accounts.spec.ts b/tests/specs/16-create-second-account.spec.ts similarity index 67% rename from tests/specs/14-create-reusable-accounts.spec.ts rename to tests/specs/16-create-second-account.spec.ts index 60625859d90..ed71236ad29 100644 --- a/tests/specs/14-create-reusable-accounts.spec.ts +++ b/tests/specs/16-create-second-account.spec.ts @@ -3,12 +3,10 @@ import { grabCacheFolder, maximizeWindow, saveTestKeys } from "@helpers/commands import { USER_A_INSTANCE } from "@helpers/constants"; import CreatePinScreen from "@screenobjects/account-creation/CreatePinScreen"; import CreateUserScreen from "@screenobjects/account-creation/CreateUserScreen"; -import CropImageProfileModal from "@screenobjects/settings/CropToolProfileModal"; import SettingsProfileScreen from "@screenobjects/settings/SettingsProfileScreen"; import WelcomeScreen from "@screenobjects/welcome-screen/WelcomeScreen"; let createPinFirstUser = new CreatePinScreen(USER_A_INSTANCE); let createUserFirstUser = new CreateUserScreen(USER_A_INSTANCE); -let cropProfileFirstUser = new CropImageProfileModal(USER_A_INSTANCE); let settingsProfileFirstUser = new SettingsProfileScreen(USER_A_INSTANCE); let welcomeScreenFirstUser = new WelcomeScreen(USER_A_INSTANCE); @@ -64,48 +62,6 @@ export default async function createSecondAccount() { await settingsProfileFirstUser.waitForIsShown(true); }); - it("Settings Profile - Profile Picture - Crop Image and add profile picture", async () => { - // Click on profile picture upload button and select the file logo.jpg - await settingsProfileFirstUser.selectProfilePicture( - "./tests/fixtures/logo.jpg" - ); - - // Validate Crop Tool Modal is displayed - await cropProfileFirstUser.validateCropToolModalIsShown(); - - // Click three times on increase button, then one time on decrease button - await cropProfileFirstUser.clickMultipleTimesIncreaseButton(3); - await cropProfileFirstUser.clickOnDecreaseRangeButton(); - - // Validate final value shown for zoom slider is 1 - const rangeValueText = await cropProfileFirstUser.cropImageRangeValueText; - await expect(rangeValueText).toHaveTextContaining("1.2"); - - // Click on confirm button to save - await cropProfileFirstUser.clickOnConfirmButton(); - - // Validate new profile picture is displayed - await settingsProfileFirstUser.validateProfilePictureIsShown(); - }); - - // Needs visual validation steps to ensure that picture was actually loaded matches with expected image - it("Settings Profile - Crop banner and add banner picture", async () => { - // Click on banner picture upload button and select the file banner.jpg - await settingsProfileFirstUser.selectBannerPicture( - "./tests/fixtures/banner.jpg" - ); - - // Validate Crop Tool Modal is displayed - await cropProfileFirstUser.validateCropToolModalIsShown(); - - // Change the size of picture and click on confirm button to save - await cropProfileFirstUser.clickOnIncreaseRangeButton(); - await cropProfileFirstUser.clickOnConfirmButton(); - - // Validate new banner picture is displayed - await settingsProfileFirstUser.validateBannerPictureIsShown(); - }); - it("Settings Profile - Click On Copy ID Button", async () => { // Wait for toast notification to be closed before starting test await settingsProfileFirstUser.waitUntilNotificationIsClosed(); @@ -127,7 +83,7 @@ export default async function createSecondAccount() { await expect(statusInputText).toHaveTextContaining("did:key:"); const didkey = await settingsProfileFirstUser.getCopiedDidFromStatusInput(); - const username = "ChatUserA"; + const username = "ChatUserB"; // Grab cache folder and restart await saveTestKeys(username, didkey, USER_A_INSTANCE); diff --git a/tests/suites/MainTests/01-UplinkTests.suite.ts b/tests/suites/MainTests/01-UplinkTests.suite.ts index a0c3211f069..3551f1fcdc6 100644 --- a/tests/suites/MainTests/01-UplinkTests.suite.ts +++ b/tests/suites/MainTests/01-UplinkTests.suite.ts @@ -4,7 +4,7 @@ import chats from "@specs/02-chats.spec"; import files from "@specs/03-files.spec"; import settingsProfile from "@specs/05-settings-profile.spec"; import settingsGeneral from "@specs/06-settings-general.spec"; -import settingsMessages from "@specs/15-settings-messages.spec"; +import settingsMessages from "@specs/14-settings-messages.spec"; import settingsAudio from "@specs/07-settings-audio.spec"; import settingsExtensions from "@specs/08-settings-extensions.spec"; import settingsNotifications from "@specs/09-settings-notifications.spec"; diff --git a/tests/suites/MainTests/02-UplinkWindows.suite.ts b/tests/suites/MainTests/02-UplinkWindows.suite.ts index 2e2fbe372c3..f6221cd143a 100644 --- a/tests/suites/MainTests/02-UplinkWindows.suite.ts +++ b/tests/suites/MainTests/02-UplinkWindows.suite.ts @@ -4,7 +4,7 @@ import chats from "@specs/02-chats.spec"; import files from "@specs/03-files.spec"; import settingsProfile from "@specs/05-settings-profile.spec"; import settingsGeneral from "@specs/06-settings-general.spec"; -import settingsMessages from "@specs/15-settings-messages.spec"; +import settingsMessages from "@specs/14-settings-messages.spec"; import settingsAudio from "@specs/07-settings-audio.spec"; import settingsExtensions from "@specs/08-settings-extensions.spec"; import settingsNotifications from "@specs/09-settings-notifications.spec"; diff --git a/tests/suites/MainTests/03-CreateAccountA.suite.ts b/tests/suites/MainTests/03-CreateAccountA.suite.ts new file mode 100644 index 00000000000..693ca9df40a --- /dev/null +++ b/tests/suites/MainTests/03-CreateAccountA.suite.ts @@ -0,0 +1,6 @@ +import "module-alias/register"; +import createFirstAccount from "@specs/15-create-first-account.spec"; + +describe("MacOS Tests - Create First Account", function () { + describe("Create and Save First Account", createFirstAccount.bind(this)); +}) \ No newline at end of file diff --git a/tests/suites/MainTests/03-CreateAccountTests.suite.ts b/tests/suites/MainTests/03-CreateAccountTests.suite.ts deleted file mode 100644 index 44e4e7f876e..00000000000 --- a/tests/suites/MainTests/03-CreateAccountTests.suite.ts +++ /dev/null @@ -1,6 +0,0 @@ -import "module-alias/register"; -import createSecondAccount from "@specs/14-create-reusable-accounts.spec"; - -describe("MacOS Tests - Create Second Account", function () { - describe("Create Pin and Account Tests", createSecondAccount.bind(this)); -}) \ No newline at end of file diff --git a/tests/suites/MainTests/04-CreateAccountB.suite.ts b/tests/suites/MainTests/04-CreateAccountB.suite.ts new file mode 100644 index 00000000000..aae56d8c8bb --- /dev/null +++ b/tests/suites/MainTests/04-CreateAccountB.suite.ts @@ -0,0 +1,6 @@ +import "module-alias/register"; +import createSecondAccount from "@specs/16-create-second-account.spec"; + +describe("MacOS Tests - Create Second Account", function () { + describe("Create and Save Second Account", createSecondAccount.bind(this)); +}) \ No newline at end of file