Skip to content

Commit

Permalink
refactor: Extract usage of Emails test data
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Nov 12, 2024
1 parent 319bfc4 commit e85cea1
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 17 deletions.
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>> {
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]",
"_______@example.com",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
),
emails: List<String> = emailsPreviewData, // TODO: Use real data
closeActivity: () -> Unit,
) {
BottomStickyButtonScaffold(
Expand Down

0 comments on commit e85cea1

Please sign in to comment.