Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 127 additions & 10 deletions Friends.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,26 @@
B46C74D02D9E84FE0021BF26 /* FirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = B46C74CF2D9E84FE0021BF26 /* FirebaseStorage */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
CAC0DDD32D9F53060017B5FC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 39E396A22D932EA300C43CC4 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 39E396A92D932EA300C43CC4;
remoteInfo = Friends;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
394D942D2D9EB71C00187B5D /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = "<group>"; };
394D95562D9EB92D00187B5D /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = "<group>"; };
39BBDF862D9DA89200DDCDDA /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = "<group>"; };
39E396AA2D932EA300C43CC4 /* Friends.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Friends.app; sourceTree = BUILT_PRODUCTS_DIR; };
39EE0B9E2D99B301005E6AF4 /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = "<group>"; };
8ADAE96B2D9F171000D75599 /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = "<group>"; };
8ADAEB912D9F522F00D75599 /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = "<group>"; };

CAC0DD7F2D9F52F10017B5FC /* Friends.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Friends.xcodeproj; sourceTree = "<group>"; };
CAC0DDCD2D9F53060017B5FC /* FriendsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FriendsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };

/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
Expand All @@ -43,6 +55,11 @@
path = Friends;
sourceTree = "<group>";
};
CAC0DDCE2D9F53060017B5FC /* FriendsUITests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = FriendsUITests;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -58,6 +75,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
CAC0DDCA2D9F53060017B5FC /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -84,6 +108,7 @@
isa = PBXGroup;
children = (
39E396AC2D932EA300C43CC4 /* Friends */,
CAC0DDCE2D9F53060017B5FC /* FriendsUITests */,
39E396AB2D932EA300C43CC4 /* Products */,
);
sourceTree = "<group>";
Expand All @@ -92,6 +117,7 @@
isa = PBXGroup;
children = (
39E396AA2D932EA300C43CC4 /* Friends.app */,
CAC0DDCD2D9F53060017B5FC /* FriendsUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -103,14 +129,8 @@
name = Products;
sourceTree = "<group>";
};
8ADAE96C2D9F171000D75599 /* Products */ = {
isa = PBXGroup;
children = (
);
name = Products;
sourceTree = "<group>";
};
8ADAEB922D9F522F00D75599 /* Products */ = {
CAC0DD802D9F52F10017B5FC /* Products */ = {

isa = PBXGroup;
children = (
);
Expand Down Expand Up @@ -148,6 +168,29 @@
productReference = 39E396AA2D932EA300C43CC4 /* Friends.app */;
productType = "com.apple.product-type.application";
};
CAC0DDCC2D9F53060017B5FC /* FriendsUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = CAC0DDDA2D9F53060017B5FC /* Build configuration list for PBXNativeTarget "FriendsUITests" */;
buildPhases = (
CAC0DDC92D9F53060017B5FC /* Sources */,
CAC0DDCA2D9F53060017B5FC /* Frameworks */,
CAC0DDCB2D9F53060017B5FC /* Resources */,
);
buildRules = (
);
dependencies = (
CAC0DDD42D9F53060017B5FC /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
CAC0DDCE2D9F53060017B5FC /* FriendsUITests */,
);
name = FriendsUITests;
packageProductDependencies = (
);
productName = FriendsUITests;
productReference = CAC0DDCD2D9F53060017B5FC /* FriendsUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -161,6 +204,10 @@
39E396A92D932EA300C43CC4 = {
CreatedOnToolsVersion = 16.2;
};
CAC0DDCC2D9F53060017B5FC = {
CreatedOnToolsVersion = 16.2;
TestTargetID = 39E396A92D932EA300C43CC4;
};
};
};
buildConfigurationList = 39E396A52D932EA300C43CC4 /* Build configuration list for PBXProject "Friends" */;
Expand Down Expand Up @@ -204,10 +251,15 @@
ProductGroup = 39EE0B9F2D99B301005E6AF4 /* Products */;
ProjectRef = 39EE0B9E2D99B301005E6AF4 /* Friends.xcodeproj */;
},
{
ProductGroup = CAC0DD802D9F52F10017B5FC /* Products */;
ProjectRef = CAC0DD7F2D9F52F10017B5FC /* Friends.xcodeproj */;
},
);
projectRoot = "";
targets = (
39E396A92D932EA300C43CC4 /* Friends */,
CAC0DDCC2D9F53060017B5FC /* FriendsUITests */,
);
};
/* End PBXProject section */
Expand All @@ -220,6 +272,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
CAC0DDCB2D9F53060017B5FC /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -252,8 +311,23 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
CAC0DDC92D9F53060017B5FC /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
CAC0DDD42D9F53060017B5FC /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 39E396A92D932EA300C43CC4 /* Friends */;
targetProxy = CAC0DDD32D9F53060017B5FC /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
39E396BE2D932EA500C43CC4 /* Debug */ = {
isa = XCBuildConfiguration;
Expand Down Expand Up @@ -436,6 +510,40 @@
};
name = Release;
};
CAC0DDD52D9F53060017B5FC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8U7D8W8J2D;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.maksimova.FriendsUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = Friends;
};
name = Debug;
};
CAC0DDD62D9F53060017B5FC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8U7D8W8J2D;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.maksimova.FriendsUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = Friends;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -457,6 +565,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
CAC0DDDA2D9F53060017B5FC /* Build configuration list for PBXNativeTarget "FriendsUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CAC0DDD52D9F53060017B5FC /* Debug */,
CAC0DDD62D9F53060017B5FC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
Expand Down
13 changes: 13 additions & 0 deletions Friends.xcodeproj/xcshareddata/xcschemes/Friends.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CAC0DDCC2D9F53060017B5FC"
BuildableName = "FriendsUITests.xctest"
BlueprintName = "FriendsUITests"
ReferencedContainer = "container:Friends.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down
4 changes: 4 additions & 0 deletions Friends/FinanceScreen/Controller/FinanceViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class FinanceViewController: UIViewController {
let titleLabel = UILabel()
titleLabel.text = "Деньги"
titleLabel.font = .systemFont(ofSize: 34, weight: .bold)
titleLabel.isAccessibilityElement = true
titleLabel.accessibilityIdentifier = "customTitleLabel"

if let navigationBar = navigationController?.navigationBar {
navigationBar.addSubview(titleLabel)
Expand All @@ -90,6 +92,8 @@ class FinanceViewController: UIViewController {
avatarButton.frame = CGRect(x: 0, y: 0, width: 40, height: 40)
avatarButton.clipsToBounds = true
avatarButton.layer.cornerRadius = 20
avatarButton.isAccessibilityElement = true
avatarButton.accessibilityIdentifier = "avatarButton"

avatarButton.addAction(UIAction { [weak self] _ in
let profileVC = ProfileViewController()
Expand Down
41 changes: 41 additions & 0 deletions FriendsUITests/FriendsUITests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// FriendsUITests.swift
// FriendsUITests
//
// Created by Алёна Максимова on 04.04.2025.
//

import XCTest

final class FriendsUITests: XCTestCase {

var app: XCUIApplication!

override func setUpWithError() throws {
continueAfterFailure = false
app = XCUIApplication()
app.launch()
}

override func tearDownWithError() throws {
app = nil
}

func testNavigationFlow() throws {
let titleLabel = app.staticTexts["customTitleLabel"]
XCTAssertTrue(titleLabel.waitForExistence(timeout: 5), "The custom title label 'Деньги' should exist")

let avatarButton = app.buttons["avatarButton"]
XCTAssertTrue(avatarButton.exists, "The avatar button should exist")

avatarButton.tap()

let backButton = app.navigationBars.buttons["Назад"]
XCTAssertTrue(backButton.waitForExistence(timeout: 5), "The back button should appear after navigation")

backButton.tap()

XCTAssertTrue(titleLabel.waitForExistence(timeout: 5),
"The custom title label 'Деньги' should reappear after returning")
}
}
33 changes: 33 additions & 0 deletions FriendsUITests/FriendsUITestsLaunchTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// FriendsUITestsLaunchTests.swift
// FriendsUITests
//
// Created by Алёна Максимова on 04.04.2025.
//

import XCTest

final class FriendsUITestsLaunchTests: XCTestCase {

override class var runsForEachTargetApplicationUIConfiguration: Bool {
true
}

override func setUpWithError() throws {
continueAfterFailure = false
}

@MainActor
func testLaunch() throws {
let app = XCUIApplication()
app.launch()

// Insert steps here to perform after app launch but before taking a screenshot,
// such as logging into a test account or navigating somewhere in the app

let attachment = XCTAttachment(screenshot: app.screenshot())
attachment.name = "Launch Screen"
attachment.lifetime = .keepAlways
add(attachment)
}
}