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

feat(testcafé) : Drive Sharing scenario #1425

Merged
merged 7 commits into from
Feb 11, 2019
Merged

Conversation

CozyKourai
Copy link
Contributor

  • One commit with all the new data-test-id

  • One commit with new tests and data (Check trello card for expected steps)

  • One step is still missing from this scenario : copy the shared link, so for the moment the public shared tests are supposed to run on local environnement. I'm working on fixing that, but as the PR is quite long, i wanted to post the work already done for review while working on copy-paste problem

@CozyKourai
Copy link
Contributor Author

package.json Outdated Show resolved Hide resolved
@CozyKourai CozyKourai force-pushed the testcafe/drive_sharing branch from 5255a66 to 754781e Compare February 1, 2019 13:48
Copy link
Contributor

@y-lohse y-lohse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I really like the test structure, but I think a few minor things need to change :)

testcafe/runner-drive.js Outdated Show resolved Hide resolved
testcafe/tests/drive_sharing.js Outdated Show resolved Hide resolved
testcafe/tests/helpers/data.js Show resolved Hide resolved
testcafe/tests/pages/drive-model-public.js Outdated Show resolved Hide resolved
testcafe/tests/pages/drive-model.js Outdated Show resolved Hide resolved
testcafe/tests/pages/drive-model-public.js Outdated Show resolved Hide resolved
testcafe/tests/pages/drive-model.js Outdated Show resolved Hide resolved
@@ -28,6 +28,7 @@ const UploadButton = ({ label, disabled, onUpload, className }) => (
<Icon icon="upload" />
<span>{label}</span>
<input
data-test-id="uploadButton"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no camelCase for our ids

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toujours pas corrigé

src/drive/web/modules/upload/UploadQueue.jsx Outdated Show resolved Hide resolved
src/drive/web/modules/upload/UploadQueue.jsx Outdated Show resolved Hide resolved
src/sharing/components/ShareByLink.jsx Outdated Show resolved Hide resolved
testcafe/tests/drive_sharing.js Show resolved Hide resolved
testcafe/tests/drive_sharing.js Outdated Show resolved Hide resolved
testcafe/tests/drive_sharing.js Outdated Show resolved Hide resolved
testcafe/tests/drive_sharing.js Outdated Show resolved Hide resolved
testcafe/tests/drive_sharing.js Show resolved Hide resolved
testcafe/tests/pages/drive-model-public.js Outdated Show resolved Hide resolved
testcafe/tests/pages/drive-model-public.js Outdated Show resolved Hide resolved
@CozyKourai CozyKourai force-pushed the testcafe/drive_sharing branch 4 times, most recently from 9842701 to 6f5c5ad Compare February 8, 2019 11:17
testcafe/runner-drive.js Outdated Show resolved Hide resolved

const breadcrumbEnd = await this.getbreadcrumb()
await t.expect(breadcrumbEnd).eql(partialBreacrumbStart)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can start thinking about how managing this file in a near future and how you can divide / separate responsibilities since the file will grow again and again (not part of this PR)

Copy link
Contributor

@Crash-- Crash-- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

package.json Outdated Show resolved Hide resolved
@CozyKourai CozyKourai force-pushed the testcafe/drive_sharing branch from 9a91644 to 9562360 Compare February 11, 2019 13:54
@CozyKourai CozyKourai force-pushed the testcafe/drive_sharing branch from 9562360 to 53de592 Compare February 11, 2019 14:03

//Chrome:headless does not download file in the download Folder by default
//This function set the path for the download folder
export async function setDownloadPath(downloadFolderPath) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

fixture`Drive : Access a folder public link`.page`${TESTCAFE_DRIVE_URL}/`
.beforeEach(async t => {
await t.useRole(Role.anonymous())
await setDownloadPath(`${homedir()}/Downloads`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

top !

@CozyKourai CozyKourai force-pushed the testcafe/drive_sharing branch from 53de592 to f9acb17 Compare February 11, 2019 14:43
@cozy-bot
Copy link

🎁 Click here to download the latest Android APK

@CozyKourai CozyKourai force-pushed the testcafe/drive_sharing branch from f9acb17 to 8a2b321 Compare February 11, 2019 14:59
@cozy-bot
Copy link

🎁 Click here to download the latest Android APK

@cozy-bot
Copy link

🎁 Click here to download the latest Android APK

@CozyKourai
Copy link
Contributor Author

CI KO car les data-test-id ajoutés ne sont pas présents sur le serveur.

@CozyKourai CozyKourai merged commit 5e7dcc6 into master Feb 11, 2019
@CozyKourai CozyKourai deleted the testcafe/drive_sharing branch February 11, 2019 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants