Skip to content

Commit

Permalink
Merge pull request #510 from Satellite-im/luis/input-file
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm authored Oct 28, 2023
2 parents 67d98d9 + 19fb42d commit d26aff0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions tests/screenobjects/files/FilesScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,17 +390,35 @@ export default class FilesScreen extends UplinkMainScreen {
}

async typeOnFileNameInput(name: string) {
// Type on File Name input
const inputFileName = await this.inputFileName;
await inputFileName.waitForExist();
await inputFileName.clearValue();
await inputFileName.setValue(name);
const fileNameInputValue = await inputFileName.getText();

// Validate that input is correct before continuing
if (fileNameInputValue !== name) {
await this.typeOnFileNameInput(name);
}

// Click outside to save changes
const filesInfoCurrentSizeLabel = await this.filesInfoCurrentSizeLabel;
await filesInfoCurrentSizeLabel.click();
}

async typeOnFolderNameInput(name: string) {
// Type on Folder Name input
const inputFolderName = await this.inputFolderName;
await inputFolderName.waitForExist();
await inputFolderName.clearValue();
await inputFolderName.setValue(name);
const folderNameInputValue = await inputFolderName.getText();

// Validate that input is correct before continuing
if (folderNameInputValue !== name) {
await this.typeOnFolderNameInput(name);
}

// Click outside to save changes
const filesInfoCurrentSizeLabel = await this.filesInfoCurrentSizeLabel;
await filesInfoCurrentSizeLabel.click();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/specs/04-friends.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default async function friends() {

// Add two more character to add someone input
await friendsScreenFirstUser.enterFriendDidKey(
"did:key:12345678901234567890123456789012345678901234567890"
"did:key:1234567890123456789012345678901234567890123456789"
);

const inputError = await friendsScreenFirstUser.inputErrorText;
Expand Down

0 comments on commit d26aff0

Please sign in to comment.