Skip to content

Commit

Permalink
Merge pull request #579 from Satellite-im/sara/update-test
Browse files Browse the repository at this point in the history
test(update): update test
  • Loading branch information
luisecm authored Dec 19, 2023
2 parents 1edcde0 + 90dffd3 commit 2e83944
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions tests/screenobjects/settings/SettingsLicenses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@ export default class SettingsLicensesScreen extends SettingsBaseScreen {
super(SELECTORS.SETTINGS_LICENSES);
}

get heroiconsDescription() {
get licenseDescription() {
return $$(SELECTORS.SETTINGS_SECTION)[0]
.$(SELECTORS.SETTINGS_INFO)
.$(SELECTORS.SETTINGS_INFO_DESCRIPTION);
}

get heroiconsHeader() {
get licenseHeader() {
return $$(SELECTORS.SETTINGS_SECTION)[0]
.$(SELECTORS.SETTINGS_INFO)
.$(SELECTORS.SETTINGS_INFO_HEADER);
}

get heroiconsButton() {
get licenseButton() {
return $$(SELECTORS.SETTINGS_SECTION)[0]
.$(SELECTORS.SETTINGS_CONTROL)
.$(SELECTORS.SETTINGS_CONTROL_BUTTON);
}

async clickOnShowHeroiconsLicenses() {
const heroiconsButton = await this.heroiconsButton;
await heroiconsButton.click();
async clickOnShowMITLicenses() {
const licenseButton = await this.licenseButton;
await licenseButton.click();
}
}
16 changes: 8 additions & 8 deletions tests/specs/12-settings-licenses.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ export default async function settingsLicenses() {
await settingsAboutFirstUser.goToLicensesSettings();
await settingsLicensesFirstUser.waitForIsShown(true);

// Validate the header and description texts from Heroicons
const heroiconsHeader = await settingsLicensesFirstUser.heroiconsHeader;
const heroiconsDescription =
await settingsLicensesFirstUser.heroiconsDescription;
await expect(heroiconsHeader).toHaveTextContaining("HEROICONS");
await expect(heroiconsDescription).toHaveTextContaining(
"We have expanded upon the heroicons library we offer any additional icons under the same license as the original author.",
// Validate the header and description texts from MIT license
const licenseHeader = await settingsLicensesFirstUser.licenseHeader;
const licenseDescription =
await settingsLicensesFirstUser.licenseDescription;
await expect(licenseHeader).toHaveTextContaining("UPLINK");
await expect(licenseDescription).toHaveTextContaining(
"Both code and icons are under the MIT license.",
);

// Validate MIT License button is present
await settingsLicensesFirstUser.heroiconsButton.waitForExist();
await settingsLicensesFirstUser.licenseButton.waitForExist();
});
}

0 comments on commit 2e83944

Please sign in to comment.