Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Extract usage of Emails test data #170

Merged
merged 1 commit into from
Nov 13, 2024
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Infomaniak SwissTransfer - Android
* Copyright (C) 2024 Infomaniak Network SA
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.infomaniak.swisstransfer.ui.previewparameter

import androidx.compose.ui.tooling.preview.PreviewParameterProvider

class EmailsPreviewParameter : PreviewParameterProvider<List<String>> {
KevinBoulongne marked this conversation as resolved.
Show resolved Hide resolved
override val values: Sequence<List<String>> = sequenceOf(emailsPreviewData)
}

val emailsPreviewData = listOf(
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"email@[123.123.123.123]",
"sdiofhcdqsklmjvbnfdkjlsdbnfkdgflghhwfiudmsklwhdxfbvhlsdjkbwnxcjkvdxhjgwhxdjlxkchwbdvxfhbdqshjkdhjd@mail.com",
"\"email\"@example.com",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
)
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,15 @@ import com.infomaniak.swisstransfer.R
import com.infomaniak.swisstransfer.ui.components.*
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus
import com.infomaniak.swisstransfer.ui.images.illus.beers.Beers
import com.infomaniak.swisstransfer.ui.previewparameter.emailsPreviewData
import com.infomaniak.swisstransfer.ui.screen.newtransfer.importfiles.components.TransferType
import com.infomaniak.swisstransfer.ui.theme.Margin
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme
import com.infomaniak.swisstransfer.ui.utils.PreviewAllWindows

// TODO: Use correct emails instead of hard-coded values
@Composable
fun UploadSuccessEmailScreen(
emails: List<String> = listOf(
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"email@[123.123.123.123]",
"\"email\"@example.com",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
),
emails: List<String> = emailsPreviewData, // TODO: Use real data
closeActivity: () -> Unit,
) {
BottomStickyButtonScaffold(
Expand Down
Loading