curved-artist-91262
07/14/2022, 12:15 PMrhythmic-guitar-55789
07/14/2022, 12:18 PMbillions-shampoo-89711
07/14/2022, 12:20 PMrhythmic-guitar-55789
07/14/2022, 12:47 PMmelodic-jordan-92756
07/14/2022, 12:48 PMcypress.config.js
const { defineConfig } = require('cypress')
module.exports = defineConfig({
projectId: 'rnft7f',
video: false,
reporter: 'mochawesome',
reporterOptions: {
charts: true,
overwrite: false,
html: true,
json: true,
reportDir: 'cypress/report/mochawesome-report',
},
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'https://app.astrnt.co/',
homepageUrl: 'https://app.astrnt.co/', //This is the line I've just add
specPattern: 'cypress/e2e/**/*.{feature,features,js,jsx,ts,tsx}'
},
})
billions-shampoo-89711
07/14/2022, 12:54 PMrhythmic-guitar-55789
07/14/2022, 1:16 PMfetch
and see if the issue still occurs.billions-shampoo-89711
07/14/2022, 1:18 PMrhythmic-guitar-55789
07/14/2022, 1:21 PMhelpful-plumber-53987
07/14/2022, 2:25 PMgray-beard-8992
07/14/2022, 7:49 PMrough-magazine-51515
07/14/2022, 7:52 PMrough-magazine-51515
07/14/2022, 7:52 PMrough-magazine-51515
07/14/2022, 7:52 PMbitter-fountain-36713
07/14/2022, 8:01 PMrough-magazine-51515
07/14/2022, 8:14 PMrough-magazine-51515
07/14/2022, 8:15 PMfamous-restaurant-30435
07/14/2022, 8:20 PMfamous-restaurant-30435
07/14/2022, 8:21 PMimportant-summer-62917
07/15/2022, 4:38 AMimportant-summer-62917
07/15/2022, 4:39 AMimportant-summer-62917
07/15/2022, 4:39 AMimportant-summer-62917
07/15/2022, 4:41 AMimportant-summer-62917
07/15/2022, 4:43 AMabundant-honey-50205
07/15/2022, 6:14 AMcy.fixture("../downloads/xxx.csv").then(dailyFile => {
cy.request({
method: "POST",
url: 'https://slack.com/api/files.upload',
FormData: true,
headers: {
'Content-Type': 'multipart/form-data;charset=UTF-8',
'Accept': '*/*',
'Connection': 'keep-alive',
'Accept-Encoding': '*'
},
body: {
file: dailyFile,
initial_comment: "Shakes the cat",
channels: "xxx",
token: "xxx",
}
})
})
Hi all, i want to upload the downloaded file .csv in /downloads/ folder of cypress, but when i use this code, the api returned the invalid_form_data error, please help me.bitter-match-90736
07/15/2022, 8:18 AMrefined-engineer-18140
07/15/2022, 8:20 AMbitter-match-90736
07/15/2022, 8:24 AMrefined-engineer-18140
07/15/2022, 8:28 AMbitter-match-90736
07/15/2022, 8:30 AM